-
Notifications
You must be signed in to change notification settings - Fork 361
Closed
Labels
Description
When testing SQLAlchemy against cx_Oracle master (version 8), our dialect can't work anymore because cx_Oracle types like BLOB, DATETIME are no longer hashable.
Behavior in cx_Oracle 7.x:
Python 3.7.6 (default, Dec 19 2019, 22:50:01)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>> cx_Oracle.__version__
'7.2.3'
>>> s = {cx_Oracle.DATETIME, cx_Oracle.CLOB}
>>>
behavior in cx_Oracle 8:
Python 3.7.6 (default, Dec 19 2019, 22:50:01)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>> cx_Oracle.__version__
'8.0.0-dev'
>>> s = {cx_Oracle.DATETIME, cx_Oracle.CLOB}
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'cx_Oracle.DbType'
SQLAlchemy uses sets of cx_Oracle datatypes in order to automate processes that later make calls to things like cursor.setinputsizes() for certain kinds of types. SQLAlchemy can be modified to work around this issue however I don't see why it's unreasonable that a DBAPI datatype object be hashable.