You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Problem
Often I want to install a package where I wished the package declared a subset of dependencies to be installed as well.
Python and PEP 508 solves this. See also https://packaging.python.org/en/latest/specifications/dependency-specifiers/#dependency-specifiers.
An example of this can be seen here:
pip install diffusers["torch"]
The
["torch"]
part tells us to installdiffusers
with a subset of tools, in this case alsotorch
.A real-world use case
https://github.com/socketio/socket.io/ depends on the
ws
package. But the Node.js API now includes a WebSocket implementation of its own.If I could then specify this:
I could skip that extra package and use the built-in one instead, without having to pollute my
node_modules/
with unnecessary packages.Is this a good or bad idea for an RFCS?
Beta Was this translation helpful? Give feedback.
All reactions