-
Notifications
You must be signed in to change notification settings - Fork 973
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
Less concise simplification of markers in uv 0.2.35 #6295
Comments
Minimal reproduction:
Then run |
I believe this is because we simplify to DNF as a normalized representation. In some cases, though, CNF would be more concise. I think this can be merged into #5992, but let me know if you disagree. |
I don't think so, because the simpler version only has |
Here's a comment from our code for DNF simplification:
The main issue here is that DNF on its own isn't actually unique. And full simplification might not be feasible. But I think this might require more investigation. But I think this can be safely folded into #5992, which is, I think, the same problem that is reported here: the marker is correct but not as simple as it could be. It is really important though that we have something approach a canonical representation for markers, otherwise the lock file might not be stable. This may come at the cost of concise markers. |
Noticed in python-trio/trio#3068, I haven't tried to get a smaller case. The command is
uv pip compile --universal --python-version=3.8 test-requirements.in -o test-requirements.txt
. Platform is Ubuntu,uv
is version 0.3.0 but we didn't runuv --version
.uv 0.3.0 tries to make this change:
This might mean #5898 doesn't simplify in this case as well. Maybe it's missing some necessary case?
Why is
(implementation_name != 'cpython' and sys_platform == 'win32') or (platform_system != 'Windows' and sys_platform == 'win32') or (implementation_name == 'cpython' and platform_system == 'Windows')
equivalent? (just to show the previous result wasn't just a bug and since it was a bit confusing to me)(implementation_name != 'cpython' and sys_platform == 'win32') or (platform_system != 'Windows' and sys_platform == 'win32') or (implementation_name == 'cpython' and platform_system == 'Windows')
(sys_platform == 'win32' and (implementation_name != 'cpython' or platform_system != 'Windows')) or (implementation_name == 'cpython' and platform_system == 'Windows')
((implementation_name == 'cpython' and platform_system == 'Windows') or (sys_platform == 'win32')) and ((implementation_name == 'cpython' and platform_system == 'Windows') or (implementation_name != 'cpython' or platform_system != 'Windows'))
((implementation_name == 'cpython' and platform_system == 'Windows') or (sys_platform == 'win32')) and ((implementation_name == 'cpython' and platform_system == 'Windows') or NOT (implementation_name == 'cpython' and platform_system == 'Windows'))
((implementation_name == 'cpython' and platform_system == 'Windows') or (sys_platform == 'win32')) and TRUE
(implementation_name == 'cpython' and platform_system == 'Windows') or (sys_platform == 'win32')
The text was updated successfully, but these errors were encountered: