fix(markers): apply lazy evaluation to markers#877
fix(markers): apply lazy evaluation to markers#877
Conversation
3737cf9 to
f95379c
Compare
|
Is this different to #834 ? |
|
@wimglenn Thank you, I just noticed this PR. In fact, #834 is still eager, but it allows exceptions to exist and considers them during evaluation. The implementation also doesn't look so clean By making the evaluation lazy there would be a minor breaking change that illegal markers will be missed if being shortcutted. |
|
FWIW PR #834 started off as a simple lazy evaluation like this but discussion on issue #774 indicated an aversion to the edge cases this approach introduces with order dependency and silently ignoring malformed expressions. |
|
Yes, the packaging maintainers need to give clear guidance here, I think we have narrowed down to there only being 4 options on solving the practical problem users are facing:
If the answer is 4 I am willing to start the discussion on clarifying the spec, specifically the two separate standards topics: packaging rejecting solution 1. And whether the spec allows for 2 or 3. I do not have the capacity to propose a new solution, but I am willing to explain the practical issues and put forth the already outlined options to see if there is a consensus in the Python packaging community. |
This is not true, malformed expressions will be rejected by the parser and are never caught by the evaluation. |
Can you please add additional tests for this, assuming they don't exist already. My experience working on pre-releaes is packaging is far from exhaustively tested on edge cases. |
Signed-off-by: Frost Ming <me@frostming.com>
Signed-off-by: Frost Ming <me@frostming.com>
f95379c to
aada1f2
Compare
I should have been more specific, but I meant this repo's non-standard error in cases of "bad" version comparisons. |
Signed-off-by: Frost Ming <me@frostming.com>
a1450a6 to
2e4b85b
Compare
IIUC you mean |
|
Closing since #939 was accepted and will be in the RC (coming soon). Please test and reopen if consideration on this still is needed. Combined with other changes, hopefully this all works. |
Signed-off-by: Frost Ming me@frostming.com
Fix #774
Change the marker evaluation to lazy evaluation so it is possible for boolean shortcuts. I didn't test but there should also be a performance gain.