Skip to content

Commit 1f7b73d

Browse files
chore: Bump singer-sdk from 0.34.1 to 0.35.0 (#290)
1 parent 93429c7 commit 1f7b73d

File tree

5 files changed

+19
-40
lines changed

5 files changed

+19
-40
lines changed

poetry.lock

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ sqlalchemy = "~=2.0"
3737
sshtunnel = "0.4.0"
3838

3939
[tool.poetry.dependencies.singer-sdk]
40-
version = "~=0.34.0"
40+
version = "~=0.35.0"
4141

4242
[tool.poetry.group.dev.dependencies]
4343
pytest = ">=7.4.2"

target_postgres/connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def prepare_table( # type: ignore[override]
8383
self,
8484
full_table_name: str,
8585
schema: dict,
86-
primary_keys: list[str],
86+
primary_keys: t.Sequence[str],
8787
connection: sa.engine.Connection,
8888
partition_keys: list[str] | None = None,
8989
as_temp_table: bool = False,
@@ -316,7 +316,7 @@ def create_empty_table( # type: ignore[override]
316316
meta: sa.MetaData,
317317
schema: dict,
318318
connection: sa.engine.Connection,
319-
primary_keys: list[str] | None = None,
319+
primary_keys: t.Sequence[str] | None = None,
320320
partition_keys: list[str] | None = None,
321321
as_temp_table: bool = False,
322322
) -> sa.Table:

target_postgres/sinks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Postgres target sink class, which handles writing streams."""
22

33
import uuid
4-
from typing import Any, Dict, Iterable, List, Optional, Union, cast
4+
from typing import Any, Dict, Iterable, List, Optional, Sequence, Union, cast
55

66
import sqlalchemy as sa
77
from pendulum import now
@@ -121,7 +121,7 @@ def bulk_insert_records( # type: ignore[override]
121121
table: sa.Table,
122122
schema: dict,
123123
records: Iterable[Dict[str, Any]],
124-
primary_keys: List[str],
124+
primary_keys: Sequence[str],
125125
connection: sa.engine.Connection,
126126
) -> Optional[int]:
127127
"""Bulk insert records to an existing destination table.
@@ -178,7 +178,7 @@ def upsert(
178178
from_table: sa.Table,
179179
to_table: sa.Table,
180180
schema: dict,
181-
join_keys: List[str],
181+
join_keys: Sequence[str],
182182
connection: sa.engine.Connection,
183183
) -> Optional[int]:
184184
"""Merge upsert data from one table to another.

target_postgres/tests/test_target_postgres.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import jsonschema
1111
import pytest
1212
import sqlalchemy
13-
from singer_sdk.exceptions import MissingKeyPropertiesError
13+
from singer_sdk.exceptions import InvalidRecord, MissingKeyPropertiesError
1414
from singer_sdk.testing import get_target_test_class, sync_end_to_end
1515
from sqlalchemy.dialects.postgresql import ARRAY
1616
from sqlalchemy.types import TEXT, TIMESTAMP
@@ -234,7 +234,7 @@ def test_record_missing_key_property(postgres_target):
234234

235235

236236
def test_record_missing_required_property(postgres_target):
237-
with pytest.raises(jsonschema.exceptions.ValidationError):
237+
with pytest.raises(InvalidRecord):
238238
file_name = "record_missing_required_property.singer"
239239
singer_file_to_target(file_name, postgres_target)
240240

0 commit comments

Comments
 (0)