Context
Python 3.7 EOL is happening in 2 months: https://endoflife.date/python
and the usage of pkg_resources with ufl causes a lot of deprecation warnings:
python3 -Wd -c "import pkg_resources"
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
As Legacy DOLFIN does not support main branch of UFL, this is safe from a DOLFIN perspective, as DOLFINx, requires Python>=3.8 (https://github.com/FEniCS/dolfinx/blob/main/python/setup.py).
As far as I can tell, Firedrake still supports Python 3.7.
Drop it. Firedrake policy is to support Python for its designated lifetime. However since we're only a couple of months off dropping 3.7 anyway, there is nothing to be gained by doing extra work to support it.
Built-in functionality to use with Python>=3.8, ref: https://docs.python.org/3/library/importlib.metadata.html
Context Python 3.7 EOL is happening in 2 months: https://endoflife.date/python and the usage of
pkg_resources
withufl
causes a lot of deprecation warnings:As Legacy DOLFIN does not support main branch of UFL, this is safe from a DOLFIN perspective, as DOLFINx, requires Python>=3.8 (https://github.com/FEniCS/dolfinx/blob/main/python/setup.py). As far as I can tell, Firedrake still supports Python 3.7.