1 unstable release
0.1.0 | Jun 10, 2024 |
---|
#2551 in Parser implementations
100KB
351 lines
update-pypi-deps
Parse pypi dependencies from pyproject.toml and output the latest versions
NB: This is a low-investment toy / hobby project.
Features
- Parses a
pyproject.toml
- Pulls out the
dependencies
andoptional-dependencies
- Concurrently fetches the default pypi release (usually but not always the latest version) for each dependency in each of these
- Prints this out in a format easy to copy and paste back into your pyproject.toml
Introduction
Sometimes I want to update all of a python's project top-level dependencies to the latest version and see if it still works. If so, I commit the change. If not, I try to sort out which of the dependencies are holding me back and why. Most sane people will just use something like poetry or pip-tools, but after getting burned by investing time to learn Pipenv, I now prefer to do it the old fashioned way.
Quickstart
$ update-pypi-deps [ -i /path/to/pyproject.toml ]
Cargo
- Install the rust toolchain in order to have cargo installed by following this guide.
- run
cargo install update-pypi-deps
nix
$ nix run github:n8henrie/update-pypi-deps
Troubleshooting / FAQ
- This currently doesn't handle complex version constraints (like
fauxmo>0.1,<0.6
); it just reuses the same contraint it is given, but with a new version number
Dependencies
~13–26MB
~367K SLoC