[HN Gopher] The Python Package Cache
       ___________________________________________________________________
        
       The Python Package Cache
        
       Author : dstowell
       Score  : 19 points
       Date   : 2021-03-19 20:28 UTC (2 hours ago)
        
 (HTM) web link (blog.replit.com)
 (TXT) w3m dump (blog.replit.com)
        
       | williamsmj wrote:
       | This may be a question about the existing UPM rather than the new
       | thing in this post (the cache), but it's not clear to me how this
       | system handles versioned dependencies or reproducibility issues.
       | import statements (in python) are not versioned. Does anyone
       | know?
        
         | dstowell wrote:
         | 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.
        
           | williamsmj wrote:
           | 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!)
        
             | amasad wrote:
             | 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.
        
       | geostyx wrote:
       | This is awesome. Installing packages was already fast, so this is
       | just icing on the cake!
        
       | dataflow wrote:
       | Sounds like this is Linux-only?
        
         | amasad wrote:
         | Mac and windows too https://github.com/replit/upm#macos
        
           | dataflow wrote:
           | Oh wow! They talked about OverlayFS so I wondered what they'd
           | do on other platforms.
        
       ___________________________________________________________________
       (page generated 2021-03-19 23:01 UTC)