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

Adjust MetaPathFinder #6344

Merged
merged 4 commits into from
Nov 20, 2021
Merged

Adjust MetaPathFinder #6344

merged 4 commits into from
Nov 20, 2021

Conversation

layday
Copy link
Contributor

@layday layday commented Nov 19, 2021

Deprecated since 3.4 and triggers spurious errors in type checkers
when implementing a meta path finder without it.
@Akuli
Copy link
Collaborator

Akuli commented Nov 19, 2021

You need to git pull https://github.com/python/typeshed to fix the CI error.

Edit: I don't think this is true. I'll figure out what's going on.

Edit 2: We can ignore the pre-commit CI error. It will be fixed once #6341 is merged.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

stdlib/sys.pyi Outdated Show resolved Hide resolved
stdlib/sys.pyi Outdated Show resolved Hide resolved
@github-actions

This comment has been minimized.

stdlib/sys.pyi Outdated
@@ -27,12 +27,11 @@ _T = TypeVar("_T")
# The following type alias are stub-only and do not exist during runtime
_ExcInfo = Tuple[Type[BaseException], BaseException, TracebackType]
_OptExcInfo = Union[_ExcInfo, Tuple[None, None, None]]
_PathSequence = Sequence[Union[bytes, str]]
_ModulePath = Sequence[str]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: This type alias is no longer needed, because it is used only once. Just use Sequence[str] directly.

@Akuli
Copy link
Collaborator

Akuli commented Nov 19, 2021

Another nit: It is better to not amend/rebase. Force-pushing makes reviewing the code more difficult, because reviewers can't just click the latest commit to see what changed since the previous review. We use GitHub's "Squash and merge" button, so the whole PR will appear as a single commit in Git history anyway.

@layday
Copy link
Contributor Author

layday commented Nov 19, 2021

I agree and I usually avoid doing that. I'm not sure why I did it here - probably because I was editing the tip and it seemed fairly minor that it didn't warrant pushing a fixup which I'd then have to rebase/squash. I wasn't aware that you squash everything anyway.

@github-actions

This comment has been minimized.

stdlib/sys.pyi Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

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

@Akuli Akuli merged commit b2b7ceb into python:master Nov 20, 2021
@layday
Copy link
Contributor Author

layday commented Nov 20, 2021

Thanks for the review, @Akuli.

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.

4 participants