GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [doc] Leverage the fact that the actual types can now be indexed for typing by andresdelfino · Pull Request #22340 · python/cpython

Conversation

@andresdelfino

@andresdelfino andresdelfino commented Sep 21, 2020 •
edited by miss-islington
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@andresdelfino
Use new generic types
77b99a6
@andresdelfino
andresdelfino requested review from gvanrossum and ilevkivskyi as code owners September 21, 2020 14:29
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Sep 21, 2020
@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
@andresdelfino
Restore order
fa7bbed
gvanrossum
gvanrossum approved these changes Sep 27, 2020
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

andresdelfino reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Sep 27, 2020
@gvanrossum gvanrossum added 🤖 automerge skip issue skip news labels Sep 27, 2020
@gvanrossum

gvanrossum commented Sep 27, 2020

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

andresdelfino reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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

gvanrossum commented Sep 27, 2020

Copy link
Copy Markdown
Member

@Mariatta What's the trick to landing this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@andresdelfino

andresdelfino commented Sep 27, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum

gvanrossum commented Sep 27, 2020

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@andresdelfino
Fix Travis build
dceacb3
@miss-islington

miss-islington commented Sep 27, 2020

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@miss-islington

miss-islington commented Sep 27, 2020

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington

miss-islington commented Sep 27, 2020

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@miss-islington

miss-islington commented Sep 27, 2020

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@andresdelfino

andresdelfino commented Sep 27, 2020

Copy link
Copy Markdown
Contributor Author

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

Mariatta reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington

miss-islington commented Sep 27, 2020

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

miss-islington commented Sep 27, 2020

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label Sep 27, 2020
@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
@andresdelfino @miss-islington
[doc] Leverage the fact that the actual types can now be indexed for …
1054ec3
…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 <[email protected]>
@bedevere-bot

bedevere-bot commented Sep 27, 2020

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 label Sep 27, 2020
miss-islington added a commit that referenced this pull request Sep 27, 2020
@miss-islington @andresdelfino
[doc] Leverage the fact that the actual types can now be indexed for …
bdf46bc
…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 <[email protected]>
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Sep 29, 2020
@shihai1991
Merge remote-tracking branch 'origin/master' into bpo_1635741_1
e3b9365
* 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)
  ...
@andresdelfino andresdelfino mentioned this pull request Oct 3, 2020
[doc] Use list[int] instead of List[int] (etc.) in a few more places #22524
Merged
miss-islington pushed a commit that referenced this pull request Oct 3, 2020
@andresdelfino
[doc] Use list[int] instead of List[int] (etc.) in a few more places (G…
7f54e56
…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
@andresdelfino @miss-islington
[doc] Use list[int] instead of List[int] (etc.) in a few more places (p…
8e7e21b
…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 <[email protected]>
@miss-islington miss-islington mentioned this pull request Oct 3, 2020
[3.9] [doc] Use list[int] instead of List[int] (etc.) in a few more places (GH-22524) #22531
Merged
miss-islington added a commit that referenced this pull request Oct 3, 2020
@miss-islington @andresdelfino
[doc] Use list[int] instead of List[int] (etc.) in a few more places (G…
5f9a08d
…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 <[email protected]>
ambv pushed a commit to ambv/cpython that referenced this pull request Oct 4, 2020
@miss-islington @andresdelfino @ambv
[doc] Leverage the fact that the actual types can now be indexed for …
900b985
…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 <[email protected]>
ambv pushed a commit to ambv/cpython that referenced this pull request Oct 4, 2020
@miss-islington @andresdelfino @ambv
[doc] Use list[int] instead of List[int] (etc.) in a few more places (p…
fd510e3
…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 <[email protected]>
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
@andresdelfino @xzy3-cdc
[doc] Leverage the fact that the actual types can now be indexed for …
2ec6e7a
…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
@andresdelfino @xzy3-cdc
[doc] Use list[int] instead of List[int] (etc.) in a few more places (p…
39b5ae0
…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

Reviewers

@gvanrossum gvanrossum gvanrossum approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@andresdelfino @gvanrossum @miss-islington @bedevere-bot @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.