Building _hashlib and _ssl modules#892
Conversation
I am using Mac OS Catalina 10.15.7. To avoid getting the following messages : > The necessary bits to build these optional modules were not found: > _hashlib _ssl as well as: > Could not build the ssl module! > Python requires a OpenSSL 1.1.1 or newer Running `brew install openssl@3` allowed the _hashlib _ssl modules to build, but as suggested in a comment by @ezio-melotti it seemed strange that the version needed to be specified. I am therefore updating the documentation by leaving `brew install openssl` rather than `brew install openssl@3 ` but I am adding a note saying that if user gets the message > Could not build the ssl module! > Python requires a OpenSSL 1.1.1 or newer that they can try specifying the version of OpenSSL by using `brew install openssl@3`. Issue number: python/cpython#93695
|
Please be aware that OpenSSL 3.0 is still not supported by Python. It's possible to compile Python with OpenSSL 3.0 but it's not tested well. I advise against examples that refer to OpenSSL 3.0. |
|
@tiran thanks for the clarification. I updated the example with OpenSSL1.1 instead of 3.0. But maybe, in that case, the documentation should be updated so that OpenSSL1.1 is installed. I agree that as mentioned by @ezio-melotti it makes it version-specific, and it will require updating the documentation again in the future which is not ideal. But as it is currently specified in the documentation: In that case, removing my current note, and simply updating the command line |
If it's not supported, documenting a command that installs it sounds wrong, so I think it's fine to document @tiran: are there plans to add support for OpenSSL 3? If there is an issue already, a note about updating the devguide could be added there so that we don't forget. |
ezio-melotti
left a comment
There was a problem hiding this comment.
I left a couple of comments, but you can wait until decide how to fix this issue before updating the PR.
@ezio-melotti the homebrew documentation provides two options when looking up |
Yes, there are multiple open issues related to OpenSSL 3 in the tracker, so adding a note would be fine. |
I also removed the original note as it would be irrelevant after updating the brew command line
This is to resolve conflict with main branch
Is there a meta-issue or anyway an issue that once closed will allow the switch to |
I don't think there's a meta issue, so creating a project SGTM. |
|
@ezio-melotti I am unclear as to where needs to be noted the switch to
Once we made a note of this somewhere (happy to do it if you can tell me where), this PR could be merged as it is. |
|
I created a project about OpenSSL 3 with a draft issue about updating the devguide: |
@ezio-melotti I get a 404 error message. If it is a permission issue, don't worry about it. |
The project is currently marked "private". I guess Ezio will make it public sooner or later :) |
|
@erlend-aasland or @ezio-melotti does one of you want to merge this PR to main? |
|
Thanks for the heads-up and thanks for the PR! |
The brew install command was updated in #892, but the corresponding commands were not.
I am using Mac OS Catalina 10.15.7.
To avoid getting the following messages :
as well as:
Based on the comments below, the solution is to indicate the OpenSSL version in the brew command:
brew install openssl@1.1and make a note to update this line withbrew install openssl@3when OpenSSL 3 is supported.Initial (and outdated descritption below):
Details
Running `brew install openssl@3` allowed the _hashlib _ssl modules to build, but as suggested in a comment by @ezio-melotti it seemed strange that the version needed to be specified.I am therefore updating the documentation by leaving the suggested command line as
brew install opensslrather thanbrew install openssl@3but I am adding a note saying that if user gets the messagethey can try specifying the version of OpenSSL by using
brew install openssl@3.Issue number: python/cpython#93695