If the developers can’t agree on whether they work with alternative dependencies with version checks or not, it’s not a problem of Python. Bugs may appear for many reasons, and the code logic is one of the main ones.
I don’t suppose the setup process should consider the dependencies further than the current line in the pyproject.toml
file. It’s absolutely possible that, at the end, there will be all the possible dependencies installed. But still, I’m sure it’s better to allow some alternatives’ statements rather than to build a package with hard-coded dependencies or with a default extra, essentially hoping for the best.
A package maintainer can inform that the package requires any package of a list to be present in the system. However, who does read the docs? The users who do should be immortalized in stone. I state that my code requires Python >= 3.8 next to the header of the docs twice, but recently, one complained that the code crashes on Python 3.2 (point two, not point twelve). When a user faces an error message with a button, they click the button regardless of the message text and the button title. So, I don’t consider even the most thorough explanation viable for an end-user.
Off-topic: A curious case of a message button
At work, we got far too frustrated with an app that crashed twice a day with no apparent reason. When it crashed again, I took a screenshot of the error message and placed in on the desktop background, stretching it proportionally so that it covered most of the desktop. I haven’t moved the desktop items, so some of them covered the picture. Two hours later, I got a phone call from my boss. He said that he can’t close an error message. Despite the picture was some 4 times larger than the original message (therefore, the pixels were clearly visible) and was partially covered with desktop items, all the boss noticed was the OK button.
As the first attempt, I propose leaving the resolution order to the developer. That is, the requirements should be processed (tested and installed if needed) one by one as they appear, and the alternatives should be processed in the order they’re listed, left to right. Again, if a developer opts in to the alternatives’ approach, they should be aware of the possible consequences, including the installation of more packages than the possible minimum.