From 7381af778d209ef0c77bf08184f44ef8eb1bffa4 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 22 Nov 2020 18:46:55 +0000 Subject: [PATCH] Pure Python implementation called 'python', not 'ctypes' --- .travis.yml | 6 +++--- psycopg3/psycopg3/pq/__init__.py | 4 ++-- psycopg3/psycopg3/pq/pq_ctypes.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ebb68e133..3b8e4b559 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,7 +47,7 @@ matrix: - TOXENV=py36 - TOXDIR=psycopg3 - PGVER=9.6 - - PSYCOPG3_IMPL=ctypes + - PSYCOPG3_IMPL=python - PGPORT=5432 - python: 3.7 @@ -74,7 +74,7 @@ matrix: - TOXENV=py37 - TOXDIR=psycopg3 - PGVER=11 - - PSYCOPG3_IMPL=ctypes + - PSYCOPG3_IMPL=python - PGPORT=5433 - python: 3.8 @@ -102,7 +102,7 @@ matrix: - TOXENV=py38 - TOXDIR=psycopg3 - PGVER=12 - - PSYCOPG3_IMPL=ctypes + - PSYCOPG3_IMPL=python - PGPORT=5433 - BUILD_DOCS=1 diff --git a/psycopg3/psycopg3/pq/__init__.py b/psycopg3/psycopg3/pq/__init__.py index 6472fc83f..fa21c491b 100644 --- a/psycopg3/psycopg3/pq/__init__.py +++ b/psycopg3/psycopg3/pq/__init__.py @@ -64,12 +64,12 @@ def import_from_libpq() -> None: Escaping = pq_cython.Escaping return - if not impl or impl == "ctypes": + if not impl or impl == "python": try: from . import pq_ctypes except Exception as e: if not impl: - logger.debug("ctypes pq wrapper not available: %s", e) + logger.debug("python pq wrapper not available: %s", e) else: raise ImportError( f"requested pq implementation '{impl}' not available" diff --git a/psycopg3/psycopg3/pq/pq_ctypes.py b/psycopg3/psycopg3/pq/pq_ctypes.py index 5532540b0..da91410f3 100644 --- a/psycopg3/psycopg3/pq/pq_ctypes.py +++ b/psycopg3/psycopg3/pq/pq_ctypes.py @@ -34,7 +34,7 @@ from . import _pq_ctypes as impl if TYPE_CHECKING: from . import proto -__impl__ = "ctypes" +__impl__ = "python" logger = logging.getLogger("psycopg3") -- 2.47.3