- 01 Mar, 2023 27 commits
-
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
* Emtpy parameter. * No argument.
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
Aurel authored
-
- 28 Feb, 2023 6 commits
-
-
Roque authored
-
Levin Zimmermann authored
Pandas 0.20.0 introduced a bug fix [1] which changed the behaviour of 'DataFrame.to_records()', so that the resulting Record objects dtype names are unicodes if the data frames column names were unicode. Before this bug fix the dtype names were str, no matter whether the column names were str or unicode. Unfortunately np unpickle breaks if dtype names are unicode [2]. Since many of our data frame columns are unicode, loading arrays often fails. In python3 this isn't a problem anymore, so until then we fix this by introducing a simple monkey patch to pandas, which basically reverts the mentioned bug fix. [1] https://github.com/pandas-dev/pandas/issues/11879 [2] Small example to reproduce this error: '' import os import numpy as np import pandas as pd r = pd.DataFrame({u'A':[1,2,3]}).to_records() a = np.ndarray(shape=r.shape, dtype=r.dtype.fields) p = "t" try: os.remove(p) except: pass with open(p, 'wb') as f: np.save(f, a) with open(p, 'rb') as f: np.load(f) '' /reviewed-on nexedi/erp5!1738 /reviewed-by @jerome @klaus
-
Levin Zimmermann authored
Add test which verifies that we can un/pickle 'pd.DataFrame' which were converted to 'np.recarray' via the '.to_records()' method. This test is necessary because it turns out that the combination of pandas >= 0.20.x + python2 doesn't support this functionality by default if the data frames column names are unicodes. Please see !1738 (comment 179298) for additional context. /reviewed-on !1738 /reviewed-by @jerome @klaus
-
Levin Zimmermann authored
There are newer pandas versions which still support python2. The latest one which still supports py2 (0.24.x) has initially been released in 2019 and should therefore be quite stable and better supported. We should therefore prepare ERP5 so that it support those newer versions. This patch mostly fixes movements within the internal pandas structure. The patch still supports old object locations of previous pandas versions. /reviewed-on nexedi/erp5!1738 /reviewed-by @jerome @klaus
-
Levin Zimmermann authored
We already use '.resample.mean()' in some projects. /reviewed-on nexedi/erp5!1738 /reviewed-by @jerome @klaus
-
Levin Zimmermann authored
In some projects we use pandas resampler inside 'portal_callables' (so with restricted Python). But we miss tests which check whether pandas resamplers are allowed inside the restricted Python. Due to this lack of tests we won't notice whether the usage of pandas resamplers still work with a newer pandas version. With this patch we can recognize if an internal change of pandas makes the resampler unusuable in restricted Python. /reviewed-on nexedi/erp5!1738 /reviewed-by @jerome @klaus
-
- 27 Feb, 2023 4 commits
-
-
Jérome Perrin authored
see b6dcbc19 (l10n_fr,l10n_jp: Fix translation of "Open", 2021-04-30)
-
Jérome Perrin authored
-
Jérome Perrin authored
This was old compatibility code
-
Jérome Perrin authored
$INSTANCE_HOME/log only exists in runUnitTest instances, this code had no effect in slapos instances. It is a future problem because it depends on the Signals module (part of ZServer package) and we are removing this dependency in the python 3 port. For the SynchronizationTool, it was even more problematic because it can cause the component not to loed, with an error like: ImportError: erp5.component.tool.SynchronizationTool: cannot load Component SynchronizationTool (signal only works in main thread)
-
- 24 Feb, 2023 3 commits
-
-
Roque authored
See merge request nexedi/erp5!1745
-
Roque authored
-
Roque authored
See merge request nexedi/erp5!1744
-