Oops, this one's pretty embarrassing.
We'll need separate lockfiles for each Python version we test.
The strategy I have in mind is to create separate environment-python-3.X.yml files for each Python version, and then run the lock command on both (simultaneously) the primary environment.yml and environment-python-3.X.yml.
That description was probably confusing, so it's probably easier to look at the implementation I did in pymc-labs/CausalPy#281.
With this scheme I find it slightly awkward to maintain separate files just to specify the desired Python version, but ultimately I think it should be very little effort. (I'm open to alternative suggestions.)
RELATED: If we want the upcoming release to support micromamba v1, we should add that to the matrix as well.