-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
responses 0.21.0 broke mypy check #556
Comments
I'm not able to reproduce the problem you're having
|
You are right, i try to run in different place and i got your behavior. So i found that i have setup.cfg in same place with next lines
which is similar to
And that you will get same problem:
|
We're using the typeshed package to access that type because the |
I did not try it, resp. when i try to call mypy responses, there are too many errors... but... what about use And if I remember right, there is not need to import type, when you using type name.. |
@ondratu I did not check if 3.10 has side question, do you really create namespace package? |
Namespace packages are perfect for ... packages in namespace, for example when you have core / library / application and many plugins. There are two choices:
When you have many plugins... namespace are great, and that is why they are supported ;) |
yes, I understand the purpose but also have seen that sometimes people misuse them :) anyway, I need to check the difference in unittest stubs in 3.7 and 3.10 |
I think it comes from There are no default stubs for @markstory |
I can confirm that I reproduced the same issue. We are using python 3.10.5, mypy 0.961 and upgrading responses from 0.20.0 to 0.21.0 got mypy confused. |
@sodul |
@beliaev-maksim yes our |
mypy patcher complaints on namespace packages
@ondratu @sodul |
seems to fix the problem. I rolled back to Note that an explicit uninstall helps with the internal version tracking of pip. |
* fix #556 mypy patcher complaints on namespace packages * update pipeline exclude mock package data from reqs
@markstory Experiencing the same issue when trying to upgrade |
It seems this issue shouldn't be closed, or should we track this elsewhere? |
@fredrikaverpil |
$ mypy --version
mypy 0.971 (compiled: yes) With $ poetry update responses
Updating dependencies
Resolving dependencies... (17.8s)
Writing lock file
Package operations: 0 installs, 1 update, 0 removals
• Updating responses (0.20.0 -> 0.21.0 1db612d) $ mypy
Success: no issues found in 232 source files Looks like it's fixed in master! 🎉 |
Thank you so much for your work on that and fix 💌 Sorry for a dummy question here but I couldn't find this information in the docs (about how often the new version of the package is released) ... Is there a plan to release this fix as the new version of requests, and if so, what's the release schedule so the proper package version can be pinned instead of pinning the master branch in the requirements. |
Please track #576 |
I just fixed this issue |
Describe the bug
We use response in our tests, and from responses 0.21.0 we've got this error:
Returning mypy version did not resolve problem, but returning responses to 0.20.0 does.
I try to find problem in your changes, and it could be probably this line in init.py:
Additional context
No response
Version of
responses
0.21.0
Steps to Reproduce
and than run
Expected Result
Success: no issues found in 1 source file
Actual Result
venv/lib/python3.10/site-packages/mypy/typeshed/stdlib/unittest/mock.pyi: error: Source file found twice under different module names: "unittest.mock" and "mypy.typeshed.stdlib.unittest.mock"
Found 1 error in 1 file (errors prevented further checking)
The text was updated successfully, but these errors were encountered: