-
Notifications
You must be signed in to change notification settings - Fork 942
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
Have a way to filter packages by date #6215
Comments
Interesting! Unless I'm missing something, this seems like an implicit form of |
@jamadden - just to give a very specific use case, I had to give a demo at SciPy last week which involved a package that ended up pulling in dozens of dependencies. I also gave this demo a year ago. However, something had broken in the mean time in one of the dependencies, and I didn't have time to try and debug it to figure out which one was the issue, and I also had no easy way of knowing which versions of dependencies I was using back then. Now I know I was able to do the demo a year or so ago (and I know on what date I demoed it). I didn't run The approach described here can actually be combined with To take this one step further, this also allows time-based bisection - if I can bisect in time to find when things started to break, I can identify which specific release of which specific package caused the issue. (edited for clarity) |
FWIW, if we want to do this, we'd do this with the installer cooperating with the index. PyPI is not going to do any filtering on its end. This is important to maintain ease of utilizing caching. There are 2 ways that have come up, to do this, in a private discussion elsewhere:
(apologies for terseness, going for a nap) |
Actually, I'd like to say that the I'd be interested to know in what ways using a standalone proxy like |
Does this work? I was just imagining a tool like this to fix many abandoned Colab notebooks from old research that no longer compile. |
@Amusesmile yes, last time I tried pypi-timemachine worked |
I think it is really a shame that this is not being integrated in pypi. 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 |
For what it's worth, |
In theory, this is something that could be implemented in all installers now, since we now have an I think this can be closed from PyPI's end and should instead be a feature request on pip's end. |
I didn't know PyPI and pip were separate. How do I make a feature request in pip? |
What's the problem this feature will solve?
There is currently no way to reproduce a
pip install ...
command from a certain date in the past. Even if I were to run e.g.pip install astropy==2.0.11
, recent versions of dependencies would get picked up. It would be great if there was a way through the PyPI API to exclude packages added after a certain date, which could then be extended to a pip flag or configuration option. This would effectively enable reproducible installs from PyPI.Describe the solution you'd like
I've developed a small package called pypi-timemachine which implements this feature by running a tiny local proxy PyPI server that excludes packages released after a certain date. This means that it's possible to then run a pip install command that will install the full stack of dependencies as if the user was at some date in the past.
Additional context
There are two ways I can see to implement this into PyPI - either the main index URL for PyPI could be made to take various filters as GET arguments, e.g.:
https://pypi.org/simple?date-max=2013-03-02T10:30:23
or new routes could be added such as
https://pypi.org/simple/snapshot/2013-03-02T10:30:23
There might be other ways to do this that I haven't thought of though. If there is interest in this kind of functionality, I'd be happy to try and give it a go. If there is no interest, feel free to close this and I can continue to maintain pypi-timemachine as a separate project.
The text was updated successfully, but these errors were encountered: