-
Notifications
You must be signed in to change notification settings - Fork 30.4k
[FIX] Python 3.13 / Debian Trixie compatibility #220858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
fw-bot
wants to merge
6
commits into
odoo:saas-18.4
from
odoo-dev:saas-18.4-17.0-trixie-compat-xmo-452831-fw
Closed
[FIX] Python 3.13 / Debian Trixie compatibility #220858
fw-bot
wants to merge
6
commits into
odoo:saas-18.4
from
odoo-dev:saas-18.4-17.0-trixie-compat-xmo-452831-fw
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Contributor
Author
|
@xmo-odoo cherrypicking of pull request #219270 failed. stdout: Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?). In the former case, you may want to edit this PR message as well. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
`importlib.metadata.version` was made final (non-provisional) in Python 3.10 which is the minver for odoo 18 so no need for a conditional.
When 3.11 added PEP 657 fine-grained error locations, squiggles were already possible[^1] but apparently we missed that in the cleanup regex because those didn't show up in the messages we cared about. With Python 3.13's improvements (sic...)[^2] this is not the case anymore, and the tracebacks from testing the test suite do get a bunch of squiggles which we need to learn to clean. [^1]: https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-pep657 [^2]: https://docs.python.org/3/whatsnew/3.13.html#improved-error-messages
Some libraries need to be bumped to be compatible with Python 3.13 (as used in Trixie). In that case we update the requirements to the Trixie version if possible, even if a lower version would be compatible with 3.13 itself. - babel needs to be at least [2.11 to avoid usage of cgi][2] removed from 3.13 - freezegun needs to be [at least 1.5.0][3] to not call the now-removed `uuid._load_system_functions()` - trixie ships gevent 24.11.1 and greenlet 3.1.0, but upstream [gevent 24.11.1 requires greenlet 3.1.1][1] so basing the requirements off of trixie doesn't even install - zeep needs to be [at least 4.3.0][4] to not use the `cgi` module [1]: https://github.com/gevent/gevent/blob/24.11.1/setup.py#L200-L214 [2]: https://babel.pocoo.org/en/latest/changelog.html#version-2-11-0 [3]: spulec/freezegun#534 [4]: mvantellingen/python-zeep#1364
Need to accept and forward size parameters in `addBlankPage`, used by a test for some reason.
15ab2d9 to
b2e8335
Compare
In that case Werkzeug 3.0.4 and later will drop the entire name (following pallets/werkzeug#2939, cf pallets/werkzeug#3032), we'll end up with a field named `None` on the python side, and then dispatching will blow up because `None` is not a valid kwarg. The exact semantics of that case are unclear (see also curl/curl#7789), my reading is that [RFC 7578][1] specifies percent-encoding and thus that should be used when encoding and decoding, and `\` should be irrelevant because it's neither `%` nor `"` so it's not a metacharacter for multipart/form-data headers. However the [whatwg living standard][2] rejects full blown percent-encoding, and instead uses percent-encoding on just a highly restricted set of inputs (which includes neither `\` nor `%`). And while it seems like we should be able to ignore RFC 6266 (the content-disposition header) who's to say that there are no real-world deployments which follow its strictures? Meh. [1]: https://datatracker.ietf.org/doc/html/rfc7578#section-2 [2]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data
92ed0bd to
3de825a
Compare
Collaborator
|
@robodoo r+ |
robodoo
pushed a commit
that referenced
this pull request
Jul 30, 2025
Part-of: #220858 Related: odoo/enterprise#91149 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
pushed a commit
that referenced
this pull request
Jul 30, 2025
`importlib.metadata.version` was made final (non-provisional) in Python 3.10 which is the minver for odoo 18 so no need for a conditional. Part-of: #220858 Related: odoo/enterprise#91149 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
pushed a commit
that referenced
this pull request
Jul 30, 2025
When 3.11 added PEP 657 fine-grained error locations, squiggles were already possible[^1] but apparently we missed that in the cleanup regex because those didn't show up in the messages we cared about. With Python 3.13's improvements (sic...)[^2] this is not the case anymore, and the tracebacks from testing the test suite do get a bunch of squiggles which we need to learn to clean. [^1]: https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-pep657 [^2]: https://docs.python.org/3/whatsnew/3.13.html#improved-error-messages Part-of: #220858 Related: odoo/enterprise#91149 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
pushed a commit
that referenced
this pull request
Jul 30, 2025
Some libraries need to be bumped to be compatible with Python 3.13 (as used in Trixie). In that case we update the requirements to the Trixie version if possible, even if a lower version would be compatible with 3.13 itself. - babel needs to be at least [2.11 to avoid usage of cgi][2] removed from 3.13 - freezegun needs to be [at least 1.5.0][3] to not call the now-removed `uuid._load_system_functions()` - trixie ships gevent 24.11.1 and greenlet 3.1.0, but upstream [gevent 24.11.1 requires greenlet 3.1.1][1] so basing the requirements off of trixie doesn't even install - zeep needs to be [at least 4.3.0][4] to not use the `cgi` module [1]: https://github.com/gevent/gevent/blob/24.11.1/setup.py#L200-L214 [2]: https://babel.pocoo.org/en/latest/changelog.html#version-2-11-0 [3]: spulec/freezegun#534 [4]: mvantellingen/python-zeep#1364 Part-of: #220858 Related: odoo/enterprise#91149 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
pushed a commit
that referenced
this pull request
Jul 30, 2025
Need to accept and forward size parameters in `addBlankPage`, used by a test for some reason. Part-of: #220858 Related: odoo/enterprise#91149 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
pushed a commit
that referenced
this pull request
Jul 30, 2025
In that case Werkzeug 3.0.4 and later will drop the entire name (following pallets/werkzeug#2939, cf pallets/werkzeug#3032), we'll end up with a field named `None` on the python side, and then dispatching will blow up because `None` is not a valid kwarg. The exact semantics of that case are unclear (see also curl/curl#7789), my reading is that [RFC 7578][1] specifies percent-encoding and thus that should be used when encoding and decoding, and `\` should be irrelevant because it's neither `%` nor `"` so it's not a metacharacter for multipart/form-data headers. However the [whatwg living standard][2] rejects full blown percent-encoding, and instead uses percent-encoding on just a highly restricted set of inputs (which includes neither `\` nor `%`). And while it seems like we should be able to ignore RFC 6266 (the content-disposition header) who's to say that there are no real-world deployments which follow its strictures? Meh. [1]: https://datatracker.ietf.org/doc/html/rfc7578#section-2 [2]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data Part-of: #220858 Related: odoo/enterprise#91149 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
added a commit
that referenced
this pull request
Jul 30, 2025
closes #220858 Forward-port-of: #220640 Forward-port-of: #219270 Related: odoo/enterprise#91149 Signed-off-by: Xavier Morel (xmo) <[email protected]>
robodoo
added a commit
that referenced
this pull request
Aug 4, 2025
closes #221165 Forward-port-of: #220858 Forward-port-of: #219270 Related: odoo/enterprise#91325 Signed-off-by: Xavier Morel (xmo) <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
conflict
There was an error while creating this forward-port PR
forwardport
This PR was created by @fw-bot
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Forward-Port-Of: #220640
Forward-Port-Of: #219270