Respx

Latest version: v0.21.1

Safety actively analyzes 630254 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

0.18.0b0

Changed

- Deprecate RESPX MockTransport in favour of HTTPX MockTransport. (152)

Fixed

- Support `HTTPX` 1.0.0b0. (164)
- Allow tuples as params to align with httpx, thanks shelbylsmith. (151)
- Fix xfail marked tests. (153)
- Only publish docs for upstream repo, thanks hugovk. (161)

Added

- Add optional route arg to side effects. (158)

0.17.1

Added

- Implement support for async side effects in router. (147)
- Support mocking responses using asgi/wsgi apps. (146)
- Added pytest fixture and configuration marker. (150)

Fixed

- Typo in import from examples.md, thanks shelbylsmith. (148)
- Fix pass-through test case. (149)

0.17.0

Changed

- Require `HTTPX` 0.18.0 and implement the new transport API. (PR 142)
- Removed ASGI and WSGI transports from httpcore patch list. (PR 131)
- Don't pre-read mocked async response streams. (PR 136)

Fixed

- Fixed syntax highlighting in docs, thanks florimondmanca. (PR 134)
- Type check `route.return_value`, thanks tzing. (PR 133)
- Fixed a typo in the docs, thanks lewoudar. (PR 139)

Added

- Added support for adding/removing patch targets. (PR 131)
- Added test session for python 3.10. (PR 140)
- Added RESPX Mock Swallowtail to README. (PR 128)

0.16.3

Fixed

- Fixed decorator `respx_mock` kwarg, mistreated as a `pytest` fixture. (PR 117)
- Fixed `JSON` pattern sometimes causing a `JSONDecodeError`. (PR 124)

Added

- Snapshot and rollback of routes' pattern and name. (PR 120)
- Internally extracted a `RouteList` from `Router`. (PR 120)
- Auto registration of `Mocker` implementations and their `using` name. (PR 121)
- Added `HTTPXMocker`, optionally patching `HTTPX`. (PR 122)

Changed

- Protected a routes' pattern to be modified. (PR 120)

0.16.2

Added

- Easier support for using HTTPX MockTransport. (PR 118)
- Support mixed case for `method__in` and `scheme__in` pattern lookups. (PR 113)

Fixed

- Handle missing path in URL pattern (PR 113)

Changed

- Refactored internal mocking vs `MockTransport`. (PR 112)

Removed

- Dropped raw request support when parsing patterns (PR 113)

0.16.1

Added

- Extended `url` pattern with support for `HTTPX` proxy url format. (PR 110)
- Extended `host` pattern with support for regex lookup. (PR 110)
- Added `respx.request(...)`. (PR 111)

Changed

- Deprecated old `MockTransport` in favour of `respx.mock(...)`. (PR 109)
- Wrapping actual `MockTransport` in `MockRouter`, instead of extending. (PR 109)
- Extracted a `HTTPXMock`, for transport patching, from `MockRouter`. (PR 109)

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.