diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-15 10:31:55 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-15 10:31:55 -0500 |
commit | 5c86d3914cb2ddb3333f47e35f5fe7a34bca882b (patch) | |
tree | 72d07417bbb605b85284295fcd24769a906e1256 /lib/sqlalchemy/util/compat.py | |
parent | 5e2930e0458df071410c4ac8fa6153989829e67a (diff) | |
download | sqlalchemy-5c86d3914cb2ddb3333f47e35f5fe7a34bca882b.tar.gz |
- [bug] Fixed inappropriate usage of util.py3k
flag and renamed it to util.py3k_warning, since
this flag is intended to detect the -3 flag
series of import restrictions only.
[ticket:2348]
Diffstat (limited to 'lib/sqlalchemy/util/compat.py')
-rw-r--r-- | lib/sqlalchemy/util/compat.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/sqlalchemy/util/compat.py b/lib/sqlalchemy/util/compat.py index 380e3a9a5..18549c8b9 100644 --- a/lib/sqlalchemy/util/compat.py +++ b/lib/sqlalchemy/util/compat.py @@ -18,12 +18,12 @@ except ImportError: import dummy_threading as threading py32 = sys.version_info >= (3, 2) -py3k = getattr(sys, 'py3kwarning', False) or sys.version_info >= (3, 0) +py3k_warning = getattr(sys, 'py3kwarning', False) or sys.version_info >= (3, 0) jython = sys.platform.startswith('java') pypy = hasattr(sys, 'pypy_version_info') win32 = sys.platform.startswith('win') -if py3k: +if py3k_warning: set_types = set elif sys.version_info < (2, 6): import sets @@ -43,7 +43,7 @@ else: set_types = set, sets.Set -if py3k: +if py3k_warning: import pickle else: try: @@ -89,12 +89,13 @@ if sys.version_info < (2, 6): else: from urlparse import parse_qsl -if py3k: - from inspect import getfullargspec as inspect_getfullargspec -else: - from inspect import getargspec as inspect_getfullargspec +# Py3K +#from inspect import getfullargspec as inspect_getfullargspec +# Py2K +from inspect import getargspec as inspect_getfullargspec +# end Py2K -if py3k: +if py3k_warning: # they're bringing it back in 3.2. brilliant ! def callable(fn): return hasattr(fn, '__call__') |