Skip to content

Commit

Permalink
Merge branch 'main' into feat-target-asyncio-drain-one
Browse files Browse the repository at this point in the history
  • Loading branch information
BuzzCutNorman authored Mar 11, 2024
2 parents 44e7471 + 26021c1 commit e89c328
Show file tree
Hide file tree
Showing 10 changed files with 155 additions and 152 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.28.0
hooks:
- id: check-dependabot
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
rev: v0.3.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ singer-sdk = { version="~=0.36.0", extras = ["testing"] }
s3 = ["fs-s3fs"]

[tool.mypy]
python_version = "3.11"
python_version = "3.12"
warn_unused_configs = true

[tool.ruff]
Expand All @@ -68,7 +68,7 @@ known-first-party = ["{{cookiecutter.library_name}}"]
convention = "google"

[build-system]
requires = ["poetry-core==1.8.1"]
requires = ["poetry-core==1.9.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.28.0
hooks:
- id: check-dependabot
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.3.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ singer-sdk = { version="~=0.36.0", extras = ["testing"] }
s3 = ["fs-s3fs"]

[tool.mypy]
python_version = "3.11"
python_version = "3.12"
warn_unused_configs = true
{#- TODO: Remove this after support for SQLAlchemy 1 is dropped in v1 -#}
{#- https://github.com/meltano/sdk/pull/1931 -#}
{%- if cookiecutter.stream_type == 'SQL' %}
plugins = "sqlmypy"
{%- endif %}
Expand Down Expand Up @@ -74,7 +76,7 @@ known-first-party = ["{{cookiecutter.library_name}}"]
convention = "google"

[build-system]
requires = ["poetry-core==1.8.1"]
requires = ["poetry-core==1.9.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.28.0
hooks:
- id: check-dependabot
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
rev: v0.3.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ known-first-party = ["{{cookiecutter.library_name}}"]
convention = "google"

[build-system]
requires = ["poetry-core==1.8.1"]
requires = ["poetry-core==1.9.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
Expand Down
272 changes: 136 additions & 136 deletions poetry.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fs = ">=2.4.16"
importlib-metadata = {version = "<8.0.0", python = "<3.12"}
importlib-resources = {version = ">=5.12.0", python = "<3.9"}
inflection = ">=0.5.1"
joblib = ">=1.0.1"
joblib = ">=1.3.0"
jsonpath-ng = ">=1.5.3"
jsonschema = ">=4.16.0"
packaging = ">=23.1"
Expand Down Expand Up @@ -121,7 +121,7 @@ duckdb = { version = ">=0.8.0", python = "<3.12" }
duckdb-engine = { version = ">=0.9.4", python = "<3.12" }

fastjsonschema = ">=2.19.1"
mypy = ">=1.0"
mypy = ">=1.9"
pytest-benchmark = ">=4.0.0"
pytest-snapshot = ">=0.9.0"
pytz = ">=2022.2.1"
Expand Down Expand Up @@ -219,6 +219,7 @@ show_missing = true
[tool.mypy]
exclude = "tests"
files = "singer_sdk"
local_partial_types = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
Expand Down
2 changes: 1 addition & 1 deletion singer_sdk/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def get_next(self, response: Response) -> TPageToken | None:


class SinglePagePaginator(BaseAPIPaginator[None]):
"""A paginator that does works with single-page endpoints."""
"""A paginator that works with single-page endpoints."""

def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
"""Create a new paginator.
Expand Down
4 changes: 2 additions & 2 deletions singer_sdk/target_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import typing as t

import click
from joblib import Parallel, delayed, parallel_backend
from joblib import Parallel, delayed, parallel_config

from singer_sdk.exceptions import RecordsWithoutSchemaException
from singer_sdk.helpers._batch import BaseBatchFileEncoding
Expand Down Expand Up @@ -522,7 +522,7 @@ def _drain_all(self, sink_list: list[Sink], parallelism: int) -> None:
def _drain_sink(sink: Sink) -> None:
asyncio.run(self.drain_one(sink))

with parallel_backend("threading", n_jobs=parallelism):
with parallel_config(backend="threading", n_jobs=parallelism):
Parallel()(delayed(_drain_sink)(sink=sink) for sink in sink_list)

def _write_state_message(self, state: dict) -> None:
Expand Down

0 comments on commit e89c328

Please sign in to comment.