From 09247f79379b411033cd0176e40e6a4e227ea2a2 Mon Sep 17 00:00:00 2001 From: Beto Dealmeida Date: Tue, 24 Sep 2024 13:16:22 -0400 Subject: [PATCH] Rebase --- .github/workflows/python-package-daily.yml | 6 ---- .github/workflows/python-package.yml | 6 ---- src/shillelagh/backends/multicorn/db.py | 28 ++++++++++++++++--- .../backends/multicorn/dialects/base.py | 1 - 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/python-package-daily.yml b/.github/workflows/python-package-daily.yml index a94a13a8..bd279d75 100644 --- a/.github/workflows/python-package-daily.yml +++ b/.github/workflows/python-package-daily.yml @@ -30,12 +30,6 @@ jobs: run: | python -m pip install --upgrade pip setuptools python -m pip install -e '.[testing]' - - name: Install multicorn2 - run: | - git clone https://github.com/pgsql-io/multicorn2.git - cd multicorn2 - git checkout v2.5 - pip install -e '.[testing]' - name: Test with pytest run: | pytest --cov-fail-under=100 --cov=src/shillelagh -vv tests/ --doctest-modules src/shillelagh --without-integration --without-slow-integration diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7e866a4d..4f008d91 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -31,12 +31,6 @@ jobs: run: | python -m pip install --upgrade pip setuptools python -m pip install -r requirements/test.txt - - name: Install multicorn2 - run: | - git clone https://github.com/pgsql-io/multicorn2.git - cd multicorn2 - git checkout v2.5 - pip install -r requirements/test.txt - name: Test with pytest run: | pre-commit run --all-files diff --git a/src/shillelagh/backends/multicorn/db.py b/src/shillelagh/backends/multicorn/db.py index d85e01aa..df826292 100644 --- a/src/shillelagh/backends/multicorn/db.py +++ b/src/shillelagh/backends/multicorn/db.py @@ -2,13 +2,13 @@ """ A DB API 2.0 wrapper. """ + import logging import re from typing import Any, Dict, List, Optional, Tuple, Type, Union, cast from uuid import uuid4 import psycopg2 -from multicorn import ForeignDataWrapper, Qual, SortKey from psycopg2 import extensions from shillelagh.adapters.base import Adapter @@ -20,14 +20,12 @@ IntegrityError, InterfaceError, InternalError, - NotSupportedError, OperationalError, ProgrammingError, Warning, ) from shillelagh.lib import ( combine_args_kwargs, - deserialize, escape_identifier, find_adapter, serialize, @@ -46,7 +44,29 @@ Timestamp, TimestampFromTicks, ) -from shillelagh.typing import Row + +__all__ = [ + "DatabaseError", + "DataError", + "Error", + "IntegrityError", + "InterfaceError", + "InternalError", + "OperationalError", + "BINARY", + "DATETIME", + "NUMBER", + "ROWID", + "STRING", + "Binary", + "Date", + "DateFromTicks", + "Time", + "TimeFromTicks", + "Timestamp", + "TimestampFromTicks", + "Warning", +] apilevel = "2.0" threadsafety = 2 diff --git a/src/shillelagh/backends/multicorn/dialects/base.py b/src/shillelagh/backends/multicorn/dialects/base.py index 6b6829bd..e3ea9872 100644 --- a/src/shillelagh/backends/multicorn/dialects/base.py +++ b/src/shillelagh/backends/multicorn/dialects/base.py @@ -18,7 +18,6 @@ class Multicorn2Dialect(PGDialect_psycopg2): - """ A SQLAlchemy dialect for Shillelagh based on psycopg2 and multicorn2. """