Skip to content
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

gh-94199: Remove ssl.wrap_socket() documentation #99023

Merged
merged 5 commits into from
Nov 3, 2022
Merged

gh-94199: Remove ssl.wrap_socket() documentation #99023

merged 5 commits into from
Nov 3, 2022

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 2, 2022

The function has been removed. In the ssl documentation, replace references to the ssl.wrap_socket() function with references to the ssl.SSLContext.wrap_socket() method.

The function has been removed. In the ssl documentation, replace
references to the ssl.wrap_socket() function with references to the
ssl.SSLContext.wrap_socket() method.
@vstinner
Copy link
Member Author

vstinner commented Nov 2, 2022

cc @illia-v

Copy link
Contributor

@illia-v illia-v left a comment

Choose a reason for hiding this comment

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

Thanks for updating the doc!

Some arguments of ssl.wrap_socket are no longer present in SSLContext.wrap_socket.

Doc/library/ssl.rst Outdated Show resolved Hide resolved
Doc/library/ssl.rst Outdated Show resolved Hide resolved
@vstinner
Copy link
Member Author

vstinner commented Nov 2, 2022

@illia-v: I updated my PR, would you mind to review it? I removed references to non-existing parameters.

I made it clear the wrap_socket() is now the only way to create SSL socket objects, as already stated in the SSLSocket documentation: https://docs.python.org/dev/library/ssl.html#ssl.SSLSocket

Instances of SSLSocket must be created using the SSLContext.wrap_socket() method.

Doc/library/ssl.rst Outdated Show resolved Hide resolved
Comment on lines 2053 to 2054
case, only the ``certfile`` parameter to :meth:`SSLContext.load_cert_chain`
and :func:`wrap_socket` needs to be passed. If the private key is stored
and :meth:`SSLContext.wrap_socket` needs to be passed. If the private key is stored
Copy link
Contributor

Choose a reason for hiding this comment

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

SSLContext.wrap_socket has no certfile parameter

Doc/library/ssl.rst Outdated Show resolved Hide resolved
Doc/library/ssl.rst Outdated Show resolved Hide resolved
vstinner and others added 2 commits November 3, 2022 12:33
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
@vstinner vstinner merged commit cff1c20 into python:main Nov 3, 2022
@vstinner vstinner deleted the ssl_doc branch November 3, 2022 12:33
@vstinner
Copy link
Member Author

vstinner commented Nov 3, 2022

Thanks @illia-v, it was more complicated than expected. Not just a simple text replace before/after ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants