micropip icon indicating copy to clipboard operation
micropip copied to clipboard

Fix abi3 wheel rejection in check_compatible()

Open grden opened this issue 5 months ago • 1 comments

This PR fixes check_compatible() where some valid abi3 wheels were incorrectly rejected. Changes include:

  1. Implemented proper abi3 compatibility Added version comparison logic that respects abi3 forward compatibility rules. This should only raise ValueError when wheels are truly incompatible.

  2. Moved break statement inside the if condition 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.

grden avatar Aug 14 '25 06:08 grden

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.

ryanking13 avatar Aug 14 '25 08:08 ryanking13