diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-27 14:17:10 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-27 14:17:10 -0500 |
| commit | fe2d3e0aa25d58e1b1b352e98792ac62f4cd315c (patch) | |
| tree | 08133f82073fea74c8f9ff26ef7e541c033d91b7 | |
| parent | bfbc0a08f6024ec3016f0fd10359da9356928468 (diff) | |
| download | sqlalchemy-fe2d3e0aa25d58e1b1b352e98792ac62f4cd315c.tar.gz | |
py3k fixes
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 3 | ||||
| -rw-r--r-- | test/aaa_profiling/test_compiler.py | 6 | ||||
| -rw-r--r-- | test/aaa_profiling/test_orm.py | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 9efb5e5f4..4d36838cd 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -144,7 +144,8 @@ class DefaultDialect(base.Dialect): 'description_encoding', encoding) - self._description_decoder = processors.to_unicode_processor_factory( + if self.description_encoding: + self._description_decoder = processors.to_unicode_processor_factory( self.description_encoding ) self._encoder = codecs.getencoder(self.encoding) diff --git a/test/aaa_profiling/test_compiler.py b/test/aaa_profiling/test_compiler.py index 5afcf69bc..d77624cb5 100644 --- a/test/aaa_profiling/test_compiler.py +++ b/test/aaa_profiling/test_compiler.py @@ -33,7 +33,7 @@ class CompileTest(TestBase, AssertsExecutionResults): cls.dialect = default.DefaultDialect() @profiling.function_call_count(versions={'2.7':58, '2.6':58, - '3.0':77, '3.1':77}) + '3':64}) def test_insert(self): t1.insert().compile(dialect=self.dialect) @@ -41,12 +41,12 @@ class CompileTest(TestBase, AssertsExecutionResults): def test_update(self): t1.update().compile(dialect=self.dialect) - @profiling.function_call_count(versions={'2.6':110, '2.7':110, '2.4': 81, '3':132}) + @profiling.function_call_count(versions={'2.6':110, '2.7':110, '2.4': 81, '3':115}) def test_update_whereclause(self): t1.update().where(t1.c.c2==12).compile(dialect=self.dialect) @profiling.function_call_count(versions={'2.7':148, '2.6':148, - '3.0':208, '3.1':208}) + '3':161}) def test_select(self): s = select([t1], t1.c.c2==t2.c.c1) s.compile(dialect=self.dialect) diff --git a/test/aaa_profiling/test_orm.py b/test/aaa_profiling/test_orm.py index 519a29c29..e226454b6 100644 --- a/test/aaa_profiling/test_orm.py +++ b/test/aaa_profiling/test_orm.py @@ -54,7 +54,7 @@ class MergeTest(_base.MappedTest): # bigger operation so using a small variance @profiling.function_call_count(80, variance=0.05, - versions={'2.4': 64, '2.5':94, '3': 89}) + versions={'2.4': 64, '2.5':94, '3': 83}) def go(): return sess2.merge(p1, load=False) p2 = go() |
