bpo-32226: PEP 560: improve typing module (#4906)

This PR re-designs the internal typing API using the new PEP 560 features.
However, there are only few minor changes in the public API.
This commit is contained in:
Ivan Levkivskyi 2018-01-20 11:23:59 +00:00 committed by GitHub
parent d57f26c753
commit d911e40e78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 771 additions and 1640 deletions

View file

@ -827,7 +827,7 @@ class TestDescriptions(unittest.TestCase):
'f\x08fo\x08oo\x08o(data: List[Any], x: int)'
' -> Iterator[Tuple[int, Any]]')
self.assertEqual(pydoc.render_doc(C).splitlines()[2],
'class C\x08C(typing.Mapping)')
'class C\x08C(collections.abc.Mapping, typing.Generic)')
def test_builtin(self):
for name in ('str', 'str.translate', 'builtins.str',