Skip to content

Replace removed pkg_resources API - #1809

Merged
eduv09 merged 2 commits into
developfrom
workaround/python312-pkg-resources
Sep 16, 2026
Merged

eduv09 merged 2 commits into
developfrom
workaround/python312-pkg-resources

Conversation

@eduv09

@eduv09 eduv09 commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

This pull request updates the way the package version is retrieved in both the contract generator and its tests, switching from pkg_resources.get_distribution to importlib.metadata.version. This modernizes the codebase and removes a dependency on pkg_resources. Fixes #1810

Dependency update and code modernization:

  • Replaced pkg_resources.get_distribution('ima_predeployed').version with importlib.metadata.version('ima-predeployed') in MessageProxyForSchainGenerator.generate_storage to retrieve the package version in a more modern and efficient way. [1] [2] [3]
  • Updated the test in predeployed/test/contracts/message_proxy_for_schain.py to use importlib.metadata.version('ima-predeployed') for version checking, aligning it with the updated implementation and removing the pkg_resources import. [1] [2]

@eduv09
eduv09 requested a review from a team as a code owner September 2, 2026 17:16
@eduv09
eduv09 merged commit ef3702c into develop Sep 16, 2026
6 checks passed
@eduv09
eduv09 deleted the workaround/python312-pkg-resources branch September 16, 2026 14:39
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove dependency from pkg_resources in python code

3 participants