jazzband / pip-tools

A set of tools to keep your pinned Python dependencies fresh.
https://pip-tools.rtfd.io
BSD 3-Clause "New" or "Revised" License
7.67k stars 608 forks source link

Pip-tools optimizer for lib versions #2030

Closed ManPython closed 6 months ago

ManPython commented 8 months ago

What's the problem this feature will solve?

Find right libs version to create right requirements.txt from conditions < > =< => etc

Describe the solution you'd like

Something like this: (https://github.com/pypa/pip/issues/12427) Update optimizer for lib versions and backuper for optimal and last working requirements

Alternative Solutions

Cooperate with PIP around optimal versions for requirements.txt

Additional context

webknjaz commented 8 months ago

It's already possible with Pip's constraint files periodically regenerated by pip-tools and updated via PR where it's visible that the tests pass.

ManPython commented 8 months ago

@webknjaz Can You indicate more details? I'm not sure about PR shortcut and the method to reach target. It's possibe via pip-tools or PIP? Soo.. what I should do when I broken whole jupyter after update?

ManPython commented 8 months ago

My idea was more as combine around something like: https://github.com/tox-dev/pipdeptree

webknjaz commented 8 months ago

Soo.. what I should do when I broken whole jupyter after update?

You can't do anything unless you have a constraint file with the exact pins upfront.

You have to set up and maintain a constraints file, only updating it with testing. Once you have it, you can recreate your env from scratch.

You can either combine these two or opt to use an entirely separate set of tools that manage venvs.

I made a note the other day, regarding some conceptions I wish people understood better: https://github.com/jazzband/pip-tools/issues/1326#issuecomment-1834517252.

ManPython commented 8 months ago

I imagining solution in totally other vision I think.. and I think not exist solution like this - "optimal" for versions. By this I think that tool should also check the possible new libs for env and whole depedency and the build right requiments and related types. Soo.. yes.. can do anything like coder with code.. but tool not exist now to do this.

webknjaz commented 6 months ago

I think the currently talked through proposal to standardize lockfiles on discuss.python.org will solve your concerns but there's nothing to be done in pip-tools.

ManPython commented 6 months ago

Can you refer right discuss link? This? https://discuss.python.org/t/lock-files-again-but-this-time-w-sdists/46593/9 https://discuss.python.org/t/lockfile-implementation-in-the-standard-library-ipc-lockfile-not-packaging/44896

webknjaz commented 6 months ago

Yes