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-94172: Update docs for params removed in 3.12 #100431

Merged

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Dec 22, 2022

In the following modules, these parameters were removed (in #94173) after being deprecated in Python 3.6:

ftplib imaplib poplib smptblib http.client
keyfile keyfile keyfile keyfile key_file
certfile certfile certfile certfile cert_file
        check_hostname

This PR updates the documentation to remove the parameters and note their removal in 3.12.

Preview

@hugovk hugovk force-pushed the 94172-fix-docs-key_file-cert_file-deprecation branch from 6f55419 to 770bc01 Compare December 22, 2022 15:51
Copy link
Contributor

@hauntsaninja hauntsaninja 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 these! It looks like the remaining arguments were also made keyword-only.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@hugovk
Copy link
Member Author

hugovk commented Dec 23, 2022

I have made the requested changes; please review again.


Thanks, updated, and I'd also missed SMTP.starttls so done that one too.

I also fixed a bit of formatting whilst these files are being updated.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@hauntsaninja: please review the changes made to this pull request.

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Left some comments! Good catch on SMTP.starttls (I didn't check for any other errors of omission)

Doc/library/ftplib.rst Outdated Show resolved Hide resolved
Doc/library/http.client.rst Outdated Show resolved Hide resolved
@@ -67,10 +67,9 @@ The module provides the following classes:
*blocksize* parameter was added.


.. class:: HTTPSConnection(host, port=None, key_file=None, \
cert_file=None[, timeout], \
.. class:: HTTPSConnection(host, port=None[, timeout], \
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't leave a suggestion, but this one needs to be made keyword-only

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated in 25421ff

@hauntsaninja
Copy link
Contributor

Btw, subject for a separate discussion, but I've never really liked the [param] syntax for optional parameters, since it's not close to any valid Python syntax. In some complicated signatures it may be necessary, but for the cases in this PR I feel like timeout=... or timeout=<default> or timeout=<unspecified> would be clearer.

Misc/NEWS.d/3.12.0a2.rst Outdated Show resolved Hide resolved
Doc/library/smtplib.rst Outdated Show resolved Hide resolved
hugovk and others added 2 commits December 27, 2022 15:03
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
@hugovk
Copy link
Member Author

hugovk commented Dec 27, 2022

Thanks both for the reviews!


Btw, subject for a separate discussion, but I've never really liked the [param] syntax for optional parameters, since it's not close to any valid Python syntax. In some complicated signatures it may be necessary, but for the cases in this PR I feel like timeout=... or timeout=<default> or timeout=<unspecified> would be clearer.

Yeah, I guess [param] is following the Unix manual page format, and we don't have an unambiguous default compared to the others:

    def __init__(self, host, port=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
                 source_address=None, blocksize=8192):

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thank you!

@hugovk hugovk deleted the 94172-fix-docs-key_file-cert_file-deprecation branch December 28, 2022 22:49
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.

4 participants