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
chore!: require Python >=3.10; remove the deprecated variable_info metadata property
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 require 3.10+, and the `waterdata` test modules already
skipped on <3.10. `requires-python = ">=3.10"`; ruff `target-version = "py310"`;
mypy `python_version = "3.10"` (drops the `mypy<2` pin that only existed to keep
targeting 3.9); declare `anyio>=4.0` as a direct dependency (imported directly
by `waterdata`); CI matrix `["3.10", "3.13", "3.14"]`; fill in per-version Trove
classifiers.
- The py310 ruff target newly enables `B905` (zip `strict=`) and `UP036`
(now-dead `sys.version_info < (3, 10)` skip guards): add explicit `strict=False`
to the remaining `zip()` calls (`nwis`, `ogc/planning`, `waterdata/nearest`) and
drop the dead version-skip guards in the four `waterdata` test modules.
Behavior-identical.
Remove the deprecated `variable_info` metadata property entirely
- The `NWIS_Metadata` override only warned and returned `None` (it relied on the
defunct `get_pmcodes`). Nothing else implemented it, so the `BaseMetadata`
abstract is removed too — accessing `.variable_info` now raises `AttributeError`.
- `site_info` is kept: `NWIS_Metadata`/`WQP_Metadata` implement it, and the modern
`waterdata` metadata intentionally leaves it abstract (use
`waterdata.get_monitoring_locations()` for site descriptions).
BREAKING CHANGE: Python 3.9 is no longer supported; `pip install
dataretrieval>=1.2.0` requires Python >=3.10. The `variable_info` metadata
property is removed (it always returned `None`); use `site_info` or
`waterdata.get_monitoring_locations()`.
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 fully removed the deprecated `variable_info` metadata property: the `NWIS_Metadata` override only warned and returned `None` (it relied on the defunct `get_pmcodes`), and the `BaseMetadata` abstract is gone too since nothing implemented it — accessing `.variable_info` now raises `AttributeError`. `site_info` is unaffected.
2
+
1
3
**06/23/2026:****Breaking change (1.2.0):** removed the `nadp` module and the deprecated `samples` module ahead of the 1.2.0 release. `nadp` was deprecated on 05/01/2026 — NADP is not a USGS data source, so retrieve NADP data directly from https://nadp.slh.wisc.edu/. The `samples.get_usgs_samples` shim (a deprecated forward to the modern getter) is gone; use `waterdata.get_samples()` instead. `import dataretrieval.nadp` / `import dataretrieval.samples` now raise `ModuleNotFoundError`.
2
4
3
5
**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.
0 commit comments