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

Install packages up to a certain date #6257

Open
andras-gyarmati opened this issue Feb 12, 2019 · 10 comments · May be fixed by #12717
Open

Install packages up to a certain date #6257

andras-gyarmati opened this issue Feb 12, 2019 · 10 comments · May be fixed by #12717
Labels
type: feature request Request for a new feature

Comments

@andras-gyarmati
Copy link

What's the problem this feature will solve?
Some old python apps wont work with the latest packages. Using this date parameter feature like the version number parameter feature would allow us to use some older apps that are no longer supported or being developed.

Describe the solution you'd like
Pip would look up the latest packages before a certain date or between two dates and only install packages up to that date or in that time span.

If you have an old app that only works with the old packages you can not run it now, but with this feature you could get all the necessary package versions to be able to use the app.

Alternative Solutions
The only other idea was to manually search for the right package versions but with many dependencies it would take a very long time.

Additional context
I would like to use the old nRF Connect for my Nordic Power Profiler Kit because the new one is missing a key feature I need.
The old one is written in python but it's not supported anymore.

@pradyunsg pradyunsg added type: feature request Request for a new feature S: needs triage Issues/PRs that need to be triaged labels Feb 13, 2019
@uranusjr
Copy link
Member

I feel this should be handled by version specifiers. Dates are just a less robust way to do the same thing.

@uranusjr
Copy link
Member

Alternatively, maybe PyPI can have a feature like a way back machine, accepting a date parameter to show only packages up to some point…? I don’t know, that sounds like a cool feature, but probably difficult to implement.

@pfmoore
Copy link
Member

pfmoore commented Feb 14, 2019

If the data is available on PyPI, then a small front-end that wraps PyPI in a service that only returns packages that were available on a particular date should be very easy to do.

I suspect there are a lot of situations where a small adapter webapp in front of PyPI would be the simplest solution, rather than adding more features to either pip or PyPI.

@uranusjr
Copy link
Member

@pfmoore Good point. The simple API does not have such information, but for PyPI (warehouse, specifically), the publish time is available via the JSON API, so it should be straightforward to build a server that fetches data from there and renders a simple API page.

@chrahunt
Copy link
Member

chrahunt commented Jul 23, 2019

The PyPI side of this should be covered by pypi/warehouse#6215. The author of that issue also included a link to their project, pypi-timemachine, which implements the desired behavior.

@spullara
Copy link

I think that this would be very useful when creating Docker containers. Right now I need to write a Dockerfile that does all the installs and pip freezes the installation, then run a container to copy the requirements.txt out of the container, then change the Dockerfile to copy the requirements.txt into the context and use pip install -r rather than installing individual packages. Instead I could just put the current date in the Dockerfile and it would work forever. Does anyone have a better workflow?

@uranusjr
Copy link
Member

I think pypi-timemachine covers the use case and it is not general enough to be included in pip. Combined with uranusjr/simpleindex#16 you’d have a complete one-command solution.

I’ll venture to close this as no-action for now.

@uranusjr uranusjr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
@uranusjr uranusjr added resolution: no action When the resolution is to not do anything and removed state: needs discussion This needs some more discussion labels Feb 16, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
@pradyunsg pradyunsg removed the resolution: no action When the resolution is to not do anything label May 17, 2024
@pypa pypa unlocked this conversation May 17, 2024
@pradyunsg
Copy link
Member

Reopened based on pypi/warehouse#6215 (comment)

@notatallshaw
Copy link
Member

Isn't this the same as #12275 ?

@notatallshaw
Copy link
Member

I would add the more recent discussion is in #12275 as it is based on the standardized upload-time field in the Simple API 1.1, as opposed to the discussion in this thread which is about the non standard PyPI JSON API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants