- 15 May, 2023 40 commits
-
-
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
-
Jérome Perrin authored
fixes errors on python3, File needs bytes
-
Jérome Perrin authored
because every test run use a different instance of the class, I think we don't need to clear() here. using clear causes: Traceback (most recent call last): File "/srv/slapgrid/slappart7/t/ean/soft/3216c6675c8ec7c75ba48e3939c44a66/eggs/Zope-4.8.7-py3.9.egg/Testing/ZopeTestCase/base.py", line 100, in tearDown self.beforeTearDown() File "<portal_components/test.erp5.testTradeModelLine>", line 106, in beforeTearDown File "/srv/slapgrid/slappart7/t/ean/shared/python3/25c3b9e7a12e170bd030a475160ea994/lib/python3.9/_collections_abc.py", line 929, in clear self.popitem() File "/srv/slapgrid/slappart7/t/ean/shared/python3/25c3b9e7a12e170bd030a475160ea994/lib/python3.9/_collections_abc.py", line 918, in popitem key = next(iter(self)) File "<portal_components/test.erp5.testTradeModelLine>", line 66, in __iter__ TypeError ... because unittest.TestCase should not have an __iter__ method
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
This reverts commit 3145b32f. Otherwise, ERP5 site setup fails while importing erp5_core/ToolTemplateItem/portal_transforms.xml. /SR/parts/erp5/product/ERP5/Document/BusinessTemplate.py(930)_importFile() 928 # FIXME: Why not use the importXML function directly? Are there any BT5s 929 # with actual .zexp files on the wild? --> 930 obj = connection.importFile(file_obj, customImporters=customImporters) 931 self._objects[obj_key] = obj 932 ipdb> file_obj <_io.BufferedReader name='/SR/parts/erp5/product/ERP5/bootstrap/erp5_core/ToolTemplateItem/portal_transforms.xml'> ... > /SR/develop-eggs/zodbpickle-2.0.0+slapospatched001-py3.8-linux-x86_64.egg/zodbpickle/pickle_3.py(995)decode_string() 993 return value 994 else: --> 995 return value.decode(self.encoding, self.errors) 996 997 def load_string(self): ipdb> p value b'\x00\x00\x00\x00\x00\x00\x00\x80'
-
Kazuhiko Shiozaki authored
otherwise we will have an Exception in Python 3 while importing a Business Template, if a new portal type and its documents exist in the same Business Template. while importing a content file, like *.js... (BusinessTemplate.py) try: setattr(obj, property_name, data) except BrokenModified: obj.__Broken_state__[property_name] = data # <-- !!! obj._p_changed = 1 obj.__Broken_state__ access here also raises BrokenModified. while importing an XML file... (ZODB/broken.py) def __new__(class_, *args): result = object.__new__(class_) # <-- !!! result.__dict__['__Broken_newargs__'] = args return result we get an exception 'TypeError: object.__new__(Portal Type) is not safe, use Base.__new__()'
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
This reverts commit 45ce6a21.
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
workflow: provide legacy WorkflowHistoryList for backward compatibility even if WITH_LEGACY_WORKFLOW is False.
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
py2/py3: import InstanceDict from DocumentTemplate._DocumentTemplate instead of deprecated DocumentTemplate.DT_Util.
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
If we have a portal_type definition and its instances in the same Business Template, _importFile() creates broken objects in PathTemplateItem._objects for such instances and they will be 'fixed' in install() timing. But in Python 3, it does not work because : while importing a content file, like *.js... (BusinessTemplate.py) try: setattr(obj, property_name, data) except BrokenModified: obj.__Broken_state__[property_name] = data # <-- !!! obj._p_changed = 1 obj.__Broken_state__ access here also raises BrokenModified. while importing an XML file... (ZODB/broken.py) def __new__(class_, *args): result = object.__new__(class_) # <-- !!! result.__dict__['__Broken_newargs__'] = args return result we get an exception 'TypeError: object.__new__(Portal Type) is not safe, use Base.__new__()'
-
Kazuhiko Shiozaki authored
(not yet for scripts under portal_skins)
-