- 17 Jul, 2024 1 commit
-
-
Jérome Perrin authored
This includes heuristics to guess the str or bytes from business template XML: oids are bytes and also some strings that do not decode to UTF-8, so that we can install python2 business templates on py3. When exporting business templates, we need to build a list of referenced persistent objects to export them separately in the XML, this is is done using noload, in a way which does not support pickle protocol 1 on py3 (the persistent ids are None and the assertion in https://github.com/zopefoundation/ZODB/blob/d698507bb89eeb38c6e655199bc9f54c909dbf4d/src/ZODB/serialize.py#L669 fails), so we need to use pickle protocol 3 on py3. With these changes, on py2 we are still using the same protocol 1 and the output is stable, but on py3 we are using protocol 3 and the output is different. Business template exported on py This also adds some test coverage of XMLExportImport, while doing this it was found that the ad-hoc handling of boolean in protocol 1 was not implemented correctly and they were serialized as integers (0 for False and 1 for True), this is also fixed.
-
- 15 Jul, 2024 39 commits
-
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Jérome Perrin authored
mail body is str
-
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
-
Carlos Ramos Carreño authored
The if in this change was not being reached in Python 2, because in this version the repr includes a comma after the message. I have chosen instead to do the same that was being done before commit 9f4cf295, but changing `message` (which does not exist in Python 3) to `args[0]` which can be used in both Python versions.
-
Carlos Ramos Carreño authored
- The warnings are compared in a set instead of a list, as we do not care of how many times is the warning raised. - The warning filter is added inside the context manager, as recommended in https://docs.python.org/2.7/library/warnings.html#testing-warnings . - We change the `clear` method of list, using `del` instead, as the `clear` method was added on Python 3.3.
-
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
-
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
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Carlos Ramos Carreño authored
-
Carlos Ramos Carreño authored
-