Skip to content

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

@hugovkhugovk commented Dec 22, 2022

Copy link
Copy Markdown
Member

@hugovk
hugovkforce-pushed the 94172-fix-docs-key_file-cert_file-deprecation branch from 6f55419 to 770bc01CompareDecember 22, 2022 15:51

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

@bedevere-bot

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

Copy link
Copy Markdown
MemberAuthor

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

Thanks for making the requested changes!

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

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

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

Comment threadDoc/library/ftplib.rst Outdated
Comment threadDoc/library/http.client.rst Outdated
Comment threadDoc/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.

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

Copy link
Copy Markdown
MemberAuthor

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
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 threadMisc/NEWS.d/3.12.0a2.rst Outdated
Comment threadDoc/library/smtplib.rst Outdated
hugovkand 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

hugovk commented Dec 27, 2022

Copy link
Copy Markdown
MemberAuthor

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

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

Thank you!

@hugovk
hugovk deleted the 94172-fix-docs-key_file-cert_file-deprecation branch December 28, 2022 22:49
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@hugovk@bedevere-bot@hauntsaninja@slateny