Allow installing packages that were current at a defined date #12727
Labels
C: finder
PackageFinder and index related code
resolution: duplicate
Duplicate of an existing issue/PR
type: feature request
Request for a new feature
What's the problem this feature will solve?
Copying from pypi/warehouse#6215:
I keep running into the same problem again and again: Trying to re-use an old set of jupyter notebooks for which the environment is described in a requirements.txt file, but without explicit versions of the packages, because the user did not run pip freeze at the time. I know the date of when the notebooks ran successfully (e.g. 2021-01-01), but now they don't run any more, because some python packages got deprecated or updated in a backwards-incompatible way. Instead of specifying the version of each single package in requirements.txt that was current on 2021-01-01, I would like to create an environment with the versions of packages that were up-to-date on 2021-01-01.
Describe the solution you'd like
pip install --as-of 2021-01-01 -r requirements.txt
Alternative Solutions
This could be done by running pypi-timemachine for 2021-01-01 in one terminal window (
pypi-timemachine 2021-01-01 --port 5000
and then executing in another terminal window e.g.pip install --index-url http://localhost:5000/ -r requirements.txt
. However, this is very difficult to automate, so it would be really great if the date could be passed directly to the pip install command.Additional context
See pypi/warehouse#6215 for more discussion.
Code of Conduct
The text was updated successfully, but these errors were encountered: