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-103592: Add tests of `Literal` with `Enum` and `Union` of `Literal`s by sobolevn · Pull Request #103706 · python/cpython

Conversation

@sobolevn

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

Uh oh!

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

Copy link
Copy Markdown
Member

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

  • Issue: Incorrect deduplication of Enum values in Union[Literal[1], Literal[SomeEnum.one]] #103592

Sorry, something went wrong.

Uh oh!

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

All reactions
@sobolevn
pythongh-103592: Add tests of Literal with Enum and Union of `L…
e9ccdcc
…iteral`s
@sobolevn
sobolevn requested review from AlexWaygood, Fidget-Spinner, JelleZijlstra and gvanrossum as code owners April 23, 2023 09:33
@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Apr 23, 2023
@bedevere-bot bedevere-bot mentioned this pull request Apr 23, 2023
Incorrect deduplication of Enum values in Union[Literal[1], Literal[SomeEnum.one]] #103592
Closed
@bedevere-bot bedevere-bot added the awaiting review label Apr 23, 2023
@sobolevn sobolevn added the skip news label Apr 23, 2023
JelleZijlstra
JelleZijlstra approved these changes Apr 23, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Apr 23, 2023
@JelleZijlstra JelleZijlstra added the needs backport to 3.11 only security fixes label Apr 23, 2023
@AlexWaygood AlexWaygood added the topic-typing label Apr 23, 2023
AlexWaygood
AlexWaygood approved these changes Apr 23, 2023
View reviewed changes
@AlexWaygood
AlexWaygood merged commit 5041c2b into python:main Apr 23, 2023
@miss-islington

miss-islington commented 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.
🐍🍒⛏🤖

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 Apr 23, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 23, 2023
@sobolevn @miss-islington
pythongh-103592: Add tests of Literal with Enum and Union of `L…
14db874
…iteral`s (pythonGH-103706)

(cherry picked from commit 5041c2b)

Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-bot

bedevere-bot commented Apr 23, 2023

Copy link
Copy Markdown

GH-103720 is a backport of this pull request to the 3.11 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.11 only security fixes label Apr 23, 2023
@AlexWaygood

AlexWaygood commented Apr 23, 2023

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

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

AlexWaygood pushed a commit that referenced this pull request Apr 23, 2023
@miss-islington @sobolevn
[3.11] gh-103592: Add tests of Literal with Enum and Union of `…
4e9635e
…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 <[email protected]>
@sobolevn

sobolevn commented Apr 23, 2023 •
edited
Loading

Uh oh!

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

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.

AlexWaygood reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

This was referenced Apr 24, 2023
types.UnionType + Literal types are not tested together #103746
Closed
gh-103746: Test types.UnionType and Literal types together #103747
Merged
Backport tests of Union + Literal from CPython python/typing_extensions#152
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra approved these changes
@AlexWaygood AlexWaygood AlexWaygood approved these changes
@gvanrossum gvanrossum Awaiting requested review from gvanrossum
@Fidget-Spinner Fidget-Spinner Awaiting requested review from Fidget-Spinner

Uh oh!

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

Assignees

No one assigned

Labels

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

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.

5 participants

@sobolevn @miss-islington @bedevere-bot @AlexWaygood @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.