summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/dialects/oracle/cx_oracle.py3
-rw-r--r--lib/sqlalchemy/orm/properties.py2
-rw-r--r--lib/sqlalchemy/types.py9
3 files changed, 12 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py
index 8d69194e6..44344d165 100644
--- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py
+++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py
@@ -145,6 +145,9 @@ class _OracleUnicodeText(sqltypes.UnicodeText):
return value
return process
else:
+ # TODO: this is wrong - we are getting a LOB here
+ # no matter what version of oracle, so process()
+ # is still needed
return super(_OracleUnicodeText, self).result_processor(dialect, coltype)
class _OracleInteger(sqltypes.Integer):
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py
index 7d078cf12..1bb850488 100644
--- a/lib/sqlalchemy/orm/properties.py
+++ b/lib/sqlalchemy/orm/properties.py
@@ -23,7 +23,7 @@ from sqlalchemy.orm.interfaces import (
MANYTOMANY, MANYTOONE, MapperProperty, ONETOMANY, PropComparator,
StrategizedProperty,
)
-from types import NoneType
+NoneType = type(None)
__all__ = ('ColumnProperty', 'CompositeProperty', 'SynonymProperty',
'ComparableProperty', 'RelationProperty', 'BackRef')
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py
index fa7e4d9f4..571cd967c 100644
--- a/lib/sqlalchemy/types.py
+++ b/lib/sqlalchemy/types.py
@@ -849,6 +849,8 @@ class Binary(TypeEngine):
"""
self.length = length
+ # Python 3 - sqlite3 doesn't need the `Binary` conversion
+ # here, though pg8000 does to indicate "bytea"
def bind_processor(self, dialect):
DBAPIBinary = dialect.dbapi.Binary
def process(value):
@@ -858,6 +860,10 @@ class Binary(TypeEngine):
return None
return process
+ # Python 3 has native bytes() type
+ # both sqlite3 and pg8000 seem to return it
+ # (i.e. and not 'memoryview')
+ # Py2K
def result_processor(self, dialect, coltype):
if util.jython:
def process(value):
@@ -874,7 +880,8 @@ class Binary(TypeEngine):
else:
return None
return process
-
+ # end Py2K
+
def adapt(self, impltype):
return impltype(length=self.length)