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

Correct for duplicated distutils imports #3046

Merged
merged 5 commits into from
Feb 16, 2022

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Jan 24, 2022

Motivation

In #3035 we received a report that some modules are being imported sometimes as distutils.<module name> other times as setuptools._distutils.<module name>, which results in different copies of the module object being used in different places and prevents effective patching (see #3038, #3042 for an example).

Although at the moment I don't know how to fix this problem, I believe I found a way of diagnosing when this problem happens.

Summary of changes

  • Added test cases to diagnose the problem.

Pull Request Checklist

Copy link
Member

@jaraco jaraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jaraco jaraco changed the title Add tests for duplicated imports Correct for duplicated distutils imports Feb 16, 2022
@jaraco jaraco marked this pull request as ready for review February 16, 2022 02:15
@jaraco jaraco merged commit 01ff033 into pypa:main Feb 16, 2022
@abravalheri abravalheri deleted the add-tests-for-duplicated-imports branch February 16, 2022 09:18
@abravalheri
Copy link
Contributor Author

Thank you Jason!

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

2 participants