]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a deprecation warning in typing tests (#27312)
authorSebastian Rittau <srittau@rittau.biz>
Fri, 23 Jul 2021 18:53:29 +0000 (20:53 +0200)
committerGitHub <noreply@github.com>
Fri, 23 Jul 2021 18:53:29 +0000 (11:53 -0700)
The test was accessing typing.{io,re}.__all__, which triggered the
warning. This check isn't necessary anymore, since the objects from
typing.{io,re}.__all__ are in typing.__all__ as well, since Python 3.10.

Lib/test/test_typing.py

index ebe6c8d37e501f1e0c487da77faeb6c0eab3e364..bfa5755304d3101060604b2870983b69c1581869 100644 (file)
@@ -4653,9 +4653,6 @@ class AllTests(BaseTestCase):
             if k in actual_all or (
                 # avoid private names
                 not k.startswith('_') and
-                # avoid things in the io / re typing submodules
-                k not in typing.io.__all__ and
-                k not in typing.re.__all__ and
                 k not in {'io', 're'} and
                 # there's a few types and metaclasses that aren't exported
                 not k.endswith(('Meta', '_contra', '_co')) and