Skip to content

Conversation

@trygveaa
Copy link
Contributor

@trygveaa trygveaa commented Dec 23, 2024

The cryptography package (which pyOpenSSL depends on) doesn't support being loaded in multiple sub interpreters from version 41.0.0. Doing it in previous versions seemed to work, but could apparenly cause soundness issues, so it errors out from version 41.0.0. Note that this isn't a change in the cryptography package, but in pyo3 from version 0.17.0, which cryptography uses.

This causes the script to fail when reloading it, or if you load it after another script with the same dependency. However, since pyOpenSSL is only used to print certificate info, wrap it in a try and skip printing info instead of crashing if pyOpenSSL can't be imported.

There is another issue with a dependency of matrix-nio using pyo3 (rpds-py via jsonschema), but this at least helps with part of the problem.

See #357 for more details.

@trygveaa trygveaa mentioned this pull request Dec 23, 2024
The cryptography package (which pyOpenSSL depends on) doesn't support
being loaded in multiple sub interpreters from version 41.0.0. Doing it
in previous versions seemed to work, but could apparenly cause soundness
issues, so it errors out from version 41.0.0. Note that this isn't a
change in the cryptography package, but in pyo3 from version 0.17.0,
which cryptography uses.

This causes the script to fail when reloading it, or if you load it
after another script with the same dependency. However, since pyOpenSSL
is only used to print certificate info, wrap it in a try and skip
printing info instead of crashing if pyOpenSSL can't be imported.

There is another issue with a dependency of matrix-nio using pyo3
(rpds-py via jsonschema), but this at least helps with part of the
problem.

See poljar#357 for more
details.
@trygveaa trygveaa force-pushed the fix/crypto-import-error branch from d049c43 to 0c1b51d Compare December 23, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant