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 possibly redundant importlib_machinery code #4097

Merged
merged 7 commits into from Jan 24, 2024

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Oct 27, 2023

Summary of changes

Prompted by #3979 (comment) and #3979 (comment)
Removing obsolete code and workarounds benefit type-checkers.

The importlib_machinery alias seems redundant. Maybe a leftover from old code support? If the import failed, all other usages of importlib_machinery would error out anyway. With a less obvious importlib_machinery rather than the actual ImportError.

It seems all importlib.machinery usages we do here (SourceFileLoader, SourcelessFileLoader and FileFinder) have been added in Python 3.3

Pull Request Checklist

pkg_resources/__init__.py Outdated Show resolved Hide resolved
@Avasam Avasam mentioned this pull request Oct 27, 2023
2 tasks
@jaraco jaraco merged commit 0ad3a93 into pypa:main Jan 24, 2024
23 checks passed
@Avasam Avasam deleted the importlib_machinery branch January 24, 2024 17:06
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