馃悰 Bug
micropip.install does not reliably select the best-matching tagged wheel.
To Reproduce
-
Open the official website's Pyodide REPL
-
Use micropip to install a package with multiple pure Python 3 wheels. For example, my compose package has three (one for older Pythons, one for 3.5+ with async/await features added, and one for 3.8+ to use native PEP-570 positional-only arguments):
>>> import micropip
>>> await micropip.install('compose')
-
Try importing acompose. If the py2.py30-tagged wheel got installed, this will fail:
>>> from compose import acompose
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: cannot import name 'acompose' from 'compose' (/lib/python3.10/site-packages/compose.py)
Expected behavior
The wheel tagged py38 gets installed (since Pyodide in that REPL is 3.10 at this time), import of acompose succeeds, and inspecting the signature of acompose.__call__ shows that PEP-570 positional-only syntax is being used:
>>> from compose import acompose
>>> help(acompose.__call__)
Help on function __call__ in module compose:
async __call__(self, /, *args, **kwargs)
Call the composed function.
>>>
馃悰 Bug
micropip.installdoes not reliably select the best-matching tagged wheel.To Reproduce
Open the official website's Pyodide REPL
Use
micropipto install a package with multiple pure Python 3 wheels. For example, mycomposepackage has three (one for older Pythons, one for 3.5+ withasync/awaitfeatures added, and one for 3.8+ to use native PEP-570 positional-only arguments):Try importing
acompose. If thepy2.py30-tagged wheel got installed, this will fail:Expected behavior
The wheel tagged
py38gets installed (since Pyodide in that REPL is 3.10 at this time), import ofacomposesucceeds, and inspecting the signature ofacompose.__call__shows that PEP-570 positional-only syntax is being used: