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 — bpo-45438: format of inspect.Signature with generic builtins by martinitus · Pull Request #29212 · python/cpython

Conversation

@martinitus

@martinitus martinitus commented Oct 25, 2021 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Use isinstance(annotation,types.GenericAlias) in inspect.formatannotation to correctly add type arguments of builtin types to the string representation of Signatures.
  • Add test case for generic signature formatting.

https://bugs.python.org/issue45438

Sorry, something went wrong.

Uh oh!

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

All reactions
@MRuecklCC
bpo-45438: format of inspect.Signature with generic builtins
80a3f0e
Use types.GenericAlias in inspect.formatannotation to correctly add
type arguments of builtin types to the string representation of
Signatures.
@bedevere-bot bedevere-bot added the awaiting review label Oct 25, 2021
@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Oct 25, 2021
@the-knights-who-say-ni

This comment has been minimized.

Sign in to view
@the-knights-who-say-ni the-knights-who-say-ni added CLA signed and removed CLA not signed labels Oct 25, 2021
@gvanrossum gvanrossum added needs backport to 3.9 labels Oct 26, 2021
gvanrossum
gvanrossum approved these changes Oct 26, 2021
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Oct 26, 2021
@gvanrossum

gvanrossum commented Oct 26, 2021

Copy link
Copy Markdown
Member

@martinitus Please add a news entry.

All reactions

Sorry, something went wrong.

Uh oh!

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

@MRuecklCC
bpo-45438: add news entry
f976f10
@martinitus

martinitus commented Oct 27, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

Added news entry!

How are backports done? - Should I create separate PRs for the 3.10 and 3.9 branches where I cherry pick the two commits?

  • Also: Not sure what is with the Azure Pipeline documentation build, but it also fails with the same error on the current main on my local linux machine (make venv doc)
All reactions

Sorry, something went wrong.

Uh oh!

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

@gvanrossum

gvanrossum commented Oct 27, 2021

Copy link
Copy Markdown
Member

Let’s ignore the doc error. Backport are done by a bot. I will merge once the other tests pass.

All reactions

Sorry, something went wrong.

Uh oh!

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

@gvanrossum
gvanrossum merged commit d02ffd1 into python:main Oct 27, 2021
@miss-islington

miss-islington commented Oct 27, 2021

Copy link
Copy Markdown
Contributor

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

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 Oct 27, 2021
@bedevere-bot

bedevere-bot commented Oct 27, 2021

Copy link
Copy Markdown

@gvanrossum: Please replace # with GH- in the commit message next time. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 27, 2021
@martinitus @miss-islington
bpo-45438: format of inspect.Signature with generic builtins (pythonG…
de555cb
…H-29212)

Use types.GenericAlias in inspect.formatannotation to correctly add
type arguments of builtin types to the string representation of
Signatures.

Co-authored-by: Martin Rückl <[email protected]>
(cherry picked from commit d02ffd1)

Co-authored-by: Martin Rueckl <[email protected]>
@bedevere-bot

bedevere-bot commented Oct 27, 2021

Copy link
Copy Markdown

GH-29253 is a backport of this pull request to the 3.10 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.10 label Oct 27, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 27, 2021
@martinitus @miss-islington
bpo-45438: format of inspect.Signature with generic builtins (pythonG…
4fda2ec
…H-29212)

Use types.GenericAlias in inspect.formatannotation to correctly add
type arguments of builtin types to the string representation of
Signatures.

Co-authored-by: Martin Rückl <[email protected]>
(cherry picked from commit d02ffd1)

Co-authored-by: Martin Rueckl <[email protected]>
@bedevere-bot

bedevere-bot commented Oct 27, 2021

Copy link
Copy Markdown

GH-29254 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 Oct 27, 2021
miss-islington added a commit that referenced this pull request Oct 27, 2021
@miss-islington @martinitus
bpo-45438: format of inspect.Signature with generic builtins (GH-29212)
ce7a6af
Use types.GenericAlias in inspect.formatannotation to correctly add
type arguments of builtin types to the string representation of
Signatures.

Co-authored-by: Martin Rückl <[email protected]>
(cherry picked from commit d02ffd1)

Co-authored-by: Martin Rueckl <[email protected]>
miss-islington added a commit that referenced this pull request Oct 27, 2021
@miss-islington @martinitus
bpo-45438: format of inspect.Signature with generic builtins (GH-29212)
21150c6
Use types.GenericAlias in inspect.formatannotation to correctly add
type arguments of builtin types to the string representation of
Signatures.

Co-authored-by: Martin Rückl <[email protected]>
(cherry picked from commit d02ffd1)

Co-authored-by: Martin Rueckl <[email protected]>
@martinitus
martinitus deleted the bpo-45438 branch November 1, 2021 10:04
@rhettinger rhettinger mentioned this pull request Oct 18, 2022
inspect not capturing type annotations created by __class_getitem__ #89601
Closed
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

None yet

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.

6 participants

@martinitus @the-knights-who-say-ni @gvanrossum @miss-islington @bedevere-bot @MRuecklCC
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.