[Python-checkins] Fix a deprecation warning in typing tests (#27312)
gvanrossum
webhook-mailer at python.org
Fri Jul 23 14:53:37 EDT 2021
https://github.com/python/cpython/commit/4512848ab92c8ed6aafb54d6e1908b1074558c43
commit: 4512848ab92c8ed6aafb54d6e1908b1074558c43
branch: main
author: Sebastian Rittau <srittau at rittau.biz>
committer: gvanrossum <gvanrossum at gmail.com>
date: 2021-07-23T11:53:29-07:00
summary:
Fix a deprecation warning in typing tests (#27312)
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.
files:
M Lib/test/test_typing.py
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index ebe6c8d37e501..bfa5755304d31 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -4653,9 +4653,6 @@ def test_all_exported_names(self):
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
More information about the Python-checkins
mailing list