diff --git a/poetry.lock b/poetry.lock index 648d6175..c67809cd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1111,23 +1111,6 @@ snowballstemmer = ">=2.2.0" [package.extras] toml = ["tomli (>=1.2.3)"] -[[package]] -name = "pyjwt" -version = "2.8.0" -description = "JSON Web Token implementation in Python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "PyJWT-2.8.0-py3-none-any.whl", hash = "sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320"}, - {file = "PyJWT-2.8.0.tar.gz", hash = "sha256:57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de"}, -] - -[package.extras] -crypto = ["cryptography (>=3.4.0)"] -dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.4.0)", "pre-commit", "pytest (>=6.0.0,<7.0.0)", "sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"] -docs = ["sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"] -tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] - [[package]] name = "pynacl" version = "1.5.0" @@ -1603,30 +1586,28 @@ files = [ [[package]] name = "singer-sdk" -version = "0.38.0" +version = "0.39.0" description = "A framework for building Singer taps" optional = false python-versions = ">=3.8" files = [ - {file = "singer_sdk-0.38.0-py3-none-any.whl", hash = "sha256:c8be06edae149571df907262ce870dca990dc86a588609dec4ee8404aed3dc01"}, - {file = "singer_sdk-0.38.0.tar.gz", hash = "sha256:22f13980f9d5d26b98c2654a28e30ddda92d334eade6c50b6a0668be5a8aa55b"}, + {file = "singer_sdk-0.39.0-py3-none-any.whl", hash = "sha256:5b5aa4b485c360fb70af88c5d003b37b74c21c102adac21ea49fa023de860a23"}, + {file = "singer_sdk-0.39.0.tar.gz", hash = "sha256:e5ab6975e44324be32d15e75e86cb2d6719fc6f6d4b95ee0670a8a70c70d73bc"}, ] [package.dependencies] backoff = {version = ">=2.0.0", markers = "python_version < \"4\""} backports-datetime-fromisoformat = {version = ">=2.0.1", markers = "python_version < \"3.11\""} click = ">=8.0,<9.0" -cryptography = ">=3.4.6" fs = ">=2.4.16" -importlib-metadata = {version = "<8.0.0", markers = "python_version < \"3.12\""} -importlib-resources = {version = ">=5.12.0,<6.2.0 || >6.2.0,<6.3.0 || >6.3.0,<6.3.1 || >6.3.1", markers = "python_version < \"3.9\""} +importlib-metadata = {version = "<9.0.0", markers = "python_version < \"3.12\""} +importlib-resources = {version = ">=5.12.0,<6.2.0 || >6.2.0,<6.3.0 || >6.3.0,<6.3.1 || >6.3.1", markers = "python_version < \"3.10\""} inflection = ">=0.5.1" joblib = ">=1.3.0" jsonpath-ng = ">=1.5.3" jsonschema = ">=4.16.0" packaging = ">=23.1" pendulum = ">=2.1.0,<4" -PyJWT = ">=2.4,<3.0" pytest = {version = ">=7.2.1", optional = true, markers = "extra == \"docs\" or extra == \"testing\""} pytest-durations = {version = ">=1.2.0", optional = true, markers = "extra == \"testing\""} python-dateutil = ">=2.8.2" @@ -1641,8 +1622,9 @@ typing-extensions = ">=4.5.0" urllib3 = ">=1.26,<2" [package.extras] -docs = ["furo (>=2022.12.7)", "myst-parser (>=1)", "pytest (>=7.2.1)", "sphinx (>=4.5)", "sphinx-autobuild (>=2021.3.14)", "sphinx-copybutton (>=0.3.1)", "sphinx-inline-tabs (>=2023.4.21)", "sphinx-notfound-page (>=1.0.0)", "sphinx-reredirects (>=0.1.1)"] -faker = ["faker (>=22.5,<26.0)"] +docs = ["furo (>=2024.5.6)", "myst-parser (>=3)", "pytest (>=7.2.1)", "sphinx (>=7)", "sphinx-copybutton (>=0.5.2)", "sphinx-inline-tabs (>=2023.4.21)", "sphinx-notfound-page (>=1.0.0)", "sphinx-reredirects (>=0.1.5)"] +faker = ["faker (>=22.5,<27.0)"] +jwt = ["PyJWT (>=2.4,<3.0)", "cryptography (>=3.4.6)"] parquet = ["numpy (>=1.22)", "numpy (>=1.22,<1.25)", "pyarrow (>=13)"] s3 = ["fs-s3fs (>=1.1.1)"] testing = ["pytest (>=7.2.1)", "pytest-durations (>=1.2.0)"] @@ -1950,4 +1932,4 @@ test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-it [metadata] lock-version = "2.0" python-versions = "<3.13,>=3.8.1" -content-hash = "84035993141a9653114c7577b1611e6b09aa51308a0e2fd4b06a2fb74cbda6f9" +content-hash = "49a89dbd1a9419440833a6ff3f88741a4946ba298b833023fab5c26c50401b5f" diff --git a/pyproject.toml b/pyproject.toml index 88b71879..3f9bd897 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ sqlalchemy = "<3" sshtunnel = "0.4.0" [tool.poetry.dependencies.singer-sdk] -version = "~=0.38.0" +version = "~=0.39.0" [tool.poetry.group.dev.dependencies] faker = ">=18.5.1" diff --git a/tap_postgres/client.py b/tap_postgres/client.py index b21e77c9..bba728e0 100644 --- a/tap_postgres/client.py +++ b/tap_postgres/client.py @@ -24,6 +24,7 @@ from singer_sdk.streams.core import REPLICATION_INCREMENTAL if TYPE_CHECKING: + from singer_sdk.helpers.types import Context from sqlalchemy.dialects import postgresql from sqlalchemy.engine import Engine from sqlalchemy.engine.reflection import Inspector @@ -269,7 +270,7 @@ def max_record_count(self) -> int | None: return self.config.get("max_record_count") # Get records from stream - def get_records(self, context: dict | None) -> t.Iterable[dict[str, t.Any]]: + def get_records(self, context: Context | None) -> t.Iterable[dict[str, t.Any]]: """Return a generator of record-type dictionary objects. If the stream has a replication_key value defined, records will be sorted by the @@ -366,7 +367,7 @@ def _increment_stream_state( self, latest_record: dict[str, Any], *, - context: dict | None = None, + context: Context | None = None, ) -> None: """Update state of stream or partition with data from the provided record. @@ -397,7 +398,7 @@ def _increment_stream_state( check_sorted=self.check_sorted, ) - def get_records(self, context: dict | None) -> Iterable[dict[str, Any]]: + def get_records(self, context: Context | None) -> Iterable[dict[str, Any]]: """Return a generator of row-type dictionary objects.""" status_interval = 5.0 # if no records in 5 seconds the tap can exit start_lsn = self.get_starting_replication_key_value(context=context)