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

download/extract automatic index freshening #16

Open
thatch opened this issue Aug 6, 2020 · 0 comments
Open

download/extract automatic index freshening #16

thatch opened this issue Aug 6, 2020 · 0 comments
Labels
enhancement New feature or request wishlist

Comments

@thatch
Copy link
Member

thatch commented Aug 6, 2020

Right now you have two choices for download/extract:

  1. Don't pass --fresh, which will error out if we don't have a cached index with an sdist for that version
  2. Pass --fresh, and always pay a roundtrip to update an index, even if the cached version has an sdist for that/

What we have now requires the caller to decide up front, and the api.download_* functions require you to already have a Package object. A stopgap would be a pick_sdist(pkg, ver) function that just has the list comprehension that keeps getting repeated:

sdists = [
    f for f in package.releases[version].files if f.file_type == FileType.SDIST
]
@thatch thatch added enhancement New feature or request wishlist labels Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wishlist
Projects
None yet
Development

No branches or pull requests

1 participant