-
Notifications
You must be signed in to change notification settings - Fork 23k
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
[FIX] test_http: adapt test to succeed with ubuntu 24.04 noble #165998
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robodoo delegate+
werkzeug_version = metadata.version('werkzeug') | ||
if parse_version(werkzeug_version) >= parse_version('2.0.2') and parse_version(werkzeug_version) <= parse_version('3.0.1'): | ||
# Bug in werkzeug from 2.2.0 up to 3.0.1 (shipped in Ubuntu Noble 24.04) | ||
# Not a really big deal but should be remvoved once fixed upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
werkzeug_version = metadata.version('werkzeug') | |
if parse_version(werkzeug_version) >= parse_version('2.0.2') and parse_version(werkzeug_version) <= parse_version('3.0.1'): | |
# Bug in werkzeug from 2.2.0 up to 3.0.1 (shipped in Ubuntu Noble 24.04) | |
# Not a really big deal but should be remvoved once fixed upstream | |
werkzeug_version = metadata.version('werkzeug') | |
if parse_version('2.0.2') <= parse_version(werkzeug_version) <= parse_version('3.0.1'): | |
# Bug in werkzeug from 2.2.0 up to 3.0.1 (shipped in Ubuntu Noble 24.04) | |
# not a big deal but should be removed once fixed upstream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also change parse_version('2.0.2')
c681ee9
to
81261cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
importlib.metadata
is 3.8 but odoo16 must support 3.7
The brand new Ubuntu Noble 24.04 ships python3-werkzeug 3.0.1. This versions has a bug [0] which leads to this test failing as double slashes get fixed by werkzeug even though `merge_slashes` parameter is set to False by default in Odoo. This should not have a big impact on real life but the test should be kept to ensure that the actual behavior of a 404 is not broken outside of Ubuntu Noble. So, with this commit, if the impacted version of werkzeug is used the test will not fail with a fixed url and a redirect response. The issue that exists from 2.2.0 up to 3.0.1 is fixed upstream [1] in 3.0.2. A bug report was filled in Ubuntu [2] (Debian is not impacted) [0]: pallets/werkzeug#2834 [1]: pallets/werkzeug#2860 [2]: https://bugs.launchpad.net/ubuntu/+source/python-werkzeug/+bug/2066041
81261cd
to
27124a9
Compare
Nice catch (unlike parse_version('2.0.2') which was not really your catch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robodoo r+
The brand new Ubuntu Noble 24.04 ships python3-werkzeug 3.0.1. This versions has a bug [0] which leads to this test failing as double slashes get fixed by werkzeug even though `merge_slashes` parameter is set to False by default in Odoo. This should not have a big impact on real life but the test should be kept to ensure that the actual behavior of a 404 is not broken outside of Ubuntu Noble. So, with this commit, if the impacted version of werkzeug is used the test will not fail with a fixed url and a redirect response. The issue that exists from 2.2.0 up to 3.0.1 is fixed upstream [1] in 3.0.2. A bug report was filled in Ubuntu [2] (Debian is not impacted) [0]: pallets/werkzeug#2834 [1]: pallets/werkzeug#2860 [2]: https://bugs.launchpad.net/ubuntu/+source/python-werkzeug/+bug/2066041 closes #165998 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
@d-fence @Julien00859 this pull request has forward-port PRs awaiting action (not merged or closed): |
The brand new Ubuntu Noble 24.04 ships python3-werkzeug 3.0.1. This versions has a bug 0 which leads to this test failing as double slashes get fixed by werkzeug even though
merge_slashes
parameter is set to False by default in Odoo.This should not have a big impact on real life but the test should be kept to ensure that the actual behavior of a 404 is not broken outside of Ubuntu Noble.
So, with this commit, if the impacted version of werkzeug is used the test will not fail with a fixed url and a redirect response.
The issue that exists from 2.2.0 up to 3.0.1 is fixed upstream 1 in 3.0.2.
A bug report was filled in Ubuntu 2 (Debian is not impacted)