← 返回首页
gh-94172: Update docs for params removed in 3.12 by hugovk · Pull Request #100431 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-94172: Update docs for params removed in 3.12#100431

Merged
hauntsaninja merged 6 commits into
python:mainfrom
hugovk:94172-fix-docs-key_file-cert_file-deprecation
Dec 28, 2022
Merged

gh-94172: Update docs for params removed in 3.12#100431
hauntsaninja merged 6 commits into
python:mainfrom
hugovk:94172-fix-docs-key_file-cert_file-deprecation

Conversation

hugovk commented Dec 22, 2022
edited
Loading

Copy link
Copy Markdown
Member

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 force-pushed the 94172-fix-docs-key_file-cert_file-deprecation branch from 6f55419 to 770bc01 Compare December 22, 2022 15:51

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Thanks for updating these! It looks like the remaining arguments were also made keyword-only.

Copy link
Copy Markdown

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

hugovk commented Dec 23, 2022

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown

Thanks for making the requested changes!

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

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

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

Comment thread Doc/library/ftplib.rst Outdated Show resolved Hide resolved
Comment thread Doc/library/http.client.rst Outdated Show resolved Hide resolved
Comment thread Doc/library/http.client.rst Outdated

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

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Updated in 25421ff

Copy link
Copy Markdown
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.

Comment thread Misc/NEWS.d/3.12.0a2.rst Outdated Show resolved Hide resolved
Comment thread 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 commented Dec 27, 2022
edited
Loading

Copy link
Copy Markdown
Member Author

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):

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Thank you!

hugovk deleted the 94172-fix-docs-key_file-cert_file-deprecation branch December 28, 2022 22:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.