Cache-bust the PyPI badge URL - #37
Merged
Merged
Conversation
The badge rendered as "package or version not found" even after quantui 0.5.1
published successfully. Not a packaging problem — two independent stale
caches, both holding a genuine 404 from before the package existed:
- shields.io caches badge results for 3h (max-age=10800) behind Cloudflare.
The badge URL was first requested when the README was rendered during the
pre-flight metadata work, well before anything was published.
- GitHub never lets a browser hit shields.io directly; it proxies README
images through camo.githubusercontent.com, which cached its own copy of
that stale SVG and doesn't track the origin's cache headers.
Appending ?v=2 makes camo treat it as a new image and fetch fresh. Bump the
number again if this ever recurs.
Verified before changing anything: pypi.org/pypi/quantui/json returns 200 with
version 0.5.1, and img.shields.io/pypi/v/quantui.json already reported
"v0.5.1" — the origin was correct the whole time.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The PyPI badge rendered as "package or version not found" even after
quantui0.5.1 published successfully.
Not a packaging problem. Verified before changing anything:
pypi.org/pypi/quantui/jsonreturns 200 with version 0.5.1, andimg.shields.io/pypi/v/quantui.jsonalready reported"v0.5.1"— the originwas correct the whole time.
Two independent stale caches, both holding a genuine 404 from before the
package existed:
max-age=10800) behindCloudflare. That badge URL was first requested when the README rendered
during the pre-flight metadata work — well before anything was published, so
the 404 was real at the time and got cached.
it proxies README images through
camo.githubusercontent.com, which cachedits own copy of that stale SVG and doesn't track the origin's cache headers.
Appending
?v=2makes camo treat it as a new image and fetch fresh. Bump thenumber again if it ever recurs.
Would have self-corrected within ~3h anyway; this just forces it now.
🤖 Generated with Claude Code