You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ahead of the breaking 1.2.0 release.
Require Python >=3.10
- 3.9 support was already effectively broken: `waterdata`'s `anyio` dependency
and the test stack (`pytest-httpx`) require 3.10+, and the `waterdata` test
modules already skip on <3.10 — so the CI 3.9 leg was a hollow shell.
- `requires-python = ">=3.10"`; ruff `target-version = "py310"`; mypy
`python_version = "3.10"`. Bumping mypy to 3.10 also lets it parse `anyio`'s
3.10 source (the `mypy<2` pin existed only to keep targeting 3.9, now dropped).
- Declare `anyio>=4.0` as a direct dependency — it's imported directly by
`waterdata` (`start_blocking_portal`), previously relied on transitively via
httpx.
- CI test matrix `["3.9", "3.13", "3.14"]` -> `["3.10", "3.13", "3.14"]`.
- Fill in the Trove classifiers (per-version 3.10-3.14, dev-status, audience,
topic).
- The py310 ruff target enables `B905`; add explicit `strict=False` to the four
pre-existing `zip()` calls (`nwis`, `waterdata/chunking`, `waterdata/nearest`)
— identical to the prior implicit behavior.
Remove deprecated `NWIS_Metadata.variable_info`
- It only emitted a `DeprecationWarning` and returned `None` (it relied on the
defunct `get_pmcodes`). Accessing it now raises `NotImplementedError` via the
`utils.BaseMetadata` abstract contract. Drops the obsolete unit test.
BREAKING CHANGE: Python 3.9 is no longer supported; `pip install
dataretrieval>=1.2.0` requires Python >=3.10. `NWIS_Metadata.variable_info` is
removed (it always returned None).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sjb14HkwuCydKSKMsaXsgd
Copy file name to clipboardExpand all lines: NEWS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
**06/23/2026:****Breaking change (1.2.0):** the minimum supported Python is now **3.10** (`requires-python = ">=3.10"`). 3.9 support was already effectively broken — the `waterdata` module's dependencies (`anyio`, the test stack) require 3.10+, and the `waterdata` test modules already skipped on <3.10. `anyio` is now declared as a direct dependency (it is imported directly by `waterdata`), and the CI/ruff/mypy targets move to 3.10. Also removed the deprecated `NWIS_Metadata.variable_info` property (it only warned and returned `None`, relying on the defunct `get_pmcodes`); accessing it now raises `NotImplementedError` via the base class.
2
+
1
3
**06/03/2026:** The request-error hierarchy is now unified. Every module (`nwis`, `wqp`, `nldi`, `waterdata`, `nadp`, `streamstats`) raises a subclass of `dataretrieval.DataRetrievalError` on a failed request, so a single `except dataretrieval.DataRetrievalError` spans them all. An HTTP error status surfaces as an `HTTPError` carrying `.status_code` (inspect it to branch on a specific code); the retryable 429/5xx subset is `TransientError` (`RateLimited` / `ServiceUnavailable`, carrying `.retry_after`); and a request too large to satisfy is a `RequestTooLarge` (`URLTooLong` for an over-long single request, `Unchunkable` when the Water Data chunker cannot split a call small enough). Connection-level failures (timeouts, DNS, refused connections) are wrapped as a `NetworkError`, with the underlying `httpx` exception on `__cause__`. Every `DataRetrievalError` also exposes `.status_code` (`None` when there is no HTTP status), `.retry_after`, and `.retryable`, so a single `except dataretrieval.DataRetrievalError as e` clause can branch on the status or retry transient failures without knowing the concrete subclass. **Breaking change:** these exceptions no longer multiply-inherit a built-in — code that caught request failures with `except ValueError` or `except RuntimeError` should switch to `except dataretrieval.DataRetrievalError` (or a specific subclass). A no-data result is **not** an error: the modern getters (`waterdata`, `wqp`, `nldi`) return an empty DataFrame when nothing matches. Only the deprecated `nwis` (waterservices) path still raises `NoSitesError` on no data.
2
4
3
5
**05/17/2026:** The OGC `waterdata` getters (`get_daily`, `get_continuous`, `get_field_measurements`, and the rest of the multi-value-capable functions) now transparently chunk requests whose URLs would otherwise exceed the server's ~8 KB byte limit.
0 commit comments