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

Fix various things with `Literal` by AlexWaygood · Pull Request #145 · python/typing_extensions · GitHub

Fix various things with Literal - #145

Merged
JelleZijlstra merged 4 commits into
python:mainfrom
AlexWaygood:literal-fixes
Apr 17, 2023
Merged

Fix various things with Literal#145
JelleZijlstra merged 4 commits into
python:mainfrom
AlexWaygood:literal-fixes

Conversation

Copy link
Copy Markdown
Member

Fixes #113. Closes #144.

Backports python/cpython#23294 and python/cpython#23383, both originally by Yurii Karabas.

Comment thread CHANGELOG.md
A side effect of one of the changes is that equality comparisons of `Literal`
objects will now raise a `TypeError` if one of the `Literal` objects being
compared has a mutable parameter. (Using mutable parameters with `Literal` is
not supported by PEP 586 or by any major static type checkers.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice dig against pyanalyze :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Oh entirely unintentional!! I can take this out if you like :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nah, it's true.

Copy link
Copy Markdown
Member

Seems like something's broken on 3.9.0.

Comment thread src/test_typing_extensions.py Outdated

Copy link
Copy Markdown
Member Author

Seems like something's broken on 3.9.0.

A result of python/cpython#19620. I'm looking at it.

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.

(🐞) Literal doesn't flatten it's arguments

2 participants


Back | FazBrowse Home | New Git URL