-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Use packaging to do version comparisons. #20437
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
Conversation
# https://github.com/ImageMagick/ImageMagick/issues/2720 | ||
raise ExecutableNotFoundError( | ||
f"You have ImageMagick {info.version}, which is unsupported") | ||
return info | ||
elif name == "pdftops": | ||
info = impl(["pdftops", "-v"], "^pdftops version (.*)", | ||
ignore_exit_code=True) | ||
if info and not ("3.0" <= info.version | ||
# poppler version numbers. | ||
or "0.9" <= info.version <= "1.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.
Note the <= 1.0
was an incorrect conversion from 32ed5bd
Hmm, guess I need to actually fix compatibility with old |
looks like you either need to replace |
I looked through downstream distributions and the ones that are at least close to latest Matplotlib have at least |
... as `distutils` is deprecated in Python 3.10. The minimum is ~a year ago, which appears to be available in all distros that are close to current in Matplotlib.
PR Summary
... as
distutils
is deprecated in Python 3.10.Since this is somewhat lower-level, I picked a minimum version on the same timescale as Python support, namely about 3 years ago.Minimum version is ~12 months ago, since this is a Python-only package and all relevant downstreams appear to have it.Maybe this should get an API note or something?
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).