From dc11d114bae81b132fa337401eebeedaba63435b Mon Sep 17 00:00:00 2001 From: Dave Page Date: Tue, 9 Jun 2026 11:59:58 +0100 Subject: [PATCH] Pin setuptools<82 on Python 3.9 to keep pkg_resources. #9829 setuptools 82 stops shipping pkg_resources, which passlib (via Flask-Security-Too on Python 3.9) imports, so a clean install on Python 3.9 failed with "No module named 'pkg_resources'". Python 3.9 is still a supported target (RHEL/Rocky/AlmaLinux 8 and 9 build with system Python 3.9). Split the pin by Python version, mirroring the existing Flask-Security-Too split. Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/en_US/release_notes_9_16.rst | 2 ++ requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/en_US/release_notes_9_16.rst b/docs/en_US/release_notes_9_16.rst index a7ec92e1bee..11689f01cb5 100644 --- a/docs/en_US/release_notes_9_16.rst +++ b/docs/en_US/release_notes_9_16.rst @@ -25,3 +25,5 @@ Housekeeping Bug fixes ********* + + | `Issue #9829 `_ - Fixed installation on Python 3.9 (e.g. RHEL/Rocky/AlmaLinux 8 and 9) failing with "No module named 'pkg_resources'" by pinning setuptools below the version that dropped pkg_resources for Python 3.9. diff --git a/requirements.txt b/requirements.txt index 3c288fb0d1b..c2b44b10a56 100644 --- a/requirements.txt +++ b/requirements.txt @@ -55,7 +55,8 @@ pytz==2026.* # pinned for https://github.com/andfoy/pywinpty/issues/545 pywinpty==2.0.*; sys_platform=="win32" qrcode[pil]==8.* -setuptools==82.* +setuptools<82; python_version <= '3.9' +setuptools==82.*; python_version > '3.9' SQLAlchemy==2.* sqlparse==0.* sshtunnel==0.*