You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say we have requirements a >= 1 ; sys_platform == 'linux' and a < 2 ; sys_platform == 'darwin'. There's two possible solutions: a==1 and a==2, and only a==1 for both forks.
When we resolve for latest versions (the default), we should process the fork a<2 first, since it will resolve to a lower version that the other fork accepts, while a >= 1 resolves to a preference (a==2) that a<2 rejects. When we resolve for lowest versions, it's the inverse. While either way is correct, only a==1 will give us a better (smaller) solution that is consistent between forks.
The same goes for requires-python: A fork with python_version >= "3.10" needs to run before python_version >= "3.12" , since the former allows less version than the latter; here it's independent of the version order.
We need to figure out the exact rules for prioritization considering highest vs. lowest versions, requires-python, lower vs. upper bounds and handling splitting over multiple packages.
The text was updated successfully, but these errors were encountered:
Agree with this. I actually think that (if done right) this would've prevented the problematic resolution in #4885. (I don't know if it would solve that problem in general though.)
## Summary
First part of: #4926. We should
solve forks that _don't_ expand the world of supported versions (e.g.,
`python_version >= '3.11'` enables us to select new packages, since we
narrow the supported version range).
Say we have requirements
a >= 1 ; sys_platform == 'linux'
anda < 2 ; sys_platform == 'darwin'
. There's two possible solutions:a==1
anda==2
, and onlya==1
for both forks.Currently, it's order dependent:
resolves 3 packages (
a==1
anda==2
),resolves 2 packages (only
a==1
).When we resolve for latest versions (the default), we should process the fork
a<2
first, since it will resolve to a lower version that the other fork accepts, whilea >= 1
resolves to a preference (a==2
) thata<2
rejects. When we resolve for lowest versions, it's the inverse. While either way is correct, onlya==1
will give us a better (smaller) solution that is consistent between forks.The same goes for requires-python: A fork with
python_version >= "3.10"
needs to run beforepython_version >= "3.12"
, since the former allows less version than the latter; here it's independent of the version order.We need to figure out the exact rules for prioritization considering highest vs. lowest versions, requires-python, lower vs. upper bounds and handling splitting over multiple packages.
The text was updated successfully, but these errors were encountered: