You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/gevent/tests/test__monkey_builtins_futur...

17 lines
521 B

# Under Python 2, if the `future` module is installed, we get
# a `builtins` module, which mimics the `builtins` module from
# Python 3, but does not have the __import__ and some other functions.
# Make sure we can still run in that case.
import sys
try:
# fake out a "broken" builtins module
import builtins
except ImportError:
class builtins(object):
pass
sys.modules['builtins'] = builtins()
if not hasattr(builtins, '__import__'):
import gevent.monkey
gevent.monkey.patch_builtins()