Fix abi3 wheel rejection in check_compatible()
This PR fixes check_compatible() where some valid abi3 wheels were incorrectly rejected. Changes include:
-
Implemented proper abi3 compatibility Added version comparison logic that respects abi3 forward compatibility rules. This should only raise
ValueErrorwhen wheels are truly incompatible. -
Moved
breakstatement inside theifcondition to properly check all tags.
Also improved error message consistency by showing all interpreter versions, similar to how ABI errors are shown.
This closes #245.
Hi @grden. Thanks for making the check_compatible function more robust. As you can see in the comment here:
https://github.com/pyodide/micropip/blob/be08cfde5edcbbedd7ef63df8d5376d1b7dcf718/micropip/_utils.py#L153-L154
is_package_compatible should be the main source to check the compatibility, and if it fails, check_compatible function should be always return error with the reason (sorry about the poor naming)
So the current change is not great, as it changes how check_compatible should behave.
Could you please list up add some concrete examples when is_package_compatible does not work as expected? I read your original issue, but I'm not sure about what each
System configuration issues in Pyodide environments
Custom Pyodide builds with different tag generation
Environment setup problems affecting sys_tags()
means, and when it can occur.