Skip to content

Commit 4cd8167

Browse files
authored
Chore: Bump CDK dependency, DuckDB, Postgres, Pandas, and others (#383)
1 parent b22a6b4 commit 4cd8167

File tree

11 files changed

+265
-82
lines changed

11 files changed

+265
-82
lines changed

airbyte/_processors/sql/postgres.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class PostgresConfig(SqlConfig):
2929
def get_sql_alchemy_url(self) -> SecretString:
3030
"""Return the SQLAlchemy URL to use."""
3131
return SecretString(
32-
f"postgresql+psycopg2://{self.username}:{self.password}@{self.host}:{self.port}/{self.database}"
32+
f"postgresql://{self.username}:{self.password}@{self.host}:{self.port}/{self.database}"
3333
)
3434

3535
@overrides

airbyte/caches/_state_backend_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import abc
88
from typing import TYPE_CHECKING
99

10-
from airbyte_protocol.models.airbyte_protocol import AirbyteStreamState
10+
from airbyte_protocol.models import AirbyteStreamState
1111

1212

1313
if TYPE_CHECKING:

airbyte/datasets/_sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from overrides import overrides
1010
from sqlalchemy import and_, func, select, text
1111

12-
from airbyte_protocol.models.airbyte_protocol import ConfiguredAirbyteStream
12+
from airbyte_protocol.models import ConfiguredAirbyteStream
1313

1414
from airbyte.constants import DEFAULT_ARROW_MAX_CHUNK_SIZE
1515
from airbyte.datasets._base import DatasetBase

airbyte/shared/state_providers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from airbyte_protocol.models import (
1111
AirbyteStateMessage,
1212
AirbyteStateType,
13+
AirbyteStreamState,
1314
)
14-
from airbyte_protocol.models.airbyte_protocol import AirbyteStreamState
1515

1616
from airbyte import exceptions as exc
1717

airbyte/shared/state_writers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
if TYPE_CHECKING:
14-
from airbyte_protocol.models.airbyte_protocol import AirbyteStateMessage
14+
from airbyte_protocol.models import AirbyteStateMessage
1515

1616

1717
class StateWriterBase(StateProviderBase, abc.ABC):

airbyte/sources/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from collections.abc import Generator, Iterable, Iterator
4040

4141
from airbyte_cdk import ConnectorSpecification
42-
from airbyte_protocol.models.airbyte_protocol import AirbyteStream
42+
from airbyte_protocol.models import AirbyteStream
4343

4444
from airbyte._executors.base import Executor
4545
from airbyte.caches import CacheBase

poetry.lock

Lines changed: 233 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,29 @@ enable = true
1515
[tool.poetry.dependencies]
1616
python = ">=3.10,<4.0"
1717

18-
airbyte-cdk = "^4.6.2"
19-
duckdb = "^1.0.0"
20-
duckdb-engine = "^0.13.0"
18+
airbyte-cdk = "^5.6.0"
19+
duckdb = "^1.1.0"
20+
duckdb-engine = "^0.13.2"
2121
google-auth = ">=2.27.0,<3.0"
2222
google-cloud-bigquery = ">=3.12.0,<4.0"
2323
google-cloud-secret-manager = "^2.17.0"
2424
jsonschema = ">=3.2.0,<5.0"
2525
numpy = "<2.0" # v2.0 causes "ValueError: numpy.dtype size changed" error
2626
orjson = "^3.10"
2727
overrides = "^7.4.0"
28-
pandas = ">=1.5.3,<3.0"
28+
pandas = { version = ">=1.5.3,<3.0" }
2929
pendulum = "<=3.0.0"
30-
psycopg2-binary = "^2.9.9"
31-
# psycopg = {extras = ["binary", "pool"], version = "^3.1.16"}
32-
# Psycopg3 is not supported in SQLAlchemy 1.x:
30+
psycopg = {extras = ["binary", "pool"], version = "^3.2.2"}
31+
psycopg2-binary = "^2.9.9"
3332
pyarrow = ">=16.1,<18.0"
3433
pydantic = ">=2.0,<=3.0"
3534
python-dotenv = "^1.0.1"
3635
python-ulid = "^2.2.0"
3736
requests = "<=2.32.2,!=3.32.0" # 3.32.0 breaks docker tests
3837
rich = "^13.7.0"
39-
snowflake-connector-python = "^3.10.0"
40-
snowflake-sqlalchemy = "^1.5.1"
41-
sqlalchemy = "^2.0.35"
38+
snowflake-connector-python = "^3.12.2"
39+
snowflake-sqlalchemy = "^1.6.1"
40+
sqlalchemy = ">=1.4.51,<3.0"
4241
types-pyyaml = "^6.0.12.12"
4342

4443
# TODO: Remove this arbitrary python constraint once `sqlalchemy-bigquery` has done so.
@@ -49,11 +48,12 @@ pyiceberg = "^0.6.1"
4948
uuid7 = "^0.1.0"
5049
grpcio = "^1.65.0"
5150
structlog = "^24.4.0"
51+
airbyte-protocol-models-pdv2 = "^0.13.0"
5252

5353
[tool.poetry.group.dev.dependencies]
54-
docker = "^7.0.0"
54+
docker = "^7.1.0"
5555
faker = "^21.0.0"
56-
mypy = "^1.7.1"
56+
mypy = "^1.11.2"
5757
pandas-stubs = "^2.1.4.231218"
5858
pdoc = "^14.3.0"
5959
pytest = "^8.2.0"
@@ -91,7 +91,7 @@ markers = [
9191
filterwarnings = [ # syntax: "action:message_regex:category:module:line"
9292
# Treat python warnings as errors in pytest
9393
"error",
94-
# Snowflake reregisters its functions, which is fine.
94+
# # Snowflake reregisters its functions, which is fine.
9595
"ignore::sqlalchemy.exc.SAWarning", # "GenericFunction is already registered and is going to be overridden.""
9696
# Ignore these, specifically on Windows because of file cleanup and locking issues:
9797
"ignore:unclosed file:ResourceWarning",
@@ -217,7 +217,11 @@ airbyte = "ab"
217217
[tool.ruff.lint.isort]
218218
force-sort-within-sections = false
219219
lines-after-imports = 2
220-
known-first-party = ["airbyte_cdk", "airbyte_protocol"]
220+
known-first-party = [
221+
"airbyte_cdk",
222+
"airbyte_protocol",
223+
"airbyte_protocol_dataclasses",
224+
]
221225
known-local-folder = ["airbyte"]
222226
required-imports = ["from __future__ import annotations"]
223227
known-third-party = []
@@ -297,8 +301,11 @@ exclude = [
297301
]
298302

299303
[[tool.mypy.overrides]]
300-
module = ["airbyte_protocol", "airbyte_protocol.models"]
301-
ignore_missing_imports = true # No stubs yet (😢)
304+
ignore_missing_imports = true # No stubs yet (😢)
305+
module = [
306+
"airbyte_protocol",
307+
"airbyte_protocol.models",
308+
]
302309

303310
[tool.pyright]
304311
pythonVersion = "3.10"

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import airbyte
1717
import docker
18-
import psycopg2 as psycopg
18+
import psycopg
1919
import pytest
2020
import ulid
2121
from _pytest.nodes import Item

tests/integration_tests/destinations/test_source_to_destination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from airbyte.shared.catalog_providers import CatalogProvider
1717
from airbyte.sources.base import Source
1818
from airbyte.strategies import WriteStrategy
19-
from airbyte_cdk import AirbyteMessage, AirbyteRecordMessage, Type
19+
from airbyte_protocol.models import AirbyteMessage, AirbyteRecordMessage, Type
2020

2121

2222
@pytest.fixture

0 commit comments

Comments
 (0)