Skip to content

Fix parameter types for pkgutil functions accepting pathlike arguments #13642

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

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

brianschubert
Copy link
Contributor

Fixes #13636

I confirmed that all paths are ultimately fed to os.fsdecode (or another any-pathlike accepting function in the case of ImpImporter and ImpLoader) since at least Python 3.8.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks!

@srittau srittau merged commit 205e993 into python:main Mar 17, 2025
55 checks passed
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
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.

type of path parameter in pkgutil.iter_modules
2 participants