Skip to content

Commit 0c0de2a

Browse files
thodson-usgsclaude
andcommitted
Revert cached_property on WQP_Metadata.site_info
WQP_Metadata is not strictly a snapshot — a long-lived `md` reference (paginated workflow, long-running script) would see stale site metadata if `site_info` cached its result. Plain `@property` matches user expectation that an attribute named `site_info` reflects the current state, and the cost of one extra HTTP call on re-read is acceptable. Drop the now-unused `from functools import cached_property`. The coercion comment is retained. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7836d12 commit 0c0de2a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

dataretrieval/wqp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from __future__ import annotations
1313

1414
import warnings
15-
from functools import cached_property
1615
from io import StringIO
1716
from typing import TYPE_CHECKING
1817

@@ -688,7 +687,7 @@ def __init__(
688687
self._legacy = legacy
689688
self._ssl_check = ssl_check
690689

691-
@cached_property
690+
@property
692691
def site_info(self):
693692
# Walk WQP-native key first, then legacy NWIS-style aliases. Whichever
694693
# matched, pass the value as `siteid` -- that's what_sites' native arg.

0 commit comments

Comments
 (0)