FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-118772: Allow TypeVars without a default to follow those with a default when constructing aliases by JelleZijlstra · Pull Request #118774 · python/cpython · GitHub

/ cpython Public

gh-118772: Allow TypeVars without a default to follow those with a default when constructing aliases - #118774

Merged
JelleZijlstra merged 2 commits into
python:mainfrom
JelleZijlstra:relaxdefailt
May 8, 2024
Merged

gh-118772: Allow TypeVars without a default to follow those with a default when constructing aliases#118774
JelleZijlstra merged 2 commits into
python:mainfrom
JelleZijlstra:relaxdefailt

Conversation

JelleZijlstra commented May 8, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

JelleZijlstra merged commit aac6b01 into python:main May 8, 2024

Copy link
Copy Markdown

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

JelleZijlstra deleted the relaxdefailt branch May 8, 2024 16:54

bedevere-app Bot commented May 8, 2024

Copy link
Copy Markdown

GH-118776 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label May 8, 2024
JelleZijlstra added a commit that referenced this pull request May 8, 2024
…th a default when constructing aliases (GH-118774) (#118776)

(cherry picked from commit aac6b01)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Copy link
Copy Markdown
Member

Unfortunately I think it's infeasible to backport this to typing_extensions, unless we can think of some other approach to implement the same behaviour at typing_extensions. Here's the beginnings of a typing_extensions patch: https://github.com/python/typing_extensions/compare/main...AlexWaygood:typing_extensions:646-default-before-nondefault?expand=1. It passes tests on Python 3.11 and 3.12, but starts interfering with the typing.py internals in some quite fundamental ways on lower versions of Python due to the extensiveness of the monkeypatching. It's plausibly fixable, but it would require even more invasive monkeypatching, and I think it would make the code too fragile.

Copy link
Copy Markdown
Member

Alright, here we go... python/typing_extensions#392

JelleZijlstra restored the relaxdefailt branch September 10, 2024 23:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL