Skip to content

[FIX] data_encryption: pin cryptography to odoo core version - #304

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
camptocamp:18-fix-data-enc-pin
Sep 29, 2026
Merged

OCA-git-bot merged 1 commit into
OCA:18.0from
camptocamp:18-fix-data-enc-pin

Conversation

@simahawk

Copy link
Copy Markdown
Contributor

…eakage

An unpinned "cryptography" in requirements.txt lets pip resolve the latest release, which removed the private
cryptography.hazmat.backends.openssl.x509 module. Odoo's own pinned urllib3==1.26.5 (Python < 3.12) still imports that module through its legacy contrib.pyopenssl shim, used unconditionally by odoo/addons/base/models/ir_mail_server.py, so any install that upgrades cryptography past that point fails to boot at all:

ModuleNotFoundError: No module named
'cryptography.hazmat.backends.openssl.x509'

Cap it below the breaking release so the version Odoo itself pins (3.4.8 on Python < 3.12, 42.0.8 on Python >= 3.12) is still installable.

@simahawk

Copy link
Copy Markdown
Contributor Author

@florian-dacosta can you pls have a look at this? Builds on 18.0 are broken ATM.

An unpinned "cryptography" in requirements.txt lets pip resolve the
latest release, which removed the private
cryptography.hazmat.backends.openssl.x509 module. Odoo's own pinned
urllib3==1.26.5 (Python < 3.12) still imports that module through its
legacy contrib.pyopenssl shim, used unconditionally by
odoo/addons/base/models/ir_mail_server.py, so any install that
upgrades cryptography past that point fails to boot at all:

    ModuleNotFoundError: No module named
    'cryptography.hazmat.backends.openssl.x509'

Cap it below the breaking release so the version Odoo itself pins
(3.4.8 on Python < 3.12, 42.0.8 on Python >= 3.12) is still installable.
@simahawk simahawk changed the title [FIX] data_encryption: pin cryptography to avoid urllib3/pyOpenSSL br… [FIX] data_encryption: pin cryptography to odoo core version Sep 28, 2026

@Ricardoalso Ricardoalso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙏

@hparfr hparfr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@florian-dacosta

Copy link
Copy Markdown

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Sorry @florian-dacosta you are not allowed to merge.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

@simahawk

Copy link
Copy Markdown
Contributor Author

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-304-by-simahawk-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 41eb41c into OCA:18.0 Sep 29, 2026
6 of 7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 07fe358. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants