Commit af9b238
chore!: require Python >=3.10; remove the deprecated variable_info metadata property (#332)
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).
Fix the live-API flaky-rerun marker
- A live test that hits an SSL/connection timeout surfaces as a typed
`NetworkError`, but the `flaky_api` rerun patterns matched only the raw httpx
exception names. `pytest-rerunfailures` matches the crash line (the
`NetworkError`), not the chained `ConnectTimeout`, so the transient was never
retried and failed CI. Add `NetworkError` to `_TRANSIENT_RERUN_PATTERNS`.
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()`.
Claude-Session: https://claude.ai/code/session_01Sjb14HkwuCydKSKMsaXsgd
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 566ef86 commit af9b238
14 files changed
Lines changed: 40 additions & 64 deletions
File tree
- .github/workflows
- dataretrieval
- ogc
- waterdata
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | | - | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1037 | 1041 | | |
1038 | 1042 | | |
1039 | 1043 | | |
1040 | | - | |
| 1044 | + | |
1041 | 1045 | | |
1042 | 1046 | | |
1043 | 1047 | | |
| |||
1133 | 1137 | | |
1134 | 1138 | | |
1135 | 1139 | | |
1136 | | - | |
1137 | | - | |
| 1140 | + | |
| 1141 | + | |
1138 | 1142 | | |
1139 | 1143 | | |
1140 | 1144 | | |
| |||
1196 | 1200 | | |
1197 | 1201 | | |
1198 | 1202 | | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
| 500 | + | |
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | 264 | | |
269 | 265 | | |
270 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
| 201 | + | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
| |||
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
38 | | - | |
| 49 | + | |
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
| |||
77 | 88 | | |
78 | 89 | | |
79 | 90 | | |
80 | | - | |
| 91 | + | |
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
| |||
115 | 126 | | |
116 | 127 | | |
117 | 128 | | |
118 | | - | |
| 129 | + | |
119 | 130 | | |
120 | 131 | | |
121 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 11 | | |
18 | 12 | | |
19 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
| 362 | + | |
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | 419 | | |
431 | 420 | | |
432 | 421 | | |
| |||
0 commit comments