Skip to content

release: 1.13.0 — get_multiple batches (api#7240) - #98

Merged
karlwaldman merged 2 commits into
mainfrom
release/1.13.0
Aug 23, 2026
Merged

release: 1.13.0 — get_multiple batches (api#7240)#98
karlwaldman merged 2 commits into
mainfrom
release/1.13.0

Conversation

@karlwaldman

Copy link
Copy Markdown
Member

Version bump and changelog for the #97 fix, so it can be published.

Why minor, not patch

The public signature is unchanged, so strict semver says patch. But this materially changes how many HTTP requests a call makes, and a minor keeps it out of tight pins like ~=1.12.8 while staying available to ~=1.12. Anyone on a narrow pin opts in rather than being surprised by a changed request pattern.

What ships

  • get_multiple() batches — up to 20 codes per request instead of one per code. Through this method the free plan was 50 code-reads a day; through the raw API it is 1,000.
  • Same fix in AsyncPricesResource.get_multiple(), which was worse — asyncio.gather fanned out one request per code, which could also trip the 60-per-60s rate limit.
  • Polling examples default to an interval that fits the free plan, with the measured update cadence of the data.

Users' quota consumption drops. In their favour, no code change needed — but it is a behaviour change and the changelog says so plainly.

One test fixed along the way

test_package_version_helper_reads_the_project_version asserted the literal "1.12.8", so it failed on this release for a reason unrelated to what it guards. Its job is "does the helper report the project version", not "is the version 1.12.8". It now reads the expected value from pyproject.toml — so it keeps testing the helper and stops needing a hand-edit every release.

Verification

645 passed, 42 skipped, 0 failed
coverage 63.44% (gate 50%)
import oilpriceapi; oilpriceapi.__version__ -> 1.13.0

Live smoke on the merged fix, against production:

 10 codes -> 1 request,  10 prices   (was 10)
 30 codes -> 2 requests, 29 prices   (was 30)
 bad code -> per-code fallback, 1 ok + 1 reported failure

Publishing is triggered by a published GitHub Release, so merging this does not ship to PyPI on its own.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JKAExynd9zoKwt6rYA66EA

karlwaldman and others added 2 commits August 23, 2026 09:36
Minor rather than patch, deliberately. The public signature is unchanged, so
strict semver would call this a patch — but it materially changes how many HTTP
requests a call makes, and a minor keeps it out of tight pins like ~=1.12.8
while staying available to ~=1.12. Anyone on a narrow pin opts in rather than
being surprised by a changed request pattern.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JKAExynd9zoKwt6rYA66EA
test_package_version_helper_reads_the_project_version asserted the literal
'1.12.8', so it failed on this release for a reason unrelated to what it
guards. Its job is 'does the helper report the PROJECT version', not 'is the
version 1.12.8'.

Now reads the expected value from pyproject.toml, so it keeps testing the
helper and stops needing a hand-edit every release.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JKAExynd9zoKwt6rYA66EA
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 11827e5a-7048-4dae-bd95-9ce257efa80e


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@karlwaldman
karlwaldman merged commit 31b8d80 into main Aug 23, 2026
7 checks passed
@karlwaldman
karlwaldman deleted the release/1.13.0 branch August 23, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant