Skip to content

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

Merged
vstinner merged 5 commits into
python:mainfrom
vstinner:ssl_doc
Nov 3, 2022
Merged

vstinner merged 5 commits into
python:mainfrom
vstinner:ssl_doc

Conversation

@vstinner

@vstinner vstinner commented Nov 2, 2022 •

Copy link
Copy Markdown
Member

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

vstinner commented Nov 2, 2022

Copy link
Copy Markdown
Member Author

@illia-v illia-v 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 for updating the doc!

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

Comment thread Doc/library/ssl.rst Resolved
Comment thread Doc/library/ssl.rst Resolved
@vstinner

vstinner commented Nov 2, 2022

Copy link
Copy Markdown
Member Author

@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.

Comment thread Doc/library/ssl.rst Resolved
Comment thread Doc/library/ssl.rst Outdated
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
Copy Markdown
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

Comment thread Doc/library/ssl.rst Resolved
Comment thread Doc/library/ssl.rst 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

vstinner commented Nov 3, 2022

Copy link
Copy Markdown
Member Author

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

3 participants