← 返回首页
gh-103592: Add tests of `Literal` with `Enum` and `Union` of `Literal`s by sobolevn · Pull Request #103706 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-103592: Add tests of Literal with Enum and Union of Literals#103706

Merged
AlexWaygood merged 1 commit into
python:mainfrom
sobolevn:issue-103592
Apr 23, 2023
Merged

gh-103592: Add tests of Literal with Enum and Union of Literals#103706
AlexWaygood merged 1 commit into
python:mainfrom
sobolevn:issue-103592

Conversation

sobolevn commented Apr 23, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

These tests should catch theoretical future regressions similar to ones described in #103592

AlexWaygood merged commit 5041c2b into python:main Apr 23, 2023

Copy link
Copy Markdown
Contributor

Thanks @sobolevn for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 23, 2023
…iteral`s (pythonGH-103706) (cherry picked from commit 5041c2b) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Copy link
Copy Markdown

GH-103720 is a backport of this pull request to the 3.11 branch.

bedevere-bot removed the needs backport to 3.11 only security fixes label Apr 23, 2023

Copy link
Copy Markdown
Member

@sobolevn, are you up for backporting these tests to typing_extensions as well?

AlexWaygood pushed a commit that referenced this pull request Apr 23, 2023
…Literal`s (GH-103706) (#103720) gh-103592: Add tests of `Literal` with `Enum` and `Union` of `Literal`s (GH-103706) (cherry picked from commit 5041c2b) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

sobolevn commented Apr 23, 2023
edited
Loading

Copy link
Copy Markdown
Member Author

Now I realized that I've missed | unions in this PR. Can I please add one more PR with an extra test to test_types?

@AlexWaygood Yeah, sure. Will do tomorrow.

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

skip news tests Tests in the Lib/test dir topic-typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Footer

© 2026 GitHub, Inc.