ENH: recommended dependencies numexpr and bottleneck should be managed extras in pandas setup.cfg (original) (raw)

Pandas installation guide strongly recommends packages numexpr & bottleneck. However, it provides no way to manage these dependencies nor let a package manager know that the version of numexpr & bottleneck on your container should be pinned to pandas. Given that setup.cfg provides a very convenient way to solve all of the above problems, we should solve them

image

Describe the solution you'd like

Use setup.cfg options as documented here to make numexpr & bottleneck optional extras for a pandas install.

Once this is done, a user will be able to ensure version alignment by

in requirements.txt or setup.py

pandas[numexpr, bottleneck] == 1.22.4 # install pd 1.22.4 and compatible numexpr, bottleneck versions

The proposed solution is simple to do, simple to maintain, and already done by major libraries in similar situations (moto, aiobotocore).

Not having this solution wastes user time by forcing them to manually maintain versions of pandas dependencies that are not clearly linked to pandas, save in the brains of users and by manually referring to an install docs page.

I am happy to write the PR.

API breaking implications

None. This will simply make package management easier, and cause no changes to users who do not deliberately take action to enable this feature

Describe alternatives you've considered