summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-10-27 22:52:39 +0200
committerFederico Caselli <cfederico87@gmail.com>2021-10-31 19:03:12 +0100
commit6b08ae70253d2fbd867aa6fca794e5648aa83a0e (patch)
tree252ec7454106ed228fda989f34ae54c6e0fce329 /lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
parenta1adb21cbe83ecce467194ab0e3277db581dfa4d (diff)
downloadsqlalchemy-6b08ae70253d2fbd867aa6fca794e5648aa83a0e.tar.gz
Update psycopg2 dialect to use the DBAPI interface to execute
two phase transactions Fixes: #7238 Change-Id: Ie4f5cf59d29b5bfc142ec2dfdecffb896ee7d708
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py b/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
index 5be52a870..05f1837c6 100644
--- a/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
+++ b/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py
@@ -23,6 +23,7 @@ is as per ``psycopg2``.
""" # noqa
from .psycopg2 import PGDialect_psycopg2
+from ... import util
class PGDialect_psycopg2cffi(PGDialect_psycopg2):
@@ -46,12 +47,12 @@ class PGDialect_psycopg2cffi(PGDialect_psycopg2):
def dbapi(cls):
return __import__("psycopg2cffi")
- @classmethod
+ @util.memoized_property
def _psycopg2_extensions(cls):
root = __import__("psycopg2cffi", fromlist=["extensions"])
return root.extensions
- @classmethod
+ @util.memoized_property
def _psycopg2_extras(cls):
root = __import__("psycopg2cffi", fromlist=["extras"])
return root.extras