New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix vtk version support #2961
fix vtk version support #2961
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2961 +/- ##
==========================================
- Coverage 94.30% 90.02% -4.28%
==========================================
Files 76 76
Lines 16565 16569 +4
==========================================
- Hits 15622 14917 -705
- Misses 943 1652 +709 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, in general, looks good to me. Maybe for a future PR: we mix skipping tests completely and checking that we raise with VTKVersionError
in the code base. In my opinion it would be better to check that it raises to make sure that we handle these cases with useful errors.
setup.py
Outdated
@@ -18,7 +18,7 @@ | |||
'pillow', | |||
'appdirs', | |||
'scooby>=0.5.1', | |||
'vtk', | |||
'vtk>=8.1.2,<9.3', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does setup.py
support <=9.2.0.*
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was having trouble permitting a release candidates with any version range unless you specifically permit it, as in:
Lines 21 to 22 in 88a8940
'vtk>=8.1.2, <=9.2.0; python_version < "3.10"', | |
'vtk>=8.1.2, <=9.2.0, ==9.2.0rc1; python_version == "3.10"', |
What I did was explicitly permit the release candidate wheel, but only for Python 3.10. Personally, I don't feel that release candidates should be permitted by default, but only in special circumstances like general unavailability otherwise as in the case of Python 3.10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me. Ideally the rc part could be removed before the release in pyvista. If it can't, should we use some form of ==9.2.0.*
, so that later release candidates can be used? I'm not sure. Maybe best to pin it and manually keep updating it until the release? This way there are no surprises.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it can't, should we use some form of ==9.2.0.*, so that later release candidates can be used?
If someone knows how to get release candidates working with a version range, please let me know. Otherwise, I'll permit ==9.2.0rc
for PyVista for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my other suggestion, if that doesn't work, I'm in favor of ==9.2.0rc1
and manually bumping it as needed, and hopefully removing it before next release (vtk had a 1 month release cycle last time).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed then. Let's keep to this for now and hopefully 9.2.0 is out before the next release of PyVista.
Agreed, that seems like a better practice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also pin python_requires
to be <= 3.10?
I'm not sure. I don't see an upper limit for |
Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
This is ready for review/approval. Checking showing up as yellow just means we need to update our branch protection rules once this PR is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Resolves #2867 by implementing matrix testing for VTK and Python.
vtk==8.1.2
vtk==9.0.3
vtk==9.1
vtk==9.2.0
Additionally, because we aren't testing Python 3.7 with 8.1.2, we've had some VTK version support regressions only discovered when locally testing 3.7. This PR fixes those regressions.
Also, I propose that we support the oldest VTK version with a viable wheel available for actively supported versions of Python available on PyPI. For example, the lowest supported version of Python as of this PR is Python 3.7, and the lowest supported version of VTK for 3.7 is vtk==8.1.2.
This is reflected in the
install_requires
in oursetup.py
.As soon as support for Python 3.7 is dropped, we can then drop support for both Python 3.7 and VTK 8.1.2 in both our
python_requires
andinstall_requires
.As much as I would prefer to follow NumPy's version support NEP 29 deprecation policy, I know of many who are stuck using older versions of Python and need support for older versions of VTK and cannot upgrade agressively. With this approach we can still depricate support for older versions of VTK and Python, but in a manner that works for all that use this library with any currently supported version of Python.