- [bug] Fixed bug whereby hybrid_property didn't
work as a kw arg in any(), has().
+- Py3K
+ - [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]
+
0.7.4
=====
- orm
l.pop('Unspecified')
return l
-if util.py3k:
+if util.py3k_warning:
_set_binop_bases = (set, frozenset)
else:
import sets
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from compat import callable, cmp, reduce, defaultdict, py25_dict, \
- threading, py3k, jython, pypy, win32, set_types, buffer, pickle, \
+ threading, py3k_warning, jython, pypy, win32, set_types, buffer, pickle, \
update_wrapper, partial, md5_hex, decode_slice, dottedgetter,\
parse_qsl
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
set_types = set, sets.Set
-if py3k:
+if py3k_warning:
import pickle
else:
try:
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__')
import sys
import types
import warnings
-from compat import update_wrapper, set_types, threading, callable, inspect_getfullargspec, py3k
+from compat import update_wrapper, set_types, threading, callable, inspect_getfullargspec, py3k_warning
from sqlalchemy import exc
def _unique_symbols(used, *bases):
else:
self_arg = None
- if py3k:
- apply_pos = inspect.formatargspec(spec[0], spec[1], spec[2], None, spec[4])
- num_defaults = 0
- if spec[3]:
- num_defaults += len(spec[3])
- if spec[4]:
- num_defaults += len(spec[4])
- name_args = spec[0] + spec[4]
- else:
- apply_pos = inspect.formatargspec(spec[0], spec[1], spec[2])
- num_defaults = 0
- if spec[3]:
- num_defaults += len(spec[3])
- name_args = spec[0]
+ # Py3K
+ #apply_pos = inspect.formatargspec(spec[0], spec[1], spec[2], None, spec[4])
+ #num_defaults = 0
+ #if spec[3]:
+ # num_defaults += len(spec[3])
+ #if spec[4]:
+ # num_defaults += len(spec[4])
+ #name_args = spec[0] + spec[4]
+ # Py2K
+ apply_pos = inspect.formatargspec(spec[0], spec[1], spec[2])
+ num_defaults = 0
+ if spec[3]:
+ num_defaults += len(spec[3])
+ name_args = spec[0]
+ # end Py2K
if num_defaults:
defaulted_vals = name_args[0-num_defaults:]
from test.bootstrap import config
from test.lib import assertsql, util as testutil
-from sqlalchemy.util import py3k, decorator
+from sqlalchemy.util import decorator
from engines import drop_all_tables
from sqlalchemy import exc as sa_exc, util, types as sqltypes, schema, \