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

bpo-41805: Documentation for PEP 585 #22615

Merged
merged 9 commits into from
Oct 27, 2020

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented Oct 9, 2020

This PR (if accepted) probably needs a backport to 3.9. It also partly addresses https://bugs.python.org/issue40814.

Also, I'll need to update the links in stdtypes Union Type to point to GenericAlias now. However, I'm not sure if doing that in this PR would make backporting harder/go against the 1 issue per PR recommendation.

Lastly, I have a feeling that we should create a section in stdtypes called "Types for Type Annotations" and place GenericAlias and Union under that since it's becoming a moderate chunk of the documentation for that page. I'll open a bpo if that makes sense.

https://bugs.python.org/issue41805

@Fidget-Spinner Fidget-Spinner marked this pull request as draft October 10, 2020 06:47
@Fidget-Spinner Fidget-Spinner marked this pull request as ready for review October 10, 2020 16:25
@Fidget-Spinner
Copy link
Member Author

It should be ready for review now @gvanrossum :). Please take a look whenever it's convenient for you. Thanks!

@Fidget-Spinner Fidget-Spinner changed the title bpo-41805: Documentation for PEP585 bpo-41805: Documentation for PEP 585 Oct 10, 2020
@gvanrossum gvanrossum added the needs backport to 3.9 only security fixes label Oct 20, 2020
@gvanrossum
Copy link
Member

I'm pretty overwhelmed by sprint activity. I promise I will review this at some point -- if I haven't done so in 1 week can you ping me? Either here or on the issue will notify me via email.

@Fidget-Spinner
Copy link
Member Author

Alright, no worries. Thanks for the promise, I'll ping again in a week :)

Comment on lines 4858 to 4859
These standard library collections support parameterized generics. Most of
their type parameters can be found in the :mod:`typing` module:
Copy link
Member

Choose a reason for hiding this comment

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

What do you mean by the second sentence? That you need to read the docs for typing to find out how many parameters each of these has and whether they are invariant or covariant?

Copy link
Member Author

Choose a reason for hiding this comment

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

Your interpretation is correct. Should I place a table for such information instead?

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Getting close!

Fidget-Spinner and others added 2 commits October 27, 2020 23:52
Co-Authored-By: Guido van Rossum <gvanrossum@users.noreply.github.com>
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Two more suggestions that I will apply myself, then it's good. Thank you very much!

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Ready to go!

@gvanrossum gvanrossum merged commit 4173320 into python:master Oct 27, 2020
@miss-islington
Copy link
Contributor

Thanks @Fidget-Spinner for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @Fidget-Spinner and @gvanrossum, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 4173320920706b49a004bdddd8d7108e8984e3fc 3.9

@gvanrossum
Copy link
Member

@Fidget-Spinner Can you work on the manual backport?

@Fidget-Spinner
Copy link
Member Author

Fidget-Spinner commented Oct 27, 2020

@gvanrossum sure, give me a day or two to figure out cherry_picker.

Also, thanks for the many rounds of reviews. This was a fairly challenging peice of documentation, but I'm glad to have had feedback throughout the process to help me along the way :).

@gvanrossum
Copy link
Member

gvanrossum commented Oct 28, 2020 via email

@bedevere-bot
Copy link

GH-23016 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Oct 28, 2020
miss-islington pushed a commit that referenced this pull request Oct 28, 2020
Backport of #22615 to 3.9 since that couldn't be auto-merged due to conflicts.
@Fidget-Spinner Fidget-Spinner deleted the add-docs-pep585 branch October 28, 2020 15:57
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Oct 29, 2020
…lots1

* origin/master: (365 commits)
  bpo-42029: Remove IRIX code (pythonGH-23023)
  bpo-42143: Ensure PyFunction_NewWithQualName() can't fail after creating the func object (pythonGH-22953)
  bpo-34204: Use pickle.DEFAULT_PROTOCOL in shelve (pythonGH-19639)
  bpo-41805: Documentation for PEP 585 (pythonGH-22615)
  bpo-42161: Micro-optimize _collections._count_elements() (pythonGH-23008)
  bpo-42161: Remove private _PyLong_Zero and _PyLong_One (pythonGH-23003)
  bpo-42099: Fix reference to ob_type in unionobject.c and ceval (pythonGH-22829)
  bpo-41659: Disallow curly brace directly after primary (pythonGH-22996)
  bpo-6761: Enhance __call__ documentation (pythonGH-7987)
  bpo-42161: Modules/ uses _PyLong_GetZero() and _PyLong_GetOne() (pythonGH-22998)
  bpo-41474, Makefile: Add dependency on cpython/frameobject.h (pythonGH-22999)
  bpo-42157: Rename unicodedata.ucnhash_CAPI (pythonGH-22994)
  bpo-42161: Use _PyLong_GetZero() and _PyLong_GetOne() (pythonGH-22995)
  bpo-30681: Support invalid date format or value in email Date header (pythonGH-22090)
  bpo-42161: Add _PyLong_GetZero() and _PyLong_GetOne() (pythonGH-22993)
  bpo-42123: Run the parser two times and only enable invalid rules on the second run (pythonGH-22111)
  bpo-42157: Convert unicodedata.UCD to heap type (pythonGH-22991)
  bpo-42157: unicodedata avoids references to UCD_Type (pythonGH-22990)
  bpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. (pythonGH-22654)
  bpo-1635741: _PyUnicode_Name_CAPI moves to internal C API (pythonGH-22713)
  ...
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants