Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pkg_resources module #4142

Merged
merged 4 commits into from
Aug 5, 2021
Merged

Conversation

bblommers
Copy link
Collaborator

As the setuptools dependency was removed, the pkg_resources-module is no longer available to Moto.

This PR rewrites all functionality that depended on pkg_resources, to instead use the importlib_metadata and pgkdata-modules.

It also explicitly removes the pkg_resources-module from the dependency test, to ensure it works.

(Note: XRay has an implicit dependency on pkg_resources, so we're adding setuptools back to that module only.)

(Note 2: For Py3.8, we could start using the buildin importlib.metadata, but for we'll need the backport for 3.6 and 3.7.)

Successful dependency test: https://github.com/bblommers/moto/runs/3253699280?check_suite_focus=true

@bblommers bblommers merged commit 76094f0 into getmoto:master Aug 5, 2021
@bblommers bblommers added this to the 2.2.2 milestone Aug 5, 2021
@asherf
Copy link
Contributor

asherf commented Aug 5, 2021

yay! thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2021

This is now part of moto >= 2.2.2.dev20

@bblommers bblommers deleted the remove-pkg-resources branch August 7, 2021 07:01
@whardier
Copy link

whardier commented Aug 7, 2021

Nice! I had recommended setuptools be vanquished.. it's nice to see this was resolved.

archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Aug 20, 2021
Noticed this after reading getmoto/moto#4142

Ref: aws/aws-xray-sdk-python#306

git-svn-id: file:///srv/repos/svn-community/svn@1003952 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Aug 20, 2021
Noticed this after reading getmoto/moto#4142

Ref: aws/aws-xray-sdk-python#306


git-svn-id: file:///srv/repos/svn-community/svn@1003952 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Aug 20, 2021
Ref: getmoto/moto#4142


git-svn-id: file:///srv/repos/svn-community/svn@1003964 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Aug 20, 2021
Ref: getmoto/moto#4142

git-svn-id: file:///srv/repos/svn-community/svn@1003964 9fca08f4-af9d-4005-b8df-a31f2cc04f65
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.

None yet

3 participants