Bug 2567149

Summary: keycloak_httpd_client: ModuleNotFoundError: No module named 'pkg_resources'
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: keycloak-httpd-client-installAssignee: Tomas Halman <thalman>
Status: MODIFIED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: thalman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2461178    

Description Miro Hrončok 2026-11-04 18:40:31 UTC
keycloak_httpd_client imports pkg_resources but has no runtime requires on it:


$ rpm -q python3-keycloak-httpd-client-install
python3-keycloak-httpd-client-install-1.3-9.fc45.noarch

$ rpm -qR python3-keycloak-httpd-client-install
/usr/bin/python3
keycloak-httpd-client-install = 1.3-9.fc45
python(abi) = 3.15
python3-jinja2
python3-lxml
python3-requests
python3-requests-oauthlib
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1

$ python3
>>> import keycloak_httpd_client
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import keycloak_httpd_client
  File "/usr/lib/python3.15/site-packages/keycloak_httpd_client/__init__.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

--------

This is an indirect result of https://fedoraproject.org/wiki/Changes/Setuptools_82+ but since the package has no runtime Requires on setuptools either, it did not surface in our scan of impacted packages back then.

This problem exists on Fedora 43, 44, 45, 46.


$ rpm -q python3-keycloak-httpd-client-install
python3-keycloak-httpd-client-install-1.3-6.fc43.noarch

$ python3
>>> import keycloak_httpd_client
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import keycloak_httpd_client
  File "/usr/lib/python3.14/site-packages/keycloak_httpd_client/__init__.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

--------

As a stopgap measure, you may add Requires: python3-pkg-resources, however as this package is included in Fedora ELN, note that such dependency is undesired for RHEL 11: https://github.com/fedora-eln/eln/issues/529

Comment 1 Miro Hrončok 2026-11-04 18:46:59 UTC
Let me know if you need upstream PR migrating away from pkg_resources.

Comment 2 Miro Hrončok 2026-11-04 18:54:59 UTC
There are further undeclared dependencies:

$ keycloak-rest --help
Traceback (most recent call last):
  File "/usr/bin/keycloak-rest", line 12, in <module>
    import six
ModuleNotFoundError: No module named 'six'

$ keycloak-httpd-client-install --help
Traceback (most recent call last):
  File "/usr/bin/keycloak-httpd-client-install", line 16, in <module>
    import six


(six is also undesired for RHEL 11: https://github.com/fedora-eln/eln/issues/255 )

Comment 3 Miro Hrončok 2026-11-04 18:56:28 UTC
The pkg_resoruces problem also impacts RHEL 10:

$ python3
Python 3.12.15 (main, Oct  1 2026, 00:00:00) [GCC 14.3.1 20251022 (Red Hat 14.3.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keycloak_httpd_client
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.12/site-packages/keycloak_httpd_client/__init__.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

$ keycloak-rest --help
Traceback (most recent call last):
  File "/usr/bin/keycloak-rest", line 14, in <module>
    from keycloak_httpd_client import keycloak_rest
  File "/usr/lib/python3.12/site-packages/keycloak_httpd_client/__init__.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

$ keycloak-httpd-client-install --help
Traceback (most recent call last):
  File "/usr/bin/keycloak-httpd-client-install", line 19, in <module>
    from keycloak_httpd_client import keycloak_rest
  File "/usr/lib/python3.12/site-packages/keycloak_httpd_client/__init__.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'


Let me know if I shall open a RHEL 10 Jira for this.

Comment 4 Tomas Halman 2026-11-10 14:03:12 UTC
RHEL10 ticket https://redhat.atlassian.net/browse/RHEL-304361

Comment 5 Fedora Update System 2026-11-19 08:59:24 UTC
FEDORA-2026-05b4a9c049 (keycloak-httpd-client-install-1.4-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-05b4a9c049

Comment 6 Fedora Update System 2026-11-19 09:00:03 UTC
FEDORA-2026-cabd4e40ff (keycloak-httpd-client-install-1.4-1.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-cabd4e40ff