Skip to main content

pip-rewind

pip-rewind is a command-line tool that can rewind pypi module versions (given as command-line arguments or read from a requirements.txt file) to a previous date in time.

This tool doesn't install any packages itself - rather, it generates output with modules constrained to specific versions, which can then be fed into pip install.

Usage

$ pip-rewind --date "09/01/2020" requests > new-requirements.txt
$ pip install -r new-requirements.txt

Or give it a requirements file:

$ pip-rewind --date "07/01/2019" -r requirements.txt > new-requirements.txt
$ pip install -r new-requirements.txt

You can also pipe the output directly to pip if preferred:

$ pip-rewind --date "12/01/2020 -r requirements.txt | pip install -r /dev/stdin

Currently, this package only parses a simple subset of valid requirements lines:

modulename
modulename<=5.0.0
modulename==4.0.0

Any line that describes a pypi dependency named modulename, possibly with a version identifier after, is valid - this tool simply cares about modulename since the version will be rewound anyway. Other lines (such as git dependencies) are ignored.

Motivation

Starting to work on old projects that don't have all their dependencies listed and version-constrained can be difficult (especially when some of those dependencies interact with specific versions of OS packages). The simple existence of a line specifying redis in a requirements.txt file without its version can lead to possible breakage when dealing with month- or year-old software.

LICENSE

MIT

Release files for pip-rewind 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pip-rewind 0.1.1
File Size Uploaded
pip-rewind-0.1.1.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pip-rewind 0.1.1
File Interpreter ABI Platform
pip_rewind-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / pip-rewind-0.1.1.tar.gz

Download URL pip-rewind-0.1.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ff8cb49cd078d638e1165476d976e836f399690cc193865d70a822483d338287
BLAKE2b-256 checksum
How to use checksums
8d0deaaadbc03b1d66545c85346ca87df111771108efc8dc7ea52ee70abd50a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / pip_rewind-0.1.1-py3-none-any.whl

Download URL pip_rewind-0.1.1-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9516c52405f8ebc8b0a2fe1e08bac8b0ca56028a57db6946886ce4dada64d167
BLAKE2b-256 checksum
How to use checksums
a253c08bd18b2dd24b53b32fc712ecc5ca4d5992c9b7efd70a0da0ffcfd837ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page