-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC Add micropip redirect API #9
Comments
We've been fretting pretty hard about this over on jupyterlite, as we have some To do this, both for our first-party efforts like In the Anyhow, here is the most recent form of the monkeypatches, as part of the larger, long-winded PR, which includes docs and build-time concerns. At present it uses a |
I also think that the best long term solution would be making a separate channel, which can be a all-in-one solution for not only redirections but also for a patched packages and binary wheels for Pyodide (#655).
I'm +1 one this for a short-term solution for a redirection, which indeed needs a good documentation for packages (#1986).
I think we can make this API private, because most end users won't need this. |
I don't know if wheels are enough for a complete dependency solution without something else to handle non-python dependencies in a maintainable fashion. I really hope that the stars align to make conda-forge/conda-forge.github.io#1401 a reality!
Yet another place I've been getting tripped up over on jupyterlite: while someone writing python-in-the-browser might not need/want to do this kind of thing, I think a deployer of a pyodide-enabled site will greatly appreciate having stable, documented APIs for changing how imports work to make their magic sauce work. The work we're doing on |
I'm all for having priority channels in micropip, and if you are interested in contributing that @bollwyvl it would be very welcome. Related pyodide/pyodide#575
Agreed, wheels are nice but it's probably not ideal to bundle C dependencies in each wheel as one would do with the standard Python build pyodide/pyodide#655 (comment) |
Though even with a separate channel, I feel that distributing significantly rewritten packages that might be partially working (e.g. no binary downloads in pyodide-requests for now) under the same name as the original package is problematic. In particular, a number of large packages have a trademark on their name, and if such a modification is considered a fork, I imagine using the same name for it could be considered a trademark violation. Particularly because the user experience would be worse due to things partially working, which would be negatively associated with the package name. Anyway, I'm not a lawyer, but using a separate name in those packages makes more sense to me. In which case, this redirect mechanism would still be useful. |
The biggest reason I haven't is I've gone ahead and made up a new file format, namely one that puts every response from the warehouse API into a single, package namespaced file... partially, this is because I can't reliably serve responses from I guess I crave a countable number of files to deploy, sufficient to express:
While "official distributions" are nice, I am not aware of a single, full-featured packaging solution that doesn't permit, and in many cases require patches in order to function outside of the authors' original intent. I've never seen an open source package get angry about this... but then, some of these things we're having to do in the browser are rather nasty. That being said, there is a long (and maybe questionable) history of a difference between the distribution and importable names of python packages... does overloading an importable also trigger warnings? If we get to where |
Related to pyodide/pyodide#1986 the limit between,
is not very clear. For instance, if pyodide/pyodide#1956 re-implements requests with WebAPI can we really say we are still using requests, as opposed to
pyodide-requests
a fork? Maybe we could define the limit as,pyodide-<package-name>
.However, even in the second case, it might still make sense to install it e.g. as the original name (e.g.
requests
) since lots of packages would have this in dependencies, and won't bother with,In which case, we could implement some redirect system in micropip, so that,
would install
pyodide-requests
instead.It could be maybe just a dict,
but that requires good documentation. Unless
micropip.add_redirect
/micripip.remove_redirect
would be better?What do you think?
The text was updated successfully, but these errors were encountered: