summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-06-05 17:34:02 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-06-05 17:34:02 -0400
commit4e6ec9eef4e65c6efabae36b2307f2ad167977da (patch)
treef8b2c9f7ef4b4053a2f0ab6a4847d597d72838f6 /lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
parent4c90f355fd552e70009ffcdf3fdde9f3653e337e (diff)
downloadsqlalchemy-4e6ec9eef4e65c6efabae36b2307f2ad167977da.tar.gz
- Repaired some typing and test issues related to the pypy
psycopg2cffi dialect, in particular that the current 2.7.0 version does not have native support for the JSONB type. The version detection for psycopg2 features has been tuned into a specific sub-version for psycopg2cffi. Additionally, test coverage has been enabled for the full series of psycopg2 features under psycopg2cffi. fixes #3439
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py b/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
index f5c475d90..f0fe23df3 100644
--- a/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
+++ b/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
@@ -31,6 +31,18 @@ class PGDialect_psycopg2cffi(PGDialect_psycopg2):
driver = 'psycopg2cffi'
supports_unicode_statements = True
+ # psycopg2cffi's first release is 2.5.0, but reports
+ # __version__ as 2.4.4. Subsequent releases seem to have
+ # fixed this.
+
+ FEATURE_VERSION_MAP = dict(
+ native_json=(2, 4, 4),
+ native_jsonb=(99, 99, 99),
+ sane_multi_rowcount=(2, 4, 4),
+ array_oid=(2, 4, 4),
+ hstore_adapter=(2, 4, 4)
+ )
+
@classmethod
def dbapi(cls):
return __import__('psycopg2cffi')