Commit 526a0905 authored by Fantix King's avatar Fantix King Committed by Denis Bilenko

fix pyflakes warnings on PY3

parent 85040239
...@@ -41,9 +41,10 @@ if PY3: ...@@ -41,9 +41,10 @@ if PY3:
raise value raise value
else: else:
string_types = basestring, import __builtin__
integer_types = (int, long) string_types = __builtin__.basestring,
xrange = xrange integer_types = (int, __builtin__.long)
xrange = __builtin__.xrange
from gevent._util_py2 import reraise from gevent._util_py2 import reraise
......
...@@ -18,7 +18,8 @@ __all__ = ['patch_all', ...@@ -18,7 +18,8 @@ __all__ = ['patch_all',
if sys.version_info[0] >= 3: if sys.version_info[0] >= 3:
string_types = str, string_types = str,
else: else:
string_types = basestring, import __builtin__
string_types = __builtin__.basestring
# maps module name -> attribute name -> original item # maps module name -> attribute name -> original item
......
...@@ -34,5 +34,6 @@ else: ...@@ -34,5 +34,6 @@ else:
locs = globs locs = globs
exec("""exec code in globs, locs""") exec("""exec code in globs, locs""")
xrange = xrange import __builtin__ as builtins
string_types = basestring, xrange = builtins.xrange
string_types = builtins.basestring,
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment