- 29 May, 2024 40 commits
-
-
Carlos Ramos Carreño authored
Instead of using encode/decode is it better to use str2bytes and bytes2str, so that the types in Python 2 are unchanged. More important, this prevents the double encoding of bytes, which causes problems when they have non-ASCII data encoded.
-
Carlos Ramos Carreño authored
Errors were being raised for returning `None` in Python 2 (due to a missing else branch) and for re-encoding bytes in Python 2. I changed the code to use str2bytes in the cases where bytes are expected.
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Kazuhiko Shiozaki authored
with ROUND_DOWN, we have a different behaviour between py2/py3, that caused failures in erp5_simplified_invoicing:testTradeModelLine. Here is what happened in _round(1.9999999999999998) in bt5/erp5_simulation/DocumentTemplateItem/portal_components/document.erp5.FloatEquivalenceTester.py * py2 decimal.Decimal(str(1.9999999999999998)).quantize(decimal.Decimal('0.000001'), 'ROUND_DOWN') => Decimal('2.000000') (because str(1.9999999999999998) is '2.0') * py3 decimal.Decimal(str(1.9999999999999998)).quantize(decimal.Decimal('0.000001'), 'ROUND_DOWN') => Decimal('1.999999') (because str(1.9999999999999998) is '1.9999999999999998') But ROUND_DOWN result of 1.9999999999999998 with 0.000001 precision should be 1.999999 thus py2 behaviour is wrong.
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
On python2, attributes of new style classes (classes, not instances) were not properly validated. On python3, attributes of classes were not.
-
Jérome Perrin authored
In current versions, sorted is allowed in RestrictedPython. Also, our implementation of sorted was not correct with generators, it consumed the generator by iterating on it a first time to check the values.
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
Run zope with ERP5_COMPONENT_OVERRIDE_PATH set to a : separated list of path containing components files to load components from files instead of portal_components. This can be used to repair zope after a bad edit of component.
-
Jérome Perrin authored
for pylint 3 to understand erp5 dynamic modules
-
Jérome Perrin authored
-
Jérome Perrin authored
patches/python: fix linecache for python scripts on py3
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
If preferences are not set, this causes a non existant style to be used
-
Jérome Perrin authored
On recent pylint, this is flagged as unnecessary-pass Also update the link that was pointing to python2 doc
-
Jérome Perrin authored
We want these columns to be "binary" so that mariadbd compares them without any collation, but we don't want to use binary type, because on python 3 the brain attributes are bytes (user ids are strings everywhere else). This also normalize the same columns present in worklist cache table.
-
Jérome Perrin authored
-
Jérome Perrin authored
I don't know a PYTHONHASHSEED to see the problem on python2, but on python 3 erp5_payroll_l10n_fr:testSimplifiedPayslipReport fails all the time with this.
-
Jérome Perrin authored
On python3 the percentages are sometimes printed as 6.8500000000000005%
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Jérome Perrin authored
it was using bytes, but this seems wrong now that we did 31af8997 (XMLExportImport: Base_asXML and Folder_asXML return str, not bytes., 2024-03-07).
-