Package Details: python-respx 0.21.0-1

Git Clone URL: https://aur.archlinux.org/python-respx.git (read-only, click to copy)
Package Base: python-respx
Description: Mock HTTPX with awesome request patterns and response side effects
Upstream URL: https://github.com/lundberg/respx
Licenses: BSD
Submitter: jocke-l
Maintainer: jocke-l
Last Packager: jocke-l
Votes: 3
Popularity: 0.36
First Submitted: 2021-06-04 17:40 (UTC)
Last Updated: 2024-03-27 12:04 (UTC)

Latest Comments

titaniumbones commented on 2024-04-04 11:12 (UTC)

I'm also having trouble due to tests not passing. In my case there seem to be some very strange path issues, it tries to find an __init__.py in every /home/XXXXX/ directory.

==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.0 -- /usr/bin/python
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/home/matt/.cache/yay/python-respx/src/respx-0.21.0/.hypothesis/examples'))
rootdir: /dev
configfile: null
plugins: cov-4.1.0, anyio-4.3.0, typeguard-4.2.1, pytest_param_files-0.6.0, regressions-2.5.0, asyncio-0.23.6, datadir-1.5.0, subtests-0.12.1, hypothesis-6.100.0, requests-mock-1.11.0
asyncio: mode=Mode.AUTO
collecting ... 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
/usr/lib/python3.11/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
/usr/lib/python3.11/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/usr/lib/python3.11/site-packages/_pytest/python.py:212: in pytest_collect_directory
    if pkginit.is_file():
/usr/lib/python3.11/pathlib.py:1267: in is_file
    return S_ISREG(self.stat().st_mode)
/usr/lib/python3.11/pathlib.py:1013: in stat
    return os.stat(self, follow_symlinks=follow_symlinks)
E   PermissionError: [Errno 13] Permission denied: '/home/testuser/__init__.py'

carsme commented on 2024-04-03 16:02 (UTC)

@jocke-l Feel free to add me as co-maintainer if you'd like help to fix the issue :)

jocke-l commented on 2024-04-03 13:59 (UTC)

Looks like the issue is that the test suite tries to use the older, already installed, version of respx. I'll look into this when I have more time.

fredricocalamari commented on 2024-04-01 01:53 (UTC) (edited on 2024-04-01 21:12 (UTC) by fredricocalamari)

It doesn't build.

=========================== short test summary info ============================ ERROR ../../../../../../../dev/tests/test_patterns.py ERROR ../../../../../../../dev/tests/test_utils.py !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!! ======================== 5 warnings, 2 errors in 0.47s ========================= ==> ERROR: A failure occurred in check(). Aborting... -> error making: python-respx-exit status 4 -> Failed to install the following packages. Manual intervention is required: python-respx - exit status 4

The only way I was able to get the package to build and install is to disable the optional python tests in the PKGBUILD. IMO it's overkill to have the tests be apart of the PKGBUILD in the first place.

omnigenous commented on 2024-03-30 12:35 (UTC)

Can't upgrade :(

================================== ERRORS ==================================
_________________ ERROR collecting tests/test_patterns.py __________________
ImportError while importing test module '/home/USER/.cache/yay/python-respx/src/respx-0.21.0/tests/test_patterns.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_patterns.py:7: in <module>
    from respx.patterns import (
E   ImportError: cannot import name 'Files' from 'respx.patterns' (/usr/lib/python3.11/site-packages/respx/patterns.py)
___________________ ERROR collecting tests/test_utils.py ___________________
ImportError while importing test module '/home/USER/.cache/yay/python-respx/src/respx-0.21.0/tests/test_utils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_utils.py:3: in <module>
    from respx.utils import SetCookie
E   ModuleNotFoundError: No module named 'respx.utils'