Skip to content

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

@Avasam Avasam mentioned this pull request Oct 27, 2023
2 tasks
@jaraco jaraco merged commit 0ad3a93 into pypa:main Jan 24, 2024
@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.

2 participants