- 17 Sep, 2024 12 commits
-
-
Jérome Perrin authored
Followup of 94739085.
-
Arnaud Fontaine authored
key()-based sorting is now used instead, available since Python 2.4.
-
Jérome Perrin authored
Jupyter integration is more or less abandoned. Just do the minimum to make tests pass.
-
Jérome Perrin authored
Also, remove `if True/1/False/0` statement raising pylint warnings. Co-authored-by: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
-
Jérome Perrin authored
* Zope API changes: + publish(): - stdin is now BytesIO rather than StringIO. - Returned value of a script is passed to str() in python2, not in python3 anymore. + HTTPResponse `body` property is now bytes(). + OFS.Image.File file parameter is bytes(). + zope.interface implements() is now @implementer decorator. + Python standard logging module recommended instead of zLOG. * Python3 API changes: + builtin reduce() was removed. + urlnorm is now available. + Use BytesIO rather than StringIO to follow py3 API. + hmac.new() requires digestmod argument from Python 3.8. + Use six.moves library to handle moved objects from py2 to py3. + `modernize -f xrange_six` then slightly adjusted manually to just use range where it does not make a significant difference (for example in test). + base64.b64encode() now expects bytes(). + UserDict() interface changed: - New parameter in update() and pop(). - `failobj` setdefault parameter renamed to `default`. + ensure_list() on dict.{values,items}() and list(dict) for dict.keys() when we really need a list and not an iterable (Python3). - Add ensure_list() to RestrictedPython safe_builtins as it's very common usage. + Make dict iteration works on both version of Python. - Use six.iter{items,values,keys}(). - has_key() has been removed. - Make sure that dict.{items,values,keys}() returns a real list when modified (ensure_list()). + Comparisons between int and NoneType raises TypeError. + BTrees key must be str() not int() (_getOb()). + No more unbound methods in python3 so use six.get_unbound_function(). + Exceptions: - No longer behave as sequences. Using `args` attribute instead. - When an exception has been assigned using `as target`, it is cleared at the end of the except clause. + file: py2 was returning `str` upon reading, now it returns text strings. Also, opening mode is text strings by default. + Data strings are bytes(). - Replace str() by bytes(). + iterators no longer have next() method, instead there is next() builtin. + New ConnectionError exception so rename existing one to not clash. + Integer division is now with //. + __nonzero__ is now __bool__. + apply() does not exist anymore. + Deprecated threading.Thread isAlive() has been removed. + im_func replaced by __func__. + Use six.with_metaclass() to define metaclass in a cross-compatible way with py2 and py3. + Only test method can be marked as expectedFailure(), not assert statement anymore. + os.path.walk() removed. + HTMLParser never fails: no strict mode nor HTMLParseError anymore (Python #15114). Co-Authored-by: Kazuhiko SHIOZAKI <kazuhiko@nexedi.com> Co-Authored-by: Arnaud Fontaine <arnaud.fontaine@nexedi.com> Co-Authored-by: Carlos Ramos Carreño <carlos.ramos@nexedi.com> Co-Authored-by: Emmeline Vouriot <emmeline.vouriot@nexedi.com>
-
Jérome Perrin authored
-
Jérome Perrin authored
some conversion (TextDocument) depend on the content type, so it's necessary to first update the content type before trying to convert to base format
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
zope5: Since 5.8.1 missing Content-Type HTTP header is interpreted as application/x-www-form-urlencoded. Zope.git: commit 5b324f6c461f5ea1cc069739b6c32a1a5ff59df9 Date: Thu Jan 19 07:15:18 2023 +0100 replace `cgi.FieldStorage` by `multipart` (#1094) * interpret a missing `CONTENT_TYPE` as `application/x-www-form-urlencoded` With cgi.FieldStorage, it was interpretated as text/plain so Content-Type has to be provided now (even for WebDAV despite RFC 4918 stating that it *SHOULD* be provided). Some Unit Tests did not provide such header at all but this was wrong (such as erp5_stripe:testStripe where the real request has application/json as Content-Type and not text/plain).
-
Romain Courteaud authored
-
- 16 Sep, 2024 1 commit
-
-
Romain Courteaud authored
The main query to the hateoas web section must be cache by the browser, to reduce the number of queries by 2. Caching policy manager conditions are checked before calculating the query result, and so, it is not possible anymore to wait for the script to explicitely ask for the result to be cached.
-
- 10 Sep, 2024 7 commits
-
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
so that we can identify recently deleted objects, that are important to resynchronise catalog and ZODB in case of a catastrophe.
-
- 09 Sep, 2024 3 commits
-
-
Jérome Perrin authored
version up and fix a bug with indentation being 4 spaces (instead of the expected 2 spaces) with empty python files See merge request !1987
-
Jérome Perrin authored
true is not an allowed value, causing a visible problem tabSize to be ignored on empty documents and using 4 for python.
-
Jérome Perrin authored
-
- 05 Sep, 2024 1 commit
-
-
Rafael Monnerat authored
Prevent the user start an inconsistent assignment, since, extra property sheets can include some business logic around assignment configuration.
-
- 03 Sep, 2024 5 commits
-
-
Jérome Perrin authored
This fixes a regression with 445e8fa8 (ERP5TypeTestCase: rework default manager password generation, 2024-05-27), it was no longer possible to run live tests from a "normal" zope instance, this was failing with: Traceback (most recent call last): File "./eggs/Zope-5.10-py3.9.egg/Testing/ZopeTestCase/PortalTestCase.py", line 59, in setUp self._setup() File "./parts/erp5/product/ERP5Type/tests/ERP5TypeLiveTestCase.py", line 156, in _setup self.login() File "./parts/erp5/product/ERP5Type/tests/ERP5TypeTestCase.py", line 290, in login return PortalTestCase.login(self, user_name) File "./eggs/Zope-5.10-py3.9.egg/Testing/ZopeTestCase/PortalTestCase.py", line 146, in login user = user.__of__(uf) AttributeError: 'NoneType' object has no attribute '__of__' It was only possible from a runUnitTest instance.
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
This comes with a small breaking change that when using file:// URLs, they need to be well formed ( file:// + path and not file:/ + path )
-
- 31 Aug, 2024 1 commit
-
-
Arnaud Fontaine authored
Use scrubHTML() from safe_html module instead.
-
- 30 Aug, 2024 2 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
It was using bytes(), but this seems wrong now.
-
- 28 Aug, 2024 1 commit
-
-
Arnaud Fontaine authored
-
- 27 Aug, 2024 1 commit
-
-
Arnaud Fontaine authored
a17bb910: py2/py3: Make Products code compatible with both python2 and python3.
-
- 26 Aug, 2024 4 commits
-
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
erp5_syncml: invoke callback method by activity in non split_indexation case as well to make transaction shorter.
-
Kazuhiko Shiozaki authored
-
- 16 Aug, 2024 1 commit
-
-
Romain Courteaud authored
Use the removeProperty method.
-
- 14 Aug, 2024 1 commit
-
-
Jérome Perrin authored
This executes even if setup() encounters an error and the cleanup hook is added when opening the file, not later on. Also, unify makeFileUpload() and makeFilePath() to remove duplicated code. Co-authored-by: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
-