- 06 Jul, 2024 40 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin 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
-
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
-
Kazuhiko Shiozaki authored
in Python 2, _aq_dynamic() returns None without try..except but it raises ValueError in Python 3. (python 2) > /SR/parts/erp5/product/ZSQLCatalog/Extensions/zsqlbrain.py(31)_aq_dynamic() 31 -> def _aq_dynamic(self, name): 32 """Acquire an attribute from a real object. 33 """ 34 if name.startswith('__') : 35 return None 36 return getattr(self.getObject(), name, None) ((Pdb)) getattr(self.getObject(), name, None) *** ValueError: Unable to getObject from ZSQLBrain if ZSQL Method does not retrieve the `path` column from catalog table. ((Pdb)) r --Return-- > /SR/parts/erp5/product/ZSQLCatalog/Extensions/zsqlbrain.py(36)_aq_dynamic()->None # <-- !!!
-
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
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
One problem with hexdigest is that it's longer and the column was created as binary(16). We don't have a mechanism to run migrations on this table, so we use UNHEX in SQL to have the equivalent as digest() from hexdigest() Co-authored-by: Jérome Perrin <jerome@nexedi.com>
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
Jérome: slightly adjusted manually to just use range where it does not make a significant difference (for example in test)
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-