8000 bpo-43224: Implement pickling of TypeVarTuples by mrahtz · Pull Request #32119 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43224: Implement pickling of TypeVarTuples #32119

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

Merged
merged 12 commits into from
Apr 22, 2022
Merged
Prev Previous commit
Next Next commit
Remove test_pickling_then_unpickling_variadic_class_results_in_equality
  • Loading branch information
mrahtz committed Apr 15, 2022
commit 8fd2b4f8462ad76a3f61df022372de07efba03f5
16 changes: 0 additions & 16 deletions < 9B02 span class="Truncate"> Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,22 +928,6 @@ def test_pickling_then_unpickling_unpacked_results_in_equality(self, proto):
unpacked2 = pickle.loads(pickle.dumps(unpacked1, proto))
self.assertEqual(unpacked1, unpacked2)

@all_pickle_protocols
def test_pickling_then_unpickling_variadic_class_results_in_equality(
self, proto
):
global T, Ts, A1, B1 # See explanation at start of class.
T = TypeVar('T')
Ts = TypeVarTuple('Ts')

class A1(Generic[Unpack[Ts]]): pass
A2 = pickle.loads(pickle.dumps(A1, proto))
self.assertEqual(A1, A2)

class B1(Generic[T, Unpack[Ts]]): pass
B2 = pickle.loads(pickle.dumps(B1, proto))
self.assertEqual(B1, B2)

@all_pickle_protocols
def test_pickling_then_unpickling_tuple_with_typevartuple_equality(
self, proto
Expand Down
0