Define and test the version 1.0 HTTP contract (#283) - #290
Merged
Conversation
Document strict-default and explicit compatibility-mode behavior for Mlb and MlbDataAdapter, including status matrix updates (409), v1/v1.1 coverage, 404 preservation, retry-exhausted 429, and warning call-site expectations. Pending 1.0 defaults are strict xfails (#284, #285). Co-authored-by: Matthew Spah <spahmatthew@gmail.com>
Mattsface
marked this pull request as ready for review
August 5, 2026 20:58
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.
Why
Issue #283 (parent release #282) needs a deterministic offline contract for version 1.0 HTTP behavior before production defaults change. This PR adds and reframes tests only; it does not implement strict defaults.
What
tests/http_contract_support.pywith status 409, shared v1/v1.1 helpers, and narrowxfailmarkers for Make strict HTTP behavior the default in 1.0 #284 / Preserve explicit compatibility mode in 1.0 #285.strict_http=FalseonMlbandMlbDataAdapter.MlbHttpError, post-retry 429) markedxfailpending Make strict HTTP behavior the default in 1.0 #284.xfailpending Preserve explicit compatibility mode in 1.0 #285.Production files (
mlb_api.py,mlb_dataadapter.py,exceptions.py,warnings.py) are unchanged.Tests
Focused: 229 passed, 26 xfailed. Full offline suite: 407 passed, 26 xfailed.
Risk and impact
xfaillinks to Make strict HTTP behavior the default in 1.0 #284 and Preserve explicit compatibility mode in 1.0 #285.