Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

cytora / gevent   python

Repository URL to install this package:

Version: 1.4.0 

/ tests / test__monkey_builtins_future.py

# 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()