PEP 751: lock files (again)

I like this framing and if I’m understanding things correctly, would give us a way to decide how to lock in face of additional environmental constraints that aren’t currently captured in markers and tags. I’m thinking specifically about the whole GPU question[1]. @msarahan can probably speak to the intersection between GPU support and lock files more coherently than I can, but I’m also wondering if either @brettcannon or @ncoghlan have thought about how these topics might interact. There are (at least) two things I think we’d need to think about:

  • Locking for a specific environment. E.g. You resolve all your variants for this exact configuration of hardware and software, and capture those in per-file locking. Change your GPU and you invalidate your lock file.
  • Locking for a flexible/portable environment. E.g. you don’t fully resolve all your variants at lock time, but you do know the package set you want to install. However, you want the lock files to be portable between machines with potentially different variants, so you have to leave some of the installation choices up to the installer and not the locker. E.g. move your lock file to a machine with a different GPU and everything still “works”. I assume this would fall under per-package locking.

  1. although I use “GPU” in the more generic sense ↩︎