- 03 Mar, 2023 28 commits
-
-
Jérome Perrin authored
The status message no longer use system-msg class, use simpler "assertTextPresent" that should be enough. Simplify the waiting for static pages, clickAndWait is enough.
-
Jérome Perrin authored
With zope.tal 3.6.0 - commit 26fadc4 (Increase the default value of the `wrap` argument from 60 to 1023 characters, to avoid extra whitespace and line breaks., 2011-08-20) from zopefoundation/zope.tal - page templates keep the attributes on the same line and produce slightly different output, although equivalent. This commit updates the places where we do snapshot testing to the new output. We discussed using lxml features to compare html and xml from https://lxml.de/lxmlhtml.html#running-html-doctests but because the corporate identity web pages are invalid html, it seems unsafe to rely on lxml at this point. Once corporate identity web pages are fixed this would probably be a good thing to do.
-
Arnaud Fontaine authored
zope.conf of Zope2 (zopeschema.xml) used to define event/Z2 log files and properly configure logging but this is not the case anymore with Zope4 (wsgischema.xml). This adds path to event/Z2 log files as command line parameter as we probably don't need further configuration such as message format (SlapOS recipe has never handled it anyway).
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
Also, `__code__` has been introduced in Python 2.6 (for forwards compatibility with Python 3) as an alias to func_code which has been completely removed in Python 3. This fixes testFunctionalCore failures: [...] Module ZPublisher.mapply, line 53, in mapply code = f.__code__ AttributeError: 'DefaultGetter' object has no attribute '__code__'
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
See Revert "zope patches: display OFSFile content using full available height in zmi". This fixes testBigFile failures because of `size` not being set to 0 when `data` is set to None.
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
Modify DTML templates likewise Zope4 removal commit: commit 1df76c1ea8911d7d9249eb6beab1fafd4ed5803c Author: Hanno Schlichting <hanno@hannosch.eu> Date: Sun Jul 3 14:19:26 2011 +0000 Removed `bobobase_modification_time` from `Persistence.Persistent`, you can use `DateTime(object._p_mtime)` instead. This fixes failure on test_PROPFIND_on_document (testWebDavSupport).
-
Jérome Perrin authored
This reverts commit 8f5497d4. This is not longer needed - with Zope 4 the ZMI is better and we now have possibility to edit most of these through ERP5 user interface. The main motivation is that these kind of patches are really hard to keep up to date.
-
Jérome Perrin authored
This reverts commit 88786a70. This is not longer needed - with Zope 4 the ZMI is better and we now have possibility to edit most of these through ERP5 user interface. The main motivation is that these kind of patches are really hard to keep up to date.
-
Jérome Perrin authored
This reverts commit c89e308f. This is not longer needed - with Zope 4 the ZMI is better and we now have possibility to edit most of these through ERP5 user interface. The main motivation is that these kind of patches are really hard to keep up to date.
-
Jérome Perrin authored
In the changes from ExternalMethod 2.13.1 -> 4.5, now ExternalMethod define __code__ (and __defaults__) to a computed attribute calling getFunction, but getFunction is different in our patched class, so when unwrapMethod tries to get __code__, it will raise and mapply will not consider the external method as being callable, so a simple __repr__ of the ExternalMethod will be used as response body when published. By defining __code__ to something using our patched logic, this problem does not happen.
-
Arnaud Fontaine authored
Utility function taking care of the internal changes between RestrictedPython v3 and v5, keeping support for both (instead of having multiple if statements).
-
Tatuya Kamada 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
* "OFS.CopySupport exceptions have been removed: you should use strings instead." * "WSGI is used in place of ZServer." * "StringType must be imported from types" * "'script' is forbidden as python script name"
-
Levin Zimmermann authored
With nexedi/erp5@a254bf50 we migrated most of np related security code from Wendelin to ERP5, we only missed few lines. This patch moves the remaining lines to ERP5 so that all numpy related restricted python code is at one place and no longer scattered at two different repos/files. tested at: https://erp5js.nexedi.net/#/test_result_module/20230302-F5352509
-
Jérome Perrin authored
-
- 02 Mar, 2023 2 commits
-
-
Rafael Monnerat authored
See merge request nexedi/erp5!1746
-
Jérome Perrin authored
This makes it easier to test this API ( see testSlapOSPayzenWorkflow from slapos.core )
-
- 01 Mar, 2023 1 commit
-
-
Jérome Perrin authored
fcd26be0 (CMFActivity,syncml: stop using a dedicated log file, 2023-02-17) introduced a regression in test and left an unused variable.
-
- 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 nexedi/erp5!1738 (comment 179298) for additional context. /reviewed-on nexedi/erp5!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 !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 !1738 /reviewed-by @jerome @klaus
-
- 27 Feb, 2023 3 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
-