diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68ef435..84b4bce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 397c420..efc2d51 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.22.0" + ".": "1.22.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 711e52d..9ab862c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 1.22.1 (2026-03-17) + +Full Changelog: [v1.22.0...v1.22.1](https://github.com/OneBusAway/python-sdk/compare/v1.22.0...v1.22.1) + +### Bug Fixes + +* **deps:** bump minimum typing-extensions version ([13f6b82](https://github.com/OneBusAway/python-sdk/commit/13f6b82ee19b6e51b29e800ce5715f967db07b64)) +* **pydantic:** do not pass `by_alias` unless set ([658f6ca](https://github.com/OneBusAway/python-sdk/commit/658f6ca0c5da679a8a771952e19fbef3654bc66b)) + + +### Chores + +* **internal:** tweak CI branches ([0187280](https://github.com/OneBusAway/python-sdk/commit/0187280015c3dd74afef273cc66cb8892ff8c772)) + ## 1.22.0 (2026-03-14) Full Changelog: [v1.21.0...v1.22.0](https://github.com/OneBusAway/python-sdk/compare/v1.21.0...v1.22.0) diff --git a/pyproject.toml b/pyproject.toml index 1036225..10c2fe6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "onebusaway" -version = "1.22.0" +version = "1.22.1" description = "The official Python library for the onebusaway-sdk API" dynamic = ["readme"] license = "Apache-2.0" @@ -11,7 +11,7 @@ authors = [ dependencies = [ "httpx>=0.23.0, <1", "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", + "typing-extensions>=4.14, <5", "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", diff --git a/src/onebusaway/_compat.py b/src/onebusaway/_compat.py index 786ff42..e6690a4 100644 --- a/src/onebusaway/_compat.py +++ b/src/onebusaway/_compat.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload from datetime import date, datetime -from typing_extensions import Self, Literal +from typing_extensions import Self, Literal, TypedDict import pydantic from pydantic.fields import FieldInfo @@ -131,6 +131,10 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: return model.model_dump_json(indent=indent) +class _ModelDumpKwargs(TypedDict, total=False): + by_alias: bool + + def model_dump( model: pydantic.BaseModel, *, @@ -142,6 +146,9 @@ def model_dump( by_alias: bool | None = None, ) -> dict[str, Any]: if (not PYDANTIC_V1) or hasattr(model, "model_dump"): + kwargs: _ModelDumpKwargs = {} + if by_alias is not None: + kwargs["by_alias"] = by_alias return model.model_dump( mode=mode, exclude=exclude, @@ -149,7 +156,7 @@ def model_dump( exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 warnings=True if PYDANTIC_V1 else warnings, - by_alias=by_alias, + **kwargs, ) return cast( "dict[str, Any]", diff --git a/src/onebusaway/_version.py b/src/onebusaway/_version.py index 6f32ea8..bb45419 100644 --- a/src/onebusaway/_version.py +++ b/src/onebusaway/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "onebusaway" -__version__ = "1.22.0" # x-release-please-version +__version__ = "1.22.1" # x-release-please-version