Skip to content

feat: add PyPI Simple Repository API support#1

Merged
wolfeidau merged 4 commits into
mainfrom
pypy_support
Jan 18, 2026
Merged

feat: add PyPI Simple Repository API support#1
wolfeidau merged 4 commits into
mainfrom
pypy_support

Conversation

@wolfeidau
Copy link
Copy Markdown
Member

  • Implement PEP 503/691 Simple API handler with HTML and JSON content negotiation
  • Add content-addressable caching for wheel and sdist packages with SHA256 verification
  • Support project name normalization per PEP 503 specification
  • Integrate PyPI handler with HTTP server at /pypi/* path prefix
  • Add comprehensive test coverage for handler, index, and upstream client
  • Fix race condition in temp file cleanup for background caching goroutines
  • Fix context cancellation to allow cache operations to complete during shutdown
  • Update README with PyPI configuration and usage examples

- Implement PEP 503/691 Simple API handler with HTML and JSON content negotiation
- Add content-addressable caching for wheel and sdist packages with SHA256 verification
- Support project name normalization per PEP 503 specification
- Integrate PyPI handler with HTTP server at /pypi/* path prefix
- Add comprehensive test coverage for handler, index, and upstream client
- Fix race condition in temp file cleanup for background caching goroutines
- Fix context cancellation to allow cache operations to complete during shutdown
- Update README with PyPI configuration and usage examples
- Add Content-Length header when serving files from cache and upstream
- Add proper HEAD method support for project pages and file downloads
- Fix error handling in index SetFileHash to surface unexpected read errors
- Remove unused RawPage field from CachedProject struct
- Remove redundant HTML escaping (html/template auto-escapes)
- Add project name validation for empty strings and edge cases
- Add tests for integrity check failures, malformed upstream, and HEAD requests
- Wait for async cache write to complete before file download requests
- Follow established pattern from TestHandlerFileDownload
- Fixes flaky TestHandlerIntegrityCheckFailure and TestHandlerHEADRequest in CI
@wolfeidau wolfeidau merged commit a22af30 into main Jan 18, 2026
1 check passed
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