Skip to content

fix: remove pkg_resources dependency broken by setuptools v82#1312

Open
themachinehf wants to merge 1 commit into
zama-ai:mainfrom
themachinehf:fix/remove-pkg_resources-dependency
Open

fix: remove pkg_resources dependency broken by setuptools v82#1312
themachinehf wants to merge 1 commit into
zama-ai:mainfrom
themachinehf:fix/remove-pkg_resources-dependency

Conversation

@themachinehf
Copy link
Copy Markdown

Summary

setuptools v82 (released Feb 2026) removed pkg_resources which causes ModuleNotFoundError when importing concrete.

Fix

Replace the legacy pkg_resources namespace declaration with implicit namespace packages (PEP 420) which require no special code in init.py.

Before:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
import("pkg_resources").declare_namespace(name)

After:
# Implicit namespace packages (PEP 420) are used.
# No additional imports are needed.

Testing

Verified the fix resolves the import error. The implicit namespace package approach is the modern standard supported since Python 3.3.

Fixes #1308

setuptools v82 removed pkg_resources which causes ModuleNotFoundError
when importing concrete. Replace the legacy pkg_resources namespace
declaration with implicit namespace packages (PEP 420) which require
no special code in __init__.py.

Fixes zama-ai#1308
@themachinehf themachinehf requested a review from a team as a code owner March 21, 2026 22:02
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 21, 2026

Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @themachinehf on file. In order for us to review and merge your code, please sign:

  • For individual contribution: our CLA
  • for Bounty submission, if you are an individual: our T&C
  • for Bounty submission, if you are a company: our T&C
    to get yourself added.

If you already signed one of this document, just wait to be added to the bot config.

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.

Importing concrete fails because of missing pkg_resources

1 participant