8000 delete _importlib_modulespec by Akuli · Pull Request #5350 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

delete _importlib_modulespec #5350

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 7 commits into from
May 6, 2021
Merged

Conversation

Akuli
Copy link
Collaborator
@Akuli Akuli commented May 6, 2021

According to the comments, _importlib_modulespec exists "for circular import reasons". But in general, circular imports should be fine in .pyi files.

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.

Good catch!

# but expected in new code.
def exec_module(self, module: types.ModuleType) -> None: ...

class _LoaderProtocol(Protocol):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit 8000 : According to CONTRIBUTING, this should probably be called _SupportsLoadModule, although in this case, _LoaderProtocol also is a good name.

Copy link
Collaborator

Choose a reason for hiding this comment

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

And thinking a bit more about it: Maybe we should add a ...Protocol convention for protocols that mimic classes or abcs.

@Akuli Akuli marked this pull request as ready for review May 6, 2021 09:59
@Akuli
Copy link
Collaborator Author
Akuli commented May 6, 2021
8000

@rchen152 I think the CI failure is a bug in pytype: https://github.com/python/typeshed/runs/2517175044

@github-actions
Copy link
Contributor
github-actions bot commented May 6, 2021

Diff from mypy_primer, showing the effect of this PR on open source code:

alerta (https://github.com/alerta/alerta.git)
+ alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)
- alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)

4 similar comments
@github-actions
Copy link
Contributor
github-actions bot commented May 6, 2021

Diff from mypy_primer, showing the effect of this PR on open source code:

alerta (https://github.com/alerta/alerta.git)
+ alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)
- alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)

@github-actions
Copy link
Contributor
github-actions bot commented May 6, 2021

Diff from mypy_primer, showing the effect of this PR on open source code:

alerta (https://github.com/alerta/alerta.git)
+ alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)
- alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)

@github-actions
Copy link
Contributor
github-actions bot commented May 6, 2021

Diff from mypy_primer, showing the effect of this PR on open source code:

alerta (https://github.com/alerta/alerta.git)
+ alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)
- alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)

@github-actions
Copy link
Contributor
github-actions bot commented May 6, 2021

Diff from mypy_primer, showing the effect of this PR on open source code:

alerta (https://github.com/alerta/alerta.git)
+ alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)
- alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)

@github-actions
Copy link
Contributor
github-actions bot commented May 6, 2021

Diff from mypy_primer, showing the effect of this PR on open source code:

alerta (https://github.com/alerta/alerta.git)
+ alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)
- alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)
8000

@Akuli Akuli merged commit e66b7fa into python:master May 6, 2021
@Akuli Akuli deleted the no-import-cycle-hack branch May 6, 2021 14:13
@github-actions
Copy link
Contributor
github-actions bot commented May 6, 2021

Diff from mypy_primer, showing the effect of this PR on open source code:

alerta (https://github.com/alerta/alerta.git)
+ alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)
- alerta/models/alarms/isa_18_2.py:10: error: Library stubs not installed for "flask" (or incompatible with Python 3.8)

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.

3 participants
0