Skip to content

Pin setuptools version in fenics environment to fix pkg_resources import#616

Merged
brownbaerchen merged 4 commits intomasterfrom
copilot/fix-fenics-ci-tests
Feb 10, 2026
Merged

Pin setuptools version in fenics environment to fix pkg_resources import#616
brownbaerchen merged 4 commits intomasterfrom
copilot/fix-fenics-ci-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 10, 2026

FEniCS CI tests failing across all Python versions (3.10-3.13) with ModuleNotFoundError: No module named 'pkg_resources' when UFL imports its version metadata.

Changes

  • Added setuptools>=40.0,<70.0 to etc/environment-fenics.yml conda dependencies

Python 3.12+ no longer bundles setuptools by default. Additionally, setuptools 70.0+ deprecated and removed the pkg_resources module in favor of importlib.metadata. Since UFL (part of FEniCS) still relies on pkg_resources, the version constraint ensures a compatible version of setuptools is installed that includes this module while maintaining a reasonable minimum version.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix currently failing fenics CI tests Add setuptools to fenics environment to fix pkg_resources import Feb 10, 2026
Copilot AI requested a review from pancetta February 10, 2026 09:38
@pancetta
Copy link
Copy Markdown
Member

@copilot fenics jobs are still failing, look e.g. FAILED pySDC/tests/test_tutorials/test_step_7.py::test_A - ModuleNotFoundError: No module named 'pkg_resources' from https://github.com/Parallel-in-Time/pySDC/actions/runs/21859533966/job/63084845035?pr=616

Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 10, 2026

@copilot fenics jobs are still failing, look e.g. FAILED pySDC/tests/test_tutorials/test_step_7.py::test_A - ModuleNotFoundError: No module named 'pkg_resources' from https://github.com/Parallel-in-Ti...

Fixed in b969896. The issue was that setuptools 82.0+ removed pkg_resources. Pinned setuptools<70.0 to use a version that includes it.

Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com>
Copilot AI changed the title Add setuptools to fenics environment to fix pkg_resources import Pin setuptools version in fenics environment to fix pkg_resources import Feb 10, 2026
@brownbaerchen brownbaerchen marked this pull request as ready for review February 10, 2026 10:01
@brownbaerchen brownbaerchen merged commit fdf872b into master Feb 10, 2026
43 checks passed
@brownbaerchen brownbaerchen deleted the copilot/fix-fenics-ci-tests branch February 10, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants