[3.14] gh-137282: Fix TypeError in tab completion and dir() of concurrent.futures (GH-137214) (#137284)

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-08-08 17:13:22 +02:00 committed by GitHub
parent f17d77f112
commit 9e8a9ac11a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 1 deletions

View file

@ -44,7 +44,7 @@
def __dir__():
return __all__ + ('__author__', '__doc__')
return __all__ + ['__author__', '__doc__']
def __getattr__(name):

View file

@ -72,6 +72,8 @@ def check_all(self, modname):
all_set = set(all_list)
self.assertCountEqual(all_set, all_list, "in module {}".format(modname))
self.assertEqual(keys, all_set, "in module {}".format(modname))
# Verify __dir__ is non-empty and doesn't produce an error
self.assertTrue(dir(sys.modules[modname]))
def walk_modules(self, basedir, modpath):
for fn in sorted(os.listdir(basedir)):

View file

@ -0,0 +1 @@
Fix tab completion and :func:`dir` on :mod:`concurrent.futures`.