8000 gh-130870 Fix _eval_type Handling for GenericAlias with Unflattened Arguments and Union Types by sharktide · Pull Request #130897 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

gh-130870 Fix _eval_type Handling for GenericAlias with Unflattened Arguments and Union Types #130897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into patch-130870
  • Loading branch information
sharktide authored May 12, 2025
commit 07815ddf8243b8610a60ec0ea5e13e7a3406dfe0
4 changes: 3 additions & 1 deletion Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10669,7 +10669,6 @@ def test_eq(self):
with self.assertWarns(DeprecationWarning):
self.assertNotEqual(int, typing._UnionGenericAlias)

# Define MyType
class MyType:
pass

Expand Down Expand Up @@ -10770,6 +10769,9 @@ def func_packed(arg1: int, arg2: str) -> bool:
self.assertEqual(result['arg2'], str, f"Expected str for arg2, got {result['arg2']}")
self.assertEqual(result['return'], bool, f"Expected bool for return, got {result['return']}")

def test_hashable(self):
self.assertEqual(hash(typing._UnionGenericAlias), hash(Union))


def load_tests(loader, tests, pattern):
import doctest
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
0