MyPy Python typechecking has an option to use "namespace packages" which is just Python's way of saying "folders without __init__.py in them." But using this feature breaks when python-responses 0.21 is included (see https://github.com/getsentry/responses/issues/556) in the set of modules to check. ``` /path/to/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) ``` This is fixed in https://github.com/getsentry/responses/releases/tag/0.22.0 Would it be possible to bump the f37 version of responses to 0.22 ? Reproducible: Always Steps to Reproduce: 1. sudo dnf -y install python3-{mypy,responses} 2. echo 'import responses; import unittest.mock' > crash.py 3. mypy --namespace-packages crash.py Actual Results: /path/to/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) Expected Results: MyPy found 0 errors
> Would it be possible to bump the f37 version of responses to 0.22 ? Sure, I just did not see the any need so far. From looking at the changelog I think the new version should be mostly compatible with 0.21 we currently ship in F37. Due to the currently ongoing koji database update (https://www.fedorastatus.org/) I can not build the new version right now but hopefully I remember to do that tomorrow (feel free to ping me if I forgot to update the package).
FEDORA-2023-edb49f593c has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-edb49f593c
FEDORA-2023-edb49f593c has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-edb49f593c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-edb49f593c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-edb49f593c has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
Looks like 0.22 had further MyPy errors: https://github.com/getsentry/responses/pull/593 Current changelog seems to suggest no further mypy issues: https://github.com/getsentry/responses/blob/master/CHANGES I'll pull the package during testing this team to make sure it doesn't break for us if you're interested in bumping again to 0.23
FEDORA-2023-d1630a36c7 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d1630a36c7
There is another Fedora user who stumbled upon the same bug (https://src.fedoraproject.org/rpms/python-responses/pull-request/9) so I cherry-picked the commit and built 0.22.0-2: https://bodhi.fedoraproject.org/updates/FEDORA-2023-d1630a36c7 This should fix your mypy issue (without introducing potential incompatibilities). Maybe you can try this build to see if it fixes your issues?
FEDORA-2023-d1630a36c7 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-d1630a36c7` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-d1630a36c7 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-d1630a36c7 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.