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 — gh-84644: Don't single-dispatch on return types by johnslavik · Pull Request #140255 · python/cpython

Conversation

@johnslavik

@johnslavik johnslavik commented Oct 17, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Prior art is #19871, but it widened its scope to also fix issue #130827 that hadn't yet been reported back then.

This PR does not fix issue #130827.
I'm specifically only trying to close the issue #84644.

  • Issue: functools.singledispatch doesn't verify annotation is on FIRST parameter #84644

Sorry, something went wrong.

Uh oh!

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

All reactions
@johnslavik
Don't single-dispatch on return types
dfdf7ac
@bedevere-app bedevere-app Bot mentioned this pull request Oct 17, 2025
functools.singledispatch doesn't verify annotation is on FIRST parameter #84644
Open
johnslavik
johnslavik commented Oct 17, 2025
View reviewed changes
Comment thread Lib/functools.py Resolved

Uh oh!

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

@johnslavik
Add news entry
cf1da17
@johnslavik

johnslavik commented Oct 17, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

If we accept this, it could be a new ground to take over #130829 -- Peter has said he isn't planning on finishing that anytime soon.

All reactions

Sorry, something went wrong.

Uh oh!

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

@johnslavik
johnslavik marked this pull request as ready for review October 17, 2025 13:37
@johnslavik
johnslavik requested a review from rhettinger as a code owner October 17, 2025 13:37
@bedevere-app bedevere-app Bot added the awaiting review label Oct 17, 2025
@johnslavik
Change function name and add docs
041ceaa
JelleZijlstra
JelleZijlstra reviewed Oct 20, 2025
View reviewed changes
Comment thread Lib/functools.py Resolved

Uh oh!

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

@johnslavik

johnslavik commented Oct 20, 2025

Copy link
Copy Markdown
Member Author

Closing this to look for a general fix of how annotations are inspected -- see #140255 (comment)

All reactions

Sorry, something went wrong.

Uh oh!

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

@johnslavik johnslavik closed this Oct 20, 2025
@johnslavik
johnslavik deleted the dont-singledispatch-on-return-types branch December 2, 2025 00:44
@johnslavik johnslavik mentioned this pull request Jan 6, 2026
gh-84644: Fix singledispatch annotation parsing #143465
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra left review comments
@rhettinger rhettinger Awaiting requested review from rhettinger rhettinger is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

awaiting review

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.

2 participants

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