pyvista/pytest-pyvista

pyvista>=0.37 constraint can conflict with development installs

banesullivan opened this issue ยท 3 comments

I've seen a few times recently where installing pytest-pyvista after having a dev install of pyvista causes a reinstall of pyvista from PyPI. I believe this is due to the pyvista>=0.37 constraint on the package and the fact that pyvista is currently at 0.38.dev0 on main which pip doesn't handle gracefully. I suspect this issue will resolve on the next MINOR version release of pyvista, but until then....

Is pyvista>=0.37 really necessary for this extension? I'm wondering if we could free that constraint or use an earlier compatible version?

You might need to use --pre when using pip for dev versions. But, you might also get pre versions of other packages this way. This part of pip dependency resolution is awkwardly designed IMO.

This package probably doesn't support all pyvista versions as it hooks into the theme and plotter options. Once the tests are fixed, we could find a reasonably older version to start supporting and add to CI.

Having said the above, it might be easier to remove all version constraint and just document a supported version. pytest-mpl has no version constraint for matplotlib. If in the future a backwards incompatible change is made, we could start pinning.

I also ran into this recently and I think it is caused massive problems for my virtual environment pyvista imports, but it is hard to pinpoint what caused the final issue. I was able to fix it with some combination of what I suggested above, but it is way too complex to justify having this pinning. I am now +1 on removing the pin entirely. If we come across any version pinning requirements, we can document them instead.