-
Notifications
You must be signed in to change notification settings - Fork 211
pyproject: precisely constrain python-version to 3.11 or later #966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyproject: precisely constrain python-version to 3.11 or later #966
Conversation
Please note that I am an absolute heretic and generated this change with
So please just give a quick look over the lock file. In particular it added a lot of |
To be clear we do support 3.12 and 3.13 and (optimistically) everything up to but not including Python 4. |
Oh, I see! OK, then the original constraint is correct. Maybe there's a way to do this that isn't ugly that uv won't bark about. I'll put this in draft for a minute. |
Try >=3.11,<4 |
Oh and to regenerate the lockfile you run |
1f535f5
to
7c62cab
Compare
Yep; I figured out that |
Thanks! |
`uv` pointed this out to me while running glasgow; the `~=` operator for dependency resolution is a bit subtle; it basically allows you to "round up" the upper bound of a dependency but it does so based on the least-sigificant-specified component of a version number. Basically that means `~=3.11` is equal to "from any version 3.11 up-to < 4.0" but `~3.11.0` means "from any version 3.11.0 up-to < 3.12.0". We want the first, but it's apparently subtle enough that uv (probably correctly, tbh) warns about it. Let's write it in a more unambiguous way. Signed-off-by: Austin Seipp <[email protected]>
That's an amusing branch name you've got. |
Head branch was pushed to by a user without write access
7c62cab
to
44998dd
Compare
I also went ahead and rewrote the commit message too, so it's actually accurate. Don't care too much about the PR name, though. And the PR name is from Jujutsu which I help maintain :) It's really good and you should try it. You might even end up falling in love with it for making version control so nice /shameless-plug |
I keep meaning to look into jj, yeah! |
uv
pointed this out to me while running glasgow; the~=
operator for dependency resolution is a bit subtle; it basically allows you to "round up" the upper bound of a dependency but it does so based on the least-sigificant-specified component of a version number.Basically that means
~=3.11
is equal to "from any version 3.11 up-to < 4.0" but~3.11.0
means "from any version 3.11.0 up-to < 3.12.0"; in this case we want the second one.Funny enough, fixing this and re-generating the lockfile actually looks like it correctly removes many wheel entries for other major python versions like 3.12. So that's a good sign that uv's hint was correct.