release: prepare python-mlb-statsapi 0.8.0 - #264
Merged
Conversation
* test: document MlbDataAdapter and MlbResult contract offline Separate mocked HTTP adapter characterization from live MLB API tests. Add deterministic requests-mock coverage and strict xfail markers for known defects that fix/http-adapter-correctness will address. Co-authored-by: Matthew Spah <spahmatthew@gmail.com> * test: avoid requiring shared result data reference Co-authored-by: Matthew Spah <spahmatthew@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Matthew Spah <spahmatthew@gmail.com>
…tness fix: correct HTTP adapter response handling
Co-authored-by: Matthew Spah <spahmatthew@gmail.com>
feat: add shared HTTP sessions and configurable timeouts
Add bounded urllib3 Retry adapters for library-created Sessions and introduce structured transport, timeout, HTTP, and decode exceptions while preserving 4xx empty-result compatibility. Co-authored-by: Matthew Spah <spahmatthew@gmail.com>
Remove an unused local-server fixture dependency from the decode no-retry test. Co-authored-by: Matthew Spah <spahmatthew@gmail.com>
feat: add bounded HTTP retries and structured exceptions
Make deterministic offline tests the normal CI gate, move live MLB API tests to a manual/scheduled workflow, remove automatic publishing workflows, and document HTTP transport behavior for 0.8.0. Co-authored-by: Matthew Spah <spahmatthew@gmail.com>
ci: separate validation and document HTTP transport
Expand the Quick Start area with practical copy-and-paste examples for shared Sessions, timeouts, Session injection, retries, and structured exceptions while linking to the detailed transport document. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Mattsface
marked this pull request as ready for review
August 1, 2026 10:47
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
Version 0.8.0 is the HTTP reliability release. It modernizes the network layer while preserving the existing synchronous public API and endpoint-specific not-found behavior.
The release branch is currently 12 commits ahead of
main.What changed
HTTP adapter correctness
200through299)Shared Sessions and timeouts
requests.Sessioninstead of module-levelrequests.get()(3.05, 30.0)close()and context-manager supportBounded retries
Library-created Sessions retry temporary GET failures for:
The policy allows up to three retries after the initial request, uses exponential backoff, and respects
Retry-After.Ordinary client errors such as 400, 401, 403, and 404 are not retried.
Structured exceptions
Adds:
All new exceptions inherit from
TheMlbStatsApiException, so existing broad exception handling remains compatible.Deterministic transport tests
Adds offline coverage for:
Live MLB adapter tests remain separate from deterministic offline tests.
CI and publishing safety
developmentmainDocumentation
Compatibility
Version 0.8.0 preserves:
MlbclientMlbResult.status_codeMlbResult.messageMlbResult.dataTheMlbStatsApiExceptionNone,[], and{}Review focus
Please pay particular attention to:
Final release work still required
Before this PR can be marked ready and merged:
pyproject.tomlfrom0.7.2to0.8.0main...release/0.8.0diffMerge and publishing plan
When the release is fully validated:
v0.8.0.Do not merge, tag, or publish as part of the current review.