Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract and host wheel METADATA on upload #9972

Closed
wants to merge 11 commits into from

Commits on Apr 30, 2023

  1. Configuration menu
    Copy the full SHA
    bd623d6 View commit details
    Browse the repository at this point in the history
  2. Extract METADATA on wheel upload as *.whl.metadata (pypi#8254)

    This allows to download just the .metadata file for dependency
    resolution instead of full wheels as it happens today
    pypi#8254 (comment)
    
    The filename convention and download location is covered by PEP-0658
    https://www.python.org/dev/peps/pep-0658/#specification
    abitrolly committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    ef5ebbd View commit details
    Browse the repository at this point in the history
  3. Fix tests by using .zip content for a .whl

    Tests were failing, because wheel upload test used .tar.gz
    content, and zipfile could not open that content to extract
    METADATA (which was also absent).
    
    The fix adds two helpers to avoid repeated code.
    abitrolly committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    6f9eaa3 View commit details
    Browse the repository at this point in the history
  4. Fix one more test that decided to fail

    I changed tested content-type to the more appropriate for .zip
    Twine sends application/octet-stream.
    abitrolly committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    db93dd2 View commit details
    Browse the repository at this point in the history
  5. Black formatting fix

    abitrolly committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    3508eea View commit details
    Browse the repository at this point in the history
  6. Move extraction code into extract_wheel_metadata()

    This will be useful for backfill scripts.
    abitrolly committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    4004c9c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b880692 View commit details
    Browse the repository at this point in the history
  8. Store metadata_hash in DB

    abitrolly committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    77022a6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a9d0ce4 View commit details
    Browse the repository at this point in the history
  10. Rebase Alembic migration

    abitrolly committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    aff2dfa View commit details
    Browse the repository at this point in the history
  11. Remove global keyword as it alters usage

    Co-authored-by: Éric <merwok@netwok.org>
    abitrolly and merwok committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    86cc141 View commit details
    Browse the repository at this point in the history