Skip to content

wheel package contains outdated files - tries to import 'asynctest' #198

Closed
@nebularazer

Description

@nebularazer

Hi,
i was trying to use this library but always ended up with an error:

.venv/lib/python3.8/site-packages/respx/mock.py:8: in <module>
    import asynctest
E   ModuleNotFoundError: No module named 'asynctest'

I noticed that the asynctest dependency was already removed in 0.12.0 80ddc31.
The whl contains old files which import asynctest and probably brake the package.

python -m zipfile --list ~/Downloads/respx-0.19.1-py2.py3-none-any.whl
File Name                                             Modified             Size
responsex/__init__.py                          2019-11-15 16:21:26          296
responsex/mock.py                              2019-11-15 16:21:26         7776
responsex/models.py                            2019-11-15 16:21:26         4384
respx/__init__.py                              2021-07-07 11:48:24          756
respx/__version__.py                           2022-01-10 10:09:48           23
respx/api.py                                   2020-11-24 07:45:48         2586
respx/fixtures.py                              2021-07-02 12:33:06          268
respx/handlers.py                              2021-09-15 08:10:26         1245
respx/mock.py                                  2019-11-24 20:28:44        13254
respx/mocks.py                                 2021-11-15 15:37:38        10550
respx/models.py                                2021-11-15 15:24:50        15526
respx/patterns.py                              2022-01-10 10:09:48        17999
respx/plugin.py                                2021-07-05 15:14:04          676
respx/py.typed                                 2019-12-09 08:30:48            0
respx/router.py                                2022-01-10 10:09:48        15119
respx/transports.py                            2021-09-15 08:10:26         2706
respx/types.py                                 2021-07-07 11:48:24         1304
respx-0.19.1.dist-info/LICENSE.md              2022-01-10 10:11:36         1527
respx-0.19.1.dist-info/METADATA                2022-01-10 10:11:36         4039
respx-0.19.1.dist-info/WHEEL                   2022-01-10 10:11:36          110
respx-0.19.1.dist-info/entry_points.txt        2022-01-10 10:11:34           33
respx-0.19.1.dist-info/top_level.txt           2022-01-10 10:11:34            6
respx-0.19.1.dist-info/RECORD                  2022-01-10 10:11:36         1719
  • responsex folder (previous name of this package)
  • respx/mock.py file with the asynctest import - which is not in master

Or am I doing something wrong here?

Steps to reproduce:

python3 -m venv .venv
source .venv/bin/activate
python --version
# Python 3.8.10
which pip3
# /home/myname/Development/thing/.venv/bin/pip3
pip3 install respx
grep asynctest .venv/lib/python3.8/site-packages/respx/mock.py
# import asynctest
#        self._patchers: typing.List[asynctest.mock._patch] = []
#        self.stats = asynctest.mock.MagicMock()
#            patcher = asynctest.mock.patch(target, new=mocker)
#                asynctest.mock.patch.object(
#                    asynctest.mock.patch.object(
#        socket_stream = asynctest.mock.Mock(BaseSocketStream)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions