Add Pep561 tests for stub-only package with namespace packages#11141
Merged
JelleZijlstra merged 2 commits intopython:masterfrom Oct 12, 2021
Merged
Add Pep561 tests for stub-only package with namespace packages#11141JelleZijlstra merged 2 commits intopython:masterfrom
JelleZijlstra merged 2 commits intopython:masterfrom
Conversation
247826a to
1e891c7
Compare
Member
|
Could you take a look at the CI failure? Also cc @ethanhs for opinions on PEP 561 support. |
Member
|
I will try to take a look at this and the linked issue tomorrow. |
1e891c7 to
80694de
Compare
Contributor
Author
|
fixed flake8! Tests pass. |
Contributor
Author
|
I still think these tests are a good idea! I actually now think that the current behavior is good - and really rather than doing a behavior change, we want #9636 to land. Updated to future proof against #9636. I think these tests are useful as namespace stub packages weren't covered prior as specified by this python/peps#2083 |
Contributor
Author
|
Wanted to ping @ethanhs (and/or @JelleZijlstra) for adding tests for the stuff in python/peps#2083. |
nipunn1313
added a commit
to nipunn1313/mypy
that referenced
this pull request
Oct 13, 2021
Two PRs landed and conflicted - python#11262 and python#11141 This fwd fixes the tests.
hauntsaninja
pushed a commit
that referenced
this pull request
Oct 13, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This only adds tests that show the current behavior when we provide a stub-only package for a subpackage of a namespace package
Proposals for behavior changes exist in python/typeshed#5800
Real world example is the
protobufpackage which installs togoogle.protobufand thetypes-protobufpackage which installs togoogle-stubs/protobuf(wheregoogleis a namespace package)