use special values for Install from PyPI/Lock file in install(... index_url)/ Transaction.
from an high level API point of view, I think we could/should treat the pyodide_lock like another index, and when experimenting with proxy, I'd love to be able to explicitley remove the lock as a fallback.
I'm thinking we could assign a specific value say "LOCK" for an index URL and treat that a "look into the lock file".
This would allow things like
await micropip.install('whatever', index_url=['https://anaconda.org/alt_index', 'LOCK'])
or
# I want to make sure to install from PyPI.
await micropip.install('whatever', index_url=['https://pypi.org/simple'])
Along this vein, I think if we see the value 'PYPI', we could replace with "https://pypi.org/simple"
Thoughts @agriyakhetarpal ?
Thanks for opening this before I did, @Carreau! I agree with this approach. It would be quite useful to provide an alias for PyPI and a lockfile.
piplite in JupyterLite seems to offer some additional features (https://jupyterlite.readthedocs.io/en/stable/howto/pyodide/packages.html) such as disabling PyPI fallback through the JSON file, I don't know if the opposite (i.e., what you suggest) is possible to do there?
Sounds good to me.
How about PYODIDE_LOCK or just PYODIDE instead of LOCK? I think the word LOCK isn't that straightforward (some users don't actually need to know about the lockfile).
Yeah, I don't have any particular thoughts on the name, just that a sentinel value would I think be useful/helpfull.