News for hackers. Stuff that matters.
Re:The Python Package Cache by dstowell on Friday March 19, 2021 @05:32PM (#26518326)
UPM's philosophy is to use a lockfile to specify dependency constraints. The first time you press run and UPM guesses which packages satisfy which import statements, those versions are put into the lockfile.
Re:The Python Package Cache by williamsmj on Friday March 19, 2021 @06:18PM (#26518697)
Can the user read/export the lockfile in a portable format (e.g. requirements.txt)? I love the idea of magic like this, but I'm less keen if it comes at the price of lock-in. (And feel free point me to the docs!)
Re:The Python Package Cache by amasad on Friday March 19, 2021 @06:36PM (#26518832)
No magic, it's automating and hooking into existing open-source tools. For Python its poetry (https://python-poetry.org/), not requirements.txt because UPM needs to present strong guarantees on reproducibility -- otherwise things like content-addressable caching wouldn't be possible. Poetry is open-source and UPM is too: https://github.com/replit/upm

Every Replit Python project can be downloaded and you'll have the spec file and the lock file so you can install the same dependencies locally.