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

[doc] Leverage the fact that the actual types can now be indexed for typing #22340

Merged
merged 3 commits into from
Sep 27, 2020

Conversation

andresdelfino
Copy link
Contributor

@andresdelfino andresdelfino commented Sep 21, 2020

This shows users that they can use the actual types. Using deprecated types is confusing.

This also prefers colections.abc.Sized instead of the alias typing.Sized. I guess the aliases were created to make it convenient to import all collections related types from the same place.

This should be backported to 3.9.

Automerge-Triggered-By: @gvanrossum

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels Sep 21, 2020
@andresdelfino andresdelfino changed the title [doc] Take advantage that actual types can be indexed for typing [doc] Leverage the fact that the actual types can now be indexed for typing Sep 21, 2020
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.

Thanks! At first I was hesitant to approve this, because people will want to write code that's backwards compatible for a few versions, but they should just read the old docs...

@gvanrossum
Copy link
Member

Travis reporting is stuck, and it prevents me from overriding, so I'm going to close and reopen in the hope that fixes it. (There's quite a chance that it doesn't.)

@gvanrossum gvanrossum closed this Sep 27, 2020
@gvanrossum gvanrossum reopened this Sep 27, 2020
@gvanrossum gvanrossum removed the request for review from ilevkivskyi September 27, 2020 01:26
@gvanrossum
Copy link
Member

@Mariatta What's the trick to landing this?

@andresdelfino
Copy link
Contributor Author

andresdelfino commented Sep 27, 2020

@gvanrossum it may be the Travis CI build, which is queued. It seems there was a problem with Travis reporting the build state to GitHub, as all jobs are done in Travis:

https://travis-ci.com/github/python/cpython/builds/185656276

GitHub is waiting for that build to end since I opened the PR.

@gvanrossum
Copy link
Member

If you can, read the issue that references this. There’s a GitHub bug that prevents it from seeing the reported status, and some kind of super permission that I don’t have is needed to bypass that. :-(

@miss-islington
Copy link
Contributor

@andresdelfino: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor

@andresdelfino: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor

Sorry, I can't merge this PR. Reason: 2 of 4 required status checks have not succeeded: 1 expected..

1 similar comment
@miss-islington
Copy link
Contributor

Sorry, I can't merge this PR. Reason: 2 of 4 required status checks have not succeeded: 1 expected..

@andresdelfino
Copy link
Contributor Author

Just pushed an empty commit to try to unlock the Travis build.

@miss-islington
Copy link
Contributor

@andresdelfino: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit d9ab95f into python:master Sep 27, 2020
@miss-islington
Copy link
Contributor

Thanks @andresdelfino for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@andresdelfino andresdelfino deleted the use_actual_generic_types branch September 27, 2020 19:07
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 27, 2020
…typing (pythonGH-22340)

This shows users that they can use the actual types. Using deprecated types is confusing.

This also prefers colections.abc.Sized instead of the alias typing.Sized. I guess the aliases were created to make it convenient to import all collections related types from the same place.

This should be backported to 3.9.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit d9ab95f)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
@bedevere-bot
Copy link

GH-22430 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 Sep 27, 2020
miss-islington added a commit that referenced this pull request Sep 27, 2020
…typing (GH-22340)

This shows users that they can use the actual types. Using deprecated types is confusing.

This also prefers colections.abc.Sized instead of the alias typing.Sized. I guess the aliases were created to make it convenient to import all collections related types from the same place.

This should be backported to 3.9.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit d9ab95f)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Sep 29, 2020
* origin/master: (113 commits)
  bpo-41773: Raise exception for non-finite weights in random.choices().  (pythonGH-22441)
  bpo-41873: Add vectorcall for float() (pythonGH-22432)
  bpo-41861: Convert _sqlite3 PrepareProtocolType to heap type (pythonGH-22428)
  bpo-41842: Add codecs.unregister() function (pythonGH-22360)
  bpo-41875: Use __builtin_unreachable when possible (pythonGH-22433)
  bpo-40105: ZipFile truncate in append mode with shorter comment (pythonGH-19337)
  bpo-41870: Use PEP 590 vectorcall to speed up bool()  (pythonGH-22427)
  [doc] Leverage the fact that the actual types can now be indexed for typing (pythonGH-22340)
  bpo-41861: Convert _sqlite3 cache and node static types to heap types (pythonGH-22417)
  bpo-41858: Clarify line in optparse doc (pythonGH-22407)
  Revert "Fix all Python Cookbook links (python#22205)" (pythonGH-22424)
  bpo-1635741: Port _bisect module to multi-phase init (pythonGH-22415)
  bpo-41428: Fix compiler warning in unionobject.c (pythonGH-22416)
  Fix logging error message (pythonGH-22410)
  bpo-39934: Account for control blocks in 'except' in compiler. (pythonGH-22395)
  bpo-41775: Make 'IDLE Shell' the shell title  (python#22399)
  bpo-41428: Fix compiler warnings in unionobject.c (pythonGH-22388)
  bpo-41654: Fix compiler warning in MemoryError_dealloc() (pythonGH-22387)
  bpo-41833: threading.Thread now uses the target name (pythonGH-22357)
  bpo-30155: Add macros to get tzinfo from datetime instances (pythonGH-21633)
  ...
miss-islington pushed a commit that referenced this pull request Oct 3, 2020
…H-22524)

This changes a few occurrences left behind by #22340.

Automerge-Triggered-By: @gvanrossum
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 3, 2020
…ythonGH-22524)

This changes a few occurrences left behind by pythonGH-22340.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 7f54e56)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
miss-islington added a commit that referenced this pull request Oct 3, 2020
…H-22524)

This changes a few occurrences left behind by GH-22340.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 7f54e56)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
ambv pushed a commit to ambv/cpython that referenced this pull request Oct 4, 2020
…typing (pythonGH-22340)

This shows users that they can use the actual types. Using deprecated types is confusing.

This also prefers colections.abc.Sized instead of the alias typing.Sized. I guess the aliases were created to make it convenient to import all collections related types from the same place.

This should be backported to 3.9.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit d9ab95f)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
ambv pushed a commit to ambv/cpython that referenced this pull request Oct 4, 2020
…ythonGH-22524)

This changes a few occurrences left behind by pythonGH-22340.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 7f54e56)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
…typing (pythonGH-22340)

This shows users that they can use the actual types. Using deprecated types is confusing.

This also prefers colections.abc.Sized instead of the alias typing.Sized. I guess the aliases were created to make it convenient to import all collections related types from the same place.

This should be backported to 3.9.

Automerge-Triggered-By: @gvanrossum
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
…ythonGH-22524)

This changes a few occurrences left behind by python#22340.

Automerge-Triggered-By: @gvanrossum
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 issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants