[FIX] auth_saml: require compatible urllib3 - #5
Open
oussjarrousse wants to merge 2 commits into
Open
oussjarrousse wants to merge 2 commits into
oussjarrousse wants to merge 2 commits into
Conversation
Author
|
I investigated the current merge failure and submitted a fix here: The failure was caused by current pysaml2 upgrading the cryptography/pyOpenSSL stack while Odoo 19/Python 3.10 still had urllib3 1.26.5. The fix:
I reproduced the OCA CI environment on my fork and the final branch passes:
Have a nice weekend! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR OCA#916 currently fails in the OCA Python 3.10 CI environment before addon tests run.
Installing current pysaml2 upgrades cryptography and pyOpenSSL, while Odoo 19 keeps urllib3==1.26.5 on Python 3.10. This results in:
ModuleNotFoundError:
No module named 'cryptography.hazmat.backends.openssl.x509'
This change declares urllib3>=2.0.7 as a runtime dependency of auth_saml so the urllib3 pyOpenSSL integration uses APIs compatible with the modern cryptography stack required by current pysaml2.
The generated root requirements.txt is updated accordingly.
No application code or tests are changed.
Validation
The issue was reproduced using the same OCA CI workflow and containers used by OCA/server-auth 19.0.
Before this fix, CI failed before addon tests ran with:
ModuleNotFoundError:
No module named 'cryptography.hazmat.backends.openssl.x509'
The cause was the dependency combination:
The first commit adds
urllib3>=2.0.7, which resolves the runtime incompatibility.After that, all addon tests passed, but OCA checklog still failed on a known upstream PySAML2
CryptographyDeprecationWarning:IdentityPython/pysaml2#1033
The second commit adds a narrowly scoped
checklog-odoo.cfgignore rule for that specific third-party warning.The complete fix was tested in the OCA CI workflow using:
Final result: