]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix _assert_unorderable_types on py36.
authorIuri de Silvio <iurisilvio@gmail.com>
Mon, 30 Nov 2015 14:11:02 +0000 (12:11 -0200)
committerIuri de Silvio <iurisilvio@gmail.com>
Mon, 30 Nov 2015 16:50:25 +0000 (14:50 -0200)
The error message changed to:

`'<' not supported between instances of 'foo' and 'bar'`

lib/sqlalchemy/util/__init__.py
lib/sqlalchemy/util/compat.py
test/base/test_utils.py

index 36a81dbce882ade27b3382d00f6656fbfddffa9f..a15ca8efac703924eaf9716e10bd8a8013b5cb45 100644 (file)
@@ -6,7 +6,7 @@
 # the MIT License: http://www.opensource.org/licenses/mit-license.php
 
 from .compat import callable, cmp, reduce,  \
-    threading, py3k, py33, py2k, jython, pypy, cpython, win32, \
+    threading, py3k, py33, py36, py2k, jython, pypy, cpython, win32, \
     pickle, dottedgetter, parse_qsl, namedtuple, next, reraise, \
     raise_from_cause, text_type, safe_kwarg, string_types, int_types, \
     binary_type, nested, \
index 5b6f691f1c183fdbf82bd7ba4bb7fcef8e72d283..25c88c662fa538ab1ebd08210164c9a706d75f62 100644 (file)
@@ -14,6 +14,7 @@ try:
 except ImportError:
     import dummy_threading as threading
 
+py36 = sys.version_info >= (3, 6)
 py33 = sys.version_info >= (3, 3)
 py32 = sys.version_info >= (3, 2)
 py3k = sys.version_info >= (3, 0)
index c1027ec8ea230bc68c0e0a6f551b4c50728b0d01..4370d612b648295daf5674047576095f68088a1e 100644 (file)
@@ -1200,7 +1200,10 @@ class IdentitySetTest(fixtures.TestBase):
         return super_, sub_, twin1, twin2, unique1, unique2
 
     def _assert_unorderable_types(self, callable_):
-        if util.py3k:
+        if util.py36:
+            assert_raises_message(
+                TypeError, 'not supported between instances of', callable_)
+        elif util.py3k:
             assert_raises_message(
                 TypeError, 'unorderable types', callable_)
         else: