The single-request reader is public: _get becomes fetch_document - #87
Merged
Merged
Conversation
The refusals it carries are the whole of what this module promises about somebody else's server: HTTPS only, an honest User-Agent, a hard stop on 401, 403 and 429, a non-JSON answer read as a challenge page rather than parsed, and an error payload refused rather than treated as data. While it was private the only way for a consumer to have them was to write them again. wildfire-service-territory-overlap did, for months, and its docs/UPSTREAM.md named the reason in those words: the walk it needed required a fetch and _get was private. The walk is now shared and this is the other half. Rename only. No behaviour changed, and a caller reading a layer still wants iter_features, whose offset rule is the thing that must not be copied.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
_getcarries the whole of what this module promises about somebody else's server:It was private, so the only way for a consumer to have those five was to write them again.
wildfire-service-territory-overlapdid, for months, and itsdocs/UPSTREAM.mdnames the reason in exactly those terms:#84 and #86 closed the walk half of that: that project now pages every layer through
iter_featuresand its copy of the offset rule is gone. This is the other half. Without it, the next thing that project needs to read — the item metadata behind a territory layer, to answer "has the publisher moved since the pin" without downloading 180 MB to find out — either writes a sixth copy of the refusals or reaches for a private name.What changed
_get→fetch_document, public, with a docstring saying what it is for and what it is not: one request, no paging, and a caller reading a layer still wantsiter_features, whose offset rule is the thing that must not be copied.Rename only. No behaviour changed and no signature changed.
How it was verified
make verifygreen in full, determinism gate included. The 62 tests intests/test_acquire.pypass with every assertion unchanged — only the name they substitute moved — which is what a rename should look like and is the reason no negative control is offered here: there is no new branch to break, and a sabotage of the refusals would only re-prove tests that already existed and already pass.The one thing worth checking about a rename is that nothing still calls the old name, and nothing does: a word-boundary search for
_getacrosssrc/andtests/returns onlyfake_getandcounting_get, the test helpers.Prepared with AI assistance; reviewed before submission.