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

Add Pep561 tests for stub-only package with namespace packages #11141

Merged
merged 2 commits into from
Oct 12, 2021

Conversation

nipunn1313
Copy link
Contributor

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 protobuf package which installs to google.protobuf and the types-protobuf package which installs to google-stubs/protobuf (where google is a namespace package)

@JelleZijlstra
Copy link
Member

Could you take a look at the CI failure? Also cc @ethanhs for opinions on PEP 561 support.

@emmatyping
Copy link
Collaborator

I will try to take a look at this and the linked issue tomorrow.

@nipunn1313
Copy link
Contributor Author

fixed flake8! Tests pass.

@nipunn1313
Copy link
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

@nipunn1313
Copy link
Contributor Author

Wanted to ping @ethanhs (and/or @JelleZijlstra) for adding tests for the stuff in python/peps#2083.
No rush - just wanted to make sure it didn't lost. Appreciate y'alls time!

@JelleZijlstra JelleZijlstra merged commit 066da4d into python:master Oct 12, 2021
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
Two PRs landed and conflicted - #11262 and #11141
This fwd fixes the tests.
@nipunn1313 nipunn1313 deleted the pep561test branch November 20, 2021 07:59
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