diff --git a/README.md b/README.md index 8f4ded7..a25731c 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,7 @@ See the [method reference](https://zero-sum-seattle.github.io/python-mlb-statsap Both clients use explicit timeouts, structured exceptions, and pooled HTTP connections. `strict_http=True` is the default. Final non-404 4xx responses raise `MlbHttpError`, while existing endpoint-specific 404 behavior is preserved. -Library-created clients send a versioned User-Agent. The current package version sends `python-mlb-statsapi/1.1.0`. See the [HTTP transport documentation](https://zero-sum-seattle.github.io/python-mlb-statsapi/http-transport/) for the full transport contract. +Library-created clients send a versioned User-Agent. The current package version sends `python-mlb-statsapi/1.1.1`. See the [HTTP transport documentation](https://zero-sum-seattle.github.io/python-mlb-statsapi/http-transport/) for the full transport contract. The main transport exceptions are: diff --git a/docs/http-transport.md b/docs/http-transport.md index 5760613..2e9c04a 100644 --- a/docs/http-transport.md +++ b/docs/http-transport.md @@ -1,7 +1,7 @@ # HTTP Transport This document describes the HTTP transport behavior of the current release, -version 1.1.0. +version 1.1.1. Version 0.8.0 introduced shared Sessions, explicit timeouts, bounded retries, and structured exceptions. Version 0.9.0 introduced configurable strict @@ -12,7 +12,7 @@ Version 1.1.0 adds the optional asynchronous `AsyncMlb` and `AsyncMlbDataAdapter` clients while preserving the existing synchronous API. Ordinary usage does not need to configure sessions, clients, or retries. -See [the 1.1.0 release notes](releases/1.1.0.md) for a shorter summary of what +See [the 1.1.1 release notes](releases/1.1.1.md) for a shorter summary of what changed in the current release. For the authoritative public API boundary see [the public API contract](public-api.md). @@ -206,7 +206,7 @@ python-mlb-statsapi/ With the package version currently declared in project metadata that resolves to: ```text -python-mlb-statsapi/1.1.0 +python-mlb-statsapi/1.1.1 ``` The version comes from the installed package metadata, so it always matches diff --git a/docs/releases.md b/docs/releases.md index 5ce7bb6..c7333ca 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -4,6 +4,7 @@ Release notes describe user-visible changes, compatibility guidance, and validat ## Releases +- [1.1.1](releases/1.1.1.md) — numeric stat field and MLB sentinel handling corrections - [1.1.0](releases/1.1.0.md) — first-class asynchronous client support - [1.0.1](releases/1.0.1.md) — packaging and Python support corrections - [1.0.0](releases/1.0.0.md) — strict HTTP behavior by default and a stable public API contract diff --git a/docs/releases/1.1.1.md b/docs/releases/1.1.1.md new file mode 100644 index 0000000..184aedd --- /dev/null +++ b/docs/releases/1.1.1.md @@ -0,0 +1,29 @@ +# python-mlb-statsapi 1.1.1 + +Version 1.1.1 corrects numeric stat field handling. + +## Stats model fixes + +Numeric rate and average fields such as `avg`, `obp`, `slg`, `ops`, `era`, and `whip` are now represented as floats instead of numeric strings. + +Pydantic handles normal MLB numeric strings automatically: + +```python +from mlbstatsapi.models.stats.hitting import SimpleHittingSplit + +stats = SimpleHittingSplit(avg=".287") + +assert stats.avg == 0.287 +``` + +The MLB Stats API also returns `.---` and `-.--` for unavailable rate statistics. These values are normalized to `None`. + +MLB innings notation remains string-based because values such as `"6.2"` represent 6 2/3 innings rather than the decimal 6.2. + +## Python support + +python-mlb-statsapi requires Python >=3.10. + +CI validates Python 3.10 through 3.14 (`3.10`, `3.11`, `3.12`, `3.13`, and `3.14`). + +This change builds on the investigation started in #241 and completed in #341. diff --git a/mkdocs.yml b/mkdocs.yml index 1d4010c..ed33bdc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -47,6 +47,7 @@ nav: - Public API Contract: public-api.md - Release Notes: - Overview: releases.md + - 1.1.1: releases/1.1.1.md - 1.1.0: releases/1.1.0.md - 1.0.1: releases/1.0.1.md - 1.0.0: releases/1.0.0.md diff --git a/pyproject.toml b/pyproject.toml index dd6458c..b4523aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "python-mlb-statsapi" -version = "1.1.0" +version = "1.1.1" description = "mlbstatsapi python wrapper" authors = [ "Matthew Spah ", diff --git a/tests/test_release_validation.py b/tests/test_release_validation.py index 444983a..c35e06c 100644 --- a/tests/test_release_validation.py +++ b/tests/test_release_validation.py @@ -40,7 +40,7 @@ # Release notes for the version this branch is preparing. Kept explicit so the # current-document checks cannot silently classify an unreviewed notes file as # the current release merely because the declared version changed. -CURRENT_RELEASE_NOTES = RELEASE_NOTES_DIR / "1.1.0.md" +CURRENT_RELEASE_NOTES = RELEASE_NOTES_DIR / "1.1.1.md" # Historical notes keep their own version-specific statements and must not be # rewritten to match the current release. @@ -51,6 +51,7 @@ RELEASE_NOTES_DIR / "0.9.0.md", RELEASE_NOTES_DIR / "1.0.0.md", RELEASE_NOTES_DIR / "1.0.1.md", + RELEASE_NOTES_DIR / "1.1.0.md", ) # Deterministic CI contract for maintained release branches.