Skip to content

Drop support for Python 3.9 to maintain testing consistency #2653

@matthewfeickert

Description

@matthewfeickert

Testing against matplotlib with Python 3.9 is starting to fail given modern versions of pyparsing brought in from matplotlib.

$ python -m pip show pyparsing
Name: pyparsing
Version: 3.3.1
Summary: pyparsing - Classes and methods to define and execute parsing grammars
Home-page: https://github.com/pyparsing/pyparsing/
Author: 
Author-email: Paul McGuire <ptmcg.gm+pyparsing@gmail.com>
License-Expression: MIT
Location: /home/feickert/Code/GitHub/scikit-hep/pyhf/.venv/lib/python3.13/site-packages
Requires: 
Required-by: matplotlib
platform linux -- Python 3.9.25, pytest-8.4.2, pluggy-1.6.0
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/_pytest/main.py", line 287, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pluggy/_hooks.py", line 512, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR>     raise exception
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR>     teardown.throw(exception)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/_pytest/logging.py", line 780, in pytest_sessionstart
INTERNALERROR>     return (yield)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pluggy/_callers.py", line 121, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/_pytest/terminal.py", line 848, in pytest_sessionstart
INTERNALERROR>     lines = self.config.hook.pytest_report_header(
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/_pytest/config/compat.py", line 79, in fixed_hook
INTERNALERROR>     return hook(**kw)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pluggy/_hooks.py", line 512, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR>     raise exception
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pluggy/_callers.py", line 121, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pytest_mpl/plugin.py", line 133, in pytest_report_header
INTERNALERROR>     import matplotlib
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/matplotlib/__init__.py", line 970, in <module>
INTERNALERROR>     rcParamsDefault = _rc_params_in_file(
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/matplotlib/__init__.py", line 904, in _rc_params_in_file
INTERNALERROR>     config[key] = val  # try to convert to proper type or raise
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/matplotlib/__init__.py", line 739, in __setitem__
INTERNALERROR>     cval = self.validate[key](val)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/matplotlib/rcsetup.py", line 427, in validate_font_properties
INTERNALERROR>     parse_fontconfig_pattern(s)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/matplotlib/_fontconfig_pattern.py", line 83, in parse_fontconfig_pattern
INTERNALERROR>     parser = _make_fontconfig_parser()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/matplotlib/_fontconfig_pattern.py", line 64, in _make_fontconfig_parser
INTERNALERROR>     prop = Group((name + Suppress("=") + comma_separated(value)) | oneOf(_CONSTANTS))
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/pyparsing/util.py", line 445, in _inner
INTERNALERROR>     warnings.warn(
INTERNALERROR> DeprecationWarning: 'oneOf' deprecated - use 'one_of'

To get around this, support for Python 3.9 will need to be dropped.

Metadata

Metadata

Labels

BreakingResults in a known breaking changebuildChanges that affect the build system or external dependencies

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions