diff --git a/Lib/test/_mock_backport.py b/Lib/test/_mock_backport.py index d394831..f85becb 100644 --- a/Lib/test/_mock_backport.py +++ b/Lib/test/_mock_backport.py @@ -24,6 +24,7 @@ __all__ = ( __version__ = '1.0' +import __builtin__ import inspect import pprint import sys @@ -32,7 +33,7 @@ from types import ModuleType from functools import wraps, partial -_builtins = {name for name in __builtins__ if not name.startswith('_')} +_builtins = {name for name in dir(__builtin__) if not name.startswith('_')} BaseExceptions = (BaseException,) if 'java' in sys.platform: