Commit 65bc6205 authored by Ivan Levkivskyi's avatar Ivan Levkivskyi Committed by Łukasz Langa

bpo-28556: Minor updates to typing module (#3550)

* Copy changes to typing from upstream repo
* Add NEWS entry
parent f6e61df0
...@@ -1069,6 +1069,13 @@ class GenericTests(BaseTestCase): ...@@ -1069,6 +1069,13 @@ class GenericTests(BaseTestCase):
for t in things + [Any]: for t in things + [Any]:
self.assertEqual(t, copy(t)) self.assertEqual(t, copy(t))
self.assertEqual(t, deepcopy(t)) self.assertEqual(t, deepcopy(t))
if sys.version_info >= (3, 3):
# From copy module documentation:
# It does "copy" functions and classes (shallow and deeply), by returning
# the original object unchanged; this is compatible with the way these
# are treated by the pickle module.
self.assertTrue(t is copy(t))
self.assertTrue(t is deepcopy(t))
def test_weakref_all(self): def test_weakref_all(self):
T = TypeVar('T') T = TypeVar('T')
......
This diff is collapsed.
Speed improvements to the ``typing`` module. Original PRs by Ivan
Levkivskyi and Mitar.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment