I can think of a more concrete use case: optional features. pip, for example, detects whether keyring
is installed, and provide extra functionalities if its presence is detected. But this introduces some bad interactions when a keyring makes backward incompatible changes, since we don’t know if the user has the correct keyring
installed. The traditional way to deal with this is by parsing package metadata and only provide the functionality if the version satisfies, but that also means the user has to take extra care and install a compatible version—which is not declared anywhere—if they that extra feature. This new metadata would resolve that during the installation phase, and a compatible keyring
would be installed automatically if possible. (Runtime detection is still needed since it’s still possible for an incompatible version to be installed, but I don’t think there’s a good way around that.)
1 Like