From ddf413378bf2b83a5e7274c4ec56cc0781c91997 Mon Sep 17 00:00:00 2001 From: Adam Greene Date: Wed, 2 Jun 2021 14:03:44 -0400 Subject: [PATCH 1/3] Add explicit psycopg2 dependency for setuptools to avoid blowing up at import time when psycopg2 isn't installed --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 295eee2..078a8c8 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ url='https://github.com/mahmoudimus/sqlalchemy-citext', install_requires=[ 'SQLAlchemy>=0.6', + 'psycopg2' ], test_suite='tests', license='BSD', From 42c863467d7d918f81bb020508d3ef747e15e2ea Mon Sep 17 00:00:00 2001 From: Adam Greene Date: Wed, 2 Jun 2021 14:05:29 -0400 Subject: [PATCH 2/3] Add psycopg2 to requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 10e5582..0705143 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -SQLAlchemy>=0.6 \ No newline at end of file +SQLAlchemy>=0.6 +psycopg2 \ No newline at end of file From a390b8949a86f1a8aa80473851369d4b88e20f29 Mon Sep 17 00:00:00 2001 From: AG Date: Tue, 4 Apr 2023 10:34:30 -0400 Subject: [PATCH 3/3] Update __init__.py --- citext/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/citext/__init__.py b/citext/__init__.py index b9c4bd9..849f628 100644 --- a/citext/__init__.py +++ b/citext/__init__.py @@ -12,6 +12,7 @@ class CIText(types.Concatenable, types.UserDefinedType): # This is copied from the `literal_processor` of sqlalchemy's own `String` # type. + cache_ok = True def literal_processor(self, dialect): def process(value): value = value.replace("'", "''")