test: mirror exhausted 429 contract - #432
Merged
Merged
Conversation
[gstack-context] Decisions: Keep HTTPX transport unchanged; prove typed 429 mapping and single public retry layer; record instagrapi 2.18.18 baseline. Remaining: Independent review, PR CI, squash merge, release 1.12.14, Codeberg sync. Tried: Initial sleep-count assertion included request-spacing sleeps; corrected to distinguish retry and spacing waits. Skill: /review [/gstack-context]
[gstack-context] Decisions: Exercise real HTTPX sessions with MockTransport and document private versus public retry behavior. Remaining: Re-review, full verification, PR CI, squash merge, release 1.12.14, Codeberg sync. Skill: /receiving-code-review [/gstack-context]
[gstack-context] Decisions: Remove dead helper left after moving public 429 coverage to MockTransport. Remaining: Final full verification, PR CI, squash merge, release 1.12.14, Codeberg sync. Skill: /review [/gstack-context]
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.
Summary
instagrapi 2.18.18.MockTransportthat private HTTP 429 responses map toClientThrottledErrororPleaseWaitFewMinuteswithout a hidden transport retry layer.Architecture
aiograpiuses HTTPX rather than urllib3 adapters, so the upstream Requests implementation does not need to be copied. This PR preserves the existing async transport and adds contract coverage instead of introducing a second retry package or changing production request behavior.Test plan
813 passed, 13 skipped, 35 subtests passedon the repository regression target.mkdocs build --strictruff check .ruff format --check .bandit -q -c pyproject.toml -r aiograpipython -m buildReview
Independent pre-landing review completed with no unresolved findings and a ready-to-merge verdict.