diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-09-22 20:35:40 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-09-22 20:35:40 -0400 |
commit | 08a6a8b51916ab1d084a0070bbb07001cabb1c38 (patch) | |
tree | 3c5db3bfafcc18b33d510d246e69db41cb4eb0e0 | |
parent | c3c4b2d23dacc9e7e3b772c8384fa129db7d20d5 (diff) | |
download | sqlalchemy-08a6a8b51916ab1d084a0070bbb07001cabb1c38.tar.gz |
- Removed some now unneeded version checks [ticket:2829] courtesy alex gaynor
-rw-r--r-- | lib/sqlalchemy/exc.py | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/util/queue.py | 9 | ||||
-rw-r--r-- | test/aaa_profiling/test_zoomark.py | 1 | ||||
-rw-r--r-- | test/aaa_profiling/test_zoomark_orm.py | 1 | ||||
-rw-r--r-- | test/dialect/postgresql/test_types.py | 2 | ||||
-rw-r--r-- | test/engine/test_execute.py | 1 | ||||
-rw-r--r-- | test/engine/test_pool.py | 1 | ||||
-rw-r--r-- | test/ext/test_mutable.py | 6 | ||||
-rw-r--r-- | test/ext/test_serializer.py | 2 | ||||
-rw-r--r-- | test/orm/test_collection.py | 9 | ||||
-rw-r--r-- | test/orm/test_session.py | 1 | ||||
-rw-r--r-- | test/requirements.py | 14 | ||||
-rw-r--r-- | test/sql/test_compiler.py | 4 | ||||
-rw-r--r-- | test/sql/test_operators.py | 1 |
14 files changed, 5 insertions, 51 deletions
diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py index cfd1e2bc7..7ebdc3983 100644 --- a/lib/sqlalchemy/exc.py +++ b/lib/sqlalchemy/exc.py @@ -187,10 +187,6 @@ class DontWrapMixin(object): raise MyCustomException("invalid!") """ -import sys -if sys.version_info < (2, 5): - class DontWrapMixin: - pass # Moved to orm.exc; compatibility definition installed by orm import until 0.6 UnmappedColumnError = None diff --git a/lib/sqlalchemy/util/queue.py b/lib/sqlalchemy/util/queue.py index 537526bef..b66738aff 100644 --- a/lib/sqlalchemy/util/queue.py +++ b/lib/sqlalchemy/util/queue.py @@ -25,14 +25,7 @@ within QueuePool. from collections import deque from time import time as _time from .compat import threading -import sys -if sys.version_info < (2, 6): - def notify_all(condition): - condition.notify() -else: - def notify_all(condition): - condition.notify_all() __all__ = ['Empty', 'Full', 'Queue', 'SAAbort'] @@ -195,7 +188,7 @@ class Queue: if not self.not_full.acquire(False): return try: - notify_all(self.not_empty) + self.not_empty.notify_all() finally: self.not_full.release() diff --git a/test/aaa_profiling/test_zoomark.py b/test/aaa_profiling/test_zoomark.py index 145f3c594..d850782e0 100644 --- a/test/aaa_profiling/test_zoomark.py +++ b/test/aaa_profiling/test_zoomark.py @@ -30,7 +30,6 @@ class ZooMarkTest(fixtures.TestBase): """ __requires__ = 'cpython', __only_on__ = 'postgresql+psycopg2' - __skip_if__ = lambda : sys.version_info < (2, 5), def test_baseline_0_setup(self): global metadata diff --git a/test/aaa_profiling/test_zoomark_orm.py b/test/aaa_profiling/test_zoomark_orm.py index ddcad681a..c9d1438aa 100644 --- a/test/aaa_profiling/test_zoomark_orm.py +++ b/test/aaa_profiling/test_zoomark_orm.py @@ -32,7 +32,6 @@ class ZooMarkTest(fixtures.TestBase): __requires__ = 'cpython', __only_on__ = 'postgresql+psycopg2' - __skip_if__ = lambda : sys.version_info < (2, 5), def test_baseline_0_setup(self): global metadata, session diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index 784f8bcbf..aed77add5 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -918,7 +918,6 @@ class UUIDTest(fixtures.TestBase): __only_on__ = 'postgresql' - @testing.requires.python25 @testing.fails_on('postgresql+zxjdbc', 'column "data" is of type uuid but expression is of type character varying') @testing.fails_on('postgresql+pg8000', 'No support for UUID type') @@ -932,7 +931,6 @@ class UUIDTest(fixtures.TestBase): str(uuid.uuid4()) ) - @testing.requires.python25 @testing.fails_on('postgresql+zxjdbc', 'column "data" is of type uuid but expression is of type character varying') @testing.fails_on('postgresql+pg8000', 'No support for UUID type') diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py index 9623c080a..b116e4d6b 100644 --- a/test/engine/test_execute.py +++ b/test/engine/test_execute.py @@ -930,7 +930,6 @@ class ResultProxyTest(fixtures.TestBase): eq_(len(mock_rowcount.__get__.mock_calls), 2) - @testing.requires.python26 def test_rowproxy_is_sequence(self): import collections from sqlalchemy.engine import RowProxy diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py index 3f1d9d0ef..a198576d3 100644 --- a/test/engine/test_pool.py +++ b/test/engine/test_pool.py @@ -911,7 +911,6 @@ class QueuePoolTest(PoolTestBase): eq_(len(success), 12, "successes: %s" % success) @testing.requires.threading_with_mock - @testing.requires.python26 def test_notify_waiters(self): dbapi = MockDBAPI() canary = [] diff --git a/test/ext/test_mutable.py b/test/ext/test_mutable.py index 25c182f1d..ee1b8075e 100644 --- a/test/ext/test_mutable.py +++ b/test/ext/test_mutable.py @@ -153,9 +153,6 @@ class MutableWithScalarPickleTest(_MutableDictTestBase, fixtures.MappedTest): self._test_non_mutable() class MutableWithScalarJSONTest(_MutableDictTestBase, fixtures.MappedTest): - # json introduced in 2.6 - __skip_if__ = lambda: sys.version_info < (2, 6), - @classmethod def define_tables(cls, metadata): import json @@ -245,9 +242,6 @@ class MutableAssociationScalarPickleTest(_MutableDictTestBase, fixtures.MappedTe ) class MutableAssociationScalarJSONTest(_MutableDictTestBase, fixtures.MappedTest): - # json introduced in 2.6 - __skip_if__ = lambda: sys.version_info < (2, 6), - @classmethod def define_tables(cls, metadata): import json diff --git a/test/ext/test_serializer.py b/test/ext/test_serializer.py index 84fff1304..64a2d5a42 100644 --- a/test/ext/test_serializer.py +++ b/test/ext/test_serializer.py @@ -77,7 +77,6 @@ class SerializeTest(fixtures.MappedTest): assert serializer.loads(serializer.dumps(User.name, -1), None, None) is User.name - @testing.requires.python26 # crashes in 2.5 def test_expression(self): expr = \ select([users]).select_from(users.join(addresses)).limit(5) @@ -149,7 +148,6 @@ class SerializeTest(fixtures.MappedTest): assert j2.right is j.right assert j2._target_adapter._next - @testing.requires.python26 # namedtuple workaround not serializable in 2.5 @testing.exclude('sqlite', '<=', (3, 5, 9), 'id comparison failing on the buildbot') def test_aliases(self): diff --git a/test/orm/test_collection.py b/test/orm/test_collection.py index 4eb8b3fee..f6493f1a8 100644 --- a/test/orm/test_collection.py +++ b/test/orm/test_collection.py @@ -981,11 +981,10 @@ class CollectionsTest(fixtures.ORMTest): control.update(d) assert_eq() - if sys.version_info >= (2, 4): - kw = dict([(ee.a, ee) for ee in [e, creator()]]) - direct.update(**kw) - control.update(**kw) - assert_eq() + kw = dict([(ee.a, ee) for ee in [e, creator()]]) + direct.update(**kw) + control.update(**kw) + assert_eq() def _test_dict_bulk(self, typecallable, creator=None): if creator is None: diff --git a/test/orm/test_session.py b/test/orm/test_session.py index a4d5b6ce6..34b0c7eff 100644 --- a/test/orm/test_session.py +++ b/test/orm/test_session.py @@ -435,7 +435,6 @@ class SessionStateTest(_fixtures.FixtureTest): eq_(bind.connect().execute("select count(1) from users").scalar(), 1) sess.close() - @testing.requires.python26 def test_with_no_autoflush(self): User, users = self.classes.User, self.tables.users diff --git a/test/requirements.py b/test/requirements.py index 2bd395404..cd59e5249 100644 --- a/test/requirements.py +++ b/test/requirements.py @@ -555,20 +555,6 @@ class DefaultRequirements(SuiteRequirements): ) @property - def python26(self): - return skip_if( - lambda: sys.version_info < (2, 6), - "Python version 2.6 or greater is required" - ) - - @property - def python25(self): - return skip_if( - lambda: sys.version_info < (2, 5), - "Python version 2.5 or greater is required" - ) - - @property def cpython(self): return only_if(lambda: util.cpython, "cPython interpreter needed" diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index a3ec3af84..cd8ac2aef 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -2785,10 +2785,6 @@ class DDLTest(fixtures.TestBase, AssertsCompiledSQL): schema.CreateTable(t1).compile ) - # there's some unicode issue in the assertion - # regular expression that appears to be resolved - # in 2.6, not exactly sure what it is - @testing.requires.python26 def test_reraise_of_column_spec_issue_unicode(self): MyType = self._illegal_type_fixture() t1 = Table('t', MetaData(), diff --git a/test/sql/test_operators.py b/test/sql/test_operators.py index ce91c5b5e..97ce3d3dd 100644 --- a/test/sql/test_operators.py +++ b/test/sql/test_operators.py @@ -352,7 +352,6 @@ class ExtensionOperatorTest(fixtures.TestBase, testing.AssertsCompiledSQL): "x -> :x_1" ) - @testing.requires.python26 def test_op_not_an_iterator(self): # see [ticket:2726] class MyType(UserDefinedType): |