head 1.20; access; symbols pkgsrc-2026Q1:1.19.0.4 pkgsrc-2026Q1-base:1.19 pkgsrc-2025Q4:1.19.0.2 pkgsrc-2025Q4-base:1.19 pkgsrc-2025Q3:1.18.0.4 pkgsrc-2025Q3-base:1.18 pkgsrc-2025Q2:1.18.0.2 pkgsrc-2025Q2-base:1.18 pkgsrc-2025Q1:1.17.0.4 pkgsrc-2025Q1-base:1.17 pkgsrc-2024Q4:1.17.0.2 pkgsrc-2024Q4-base:1.17 pkgsrc-2024Q3:1.12.0.2 pkgsrc-2024Q3-base:1.12 pkgsrc-2024Q2:1.11.0.4 pkgsrc-2024Q2-base:1.11 pkgsrc-2024Q1:1.11.0.2 pkgsrc-2024Q1-base:1.11 pkgsrc-2023Q4:1.8.0.2 pkgsrc-2023Q4-base:1.8 pkgsrc-2023Q3:1.6.0.2 pkgsrc-2023Q3-base:1.6 pkgsrc-2023Q2:1.3.0.2 pkgsrc-2023Q2-base:1.3 pkgsrc-2023Q1:1.2.0.2 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.1.0.2 pkgsrc-2022Q4-base:1.1; locks; strict; comment @# @; 1.20 date 2026.04.10.04.08.27; author adam; state Exp; branches; next 1.19; commitid uIerOAN9kDK0JmBG; 1.19 date 2025.12.03.11.28.10; author adam; state Exp; branches; next 1.18; commitid AtwWN0qM2DgZgXkG; 1.18 date 2025.04.14.20.28.03; author adam; state Exp; branches; next 1.17; commitid UEGjPtvhiyhEK3RF; 1.17 date 2024.11.28.19.52.45; author adam; state Exp; branches; next 1.16; commitid a6YqadhsYfAtXrzF; 1.16 date 2024.11.24.09.27.49; author adam; state Exp; branches; next 1.15; commitid wBYN94SiJcV2DSyF; 1.15 date 2024.11.11.07.29.28; author wiz; state Exp; branches; next 1.14; commitid 1fBDq3LwS98NncxF; 1.14 date 2024.11.03.12.16.21; author adam; state Exp; branches; next 1.13; commitid d5mO5z5dDeMHecwF; 1.13 date 2024.10.09.20.14.17; author adam; state Exp; branches; next 1.12; commitid vjL1hXAghS6uG1tF; 1.12 date 2024.09.23.08.12.12; author adam; state Exp; branches; next 1.11; commitid lVbL749U1m6CcUqF; 1.11 date 2024.02.21.19.21.53; author adam; state Exp; branches; next 1.10; commitid gbhac4AmImsROkZE; 1.10 date 2024.01.30.20.47.36; author adam; state Exp; branches; next 1.9; commitid kJ4gv7UI7Po70wWE; 1.9 date 2024.01.01.11.47.34; author adam; state Exp; branches; next 1.8; commitid 5FP2yElYRaaHWJSE; 1.8 date 2023.11.16.09.39.59; author adam; state Exp; branches; next 1.7; commitid Q539fUc7nN5zIOME; 1.7 date 2023.09.27.15.14.30; author adam; state Exp; branches; next 1.6; commitid B4StPL5tHH2YaqGE; 1.6 date 2023.09.14.09.28.21; author adam; state Exp; branches; next 1.5; commitid c29Bn06Lwmp7GIEE; 1.5 date 2023.09.06.20.05.12; author adam; state Exp; branches; next 1.4; commitid g4SqkJnzGVgtsKDE; 1.4 date 2023.08.04.05.10.22; author adam; state Exp; branches; next 1.3; commitid n7JrCtCw9JsbzqzE; 1.3 date 2023.04.17.09.59.50; author adam; state Exp; branches; next 1.2; commitid tGqz9e3Md99VFrlE; 1.2 date 2023.01.20.12.37.03; author adam; state Exp; branches; next 1.1; commitid bpoZ9PT0CRmelhaE; 1.1 date 2022.11.15.12.17.08; author adam; state Exp; branches; next ; commitid cPp4ZjB26J0WlN1E; desc @@ 1.20 log @py-test-httpx: updated to 0.36.2 0.36.2 Fixed - Document how to ignore query parameters while matching on URL. @ text @# $NetBSD: Makefile,v 1.19 2025/12/03 11:28:10 adam Exp $ DISTNAME= pytest_httpx-0.36.2 PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/^py//:S/_/-/} CATEGORIES= www python MASTER_SITES= ${MASTER_SITE_PYPI:=p/pytest-httpx/} MAINTAINER= pkgsrc-users@@NetBSD.org HOMEPAGE= https://colin-b.github.io/pytest_httpx/ COMMENT= Send responses to httpx LICENSE= mit TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools>=78:../../devel/py-setuptools TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm DEPENDS+= ${PYPKGPREFIX}-httpx>=0.28:../../www/py-httpx DEPENDS+= ${PYPKGPREFIX}-test>=9.0:../../devel/py-test TEST_DEPENDS+= ${PYPKGPREFIX}-test-asyncio>=1:../../devel/py-test-asyncio TEST_DEPENDS+= ${PYPKGPREFIX}-test-cov>=7:../../devel/py-test-cov USE_LANGUAGES= # none .include "../../lang/python/wheel.mk" .include "../../mk/bsd.pkg.mk" @ 1.19 log @py-test-httpx: updated to 0.36.0 0.36.0 Changed - `pytest` required version is now `9`. Added - Explicit support for python `3.14`. - `match_params` parameter is now available on responses and callbacks registration, as well as request(s) retrieval. Allowing to provide query parameters as a dict instead of being part of the matched URL. - This parameter allows to perform partial query params matching ([refer to documentation](README.md#matching-on-query-parameters) for more information). Fixed - URL with more than one value for the same parameter were not matched properly (matching was performed on the first value). - `httpx_mock.add_exception` is now properly documented (accepts `BaseException` instead of `Exception`). Removed - `pytest` `8` is not supported anymore. - python `3.9` is not supported anymore. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.18 2025/04/14 20:28:03 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.36.0 @ 1.18 log @Fix PLIST after py-setuptools update; bump depends and revision @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.17 2024/11/28 19:52:45 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.35.0 a4 1 PKGREVISION= 1 d16 3 a18 3 DEPENDS+= ${PYPKGPREFIX}-test>=8.0:../../devel/py-test TEST_DEPENDS+= ${PYPKGPREFIX}-test-asyncio>=0.24:../../devel/py-test-asyncio TEST_DEPENDS+= ${PYPKGPREFIX}-test-cov>=6:../../devel/py-test-cov @ 1.17 log @py-test-httpx: updated to 0.35.0 0.35.0 Requires httpx==0.28.\* @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.16 2024/11/24 09:27:49 adam Exp $ d5 1 d14 1 a14 1 TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools @ 1.16 log @py-test-httpx: updated to 0.34.0 0.34.0 Added - `is_optional` parameter is now available on responses and callbacks registration. Allowing to add optional responses while keeping other responses as mandatory. Refer to documentation for more details. - `is_reusable` parameter is now available on responses and callbacks registration. Allowing to add multi-match responses while keeping other responses as single-match. Refer to documentation for more details. Fixed - `httpx_mock.get_request` will now also propose to refine filters if more than one request is found instead of only proposing to switch to `httpx_mock.get_requests`. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.15 2024/11/11 07:29:28 wiz Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.34.0 d15 1 a15 1 DEPENDS+= ${PYPKGPREFIX}-httpx>=0.27:../../www/py-httpx d17 2 a18 2 TEST_DEPENDS+= ${PYPKGPREFIX}-test-asyncio>=0.23:../../devel/py-test-asyncio TEST_DEPENDS+= ${PYPKGPREFIX}-test-cov>=4:../../devel/py-test-cov @ 1.15 log @py-*: remove unused tool dependency py-setuptools includes the py-wheel functionality nowadays @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.14 2024/11/03 12:16:21 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.33.0 @ 1.14 log @py-test-httpx: updated to 0.33.0 0.33.0 Added - Explicit support for python `3.13`. - `should_mock` option (callable returning a boolean) is now available, defaulting to always returning `True`. Refer to documentation for more details. - Matching on the full multipart body can now be performed using `match_files` and `match_data` parameters. Refer to documentation for more details. - Matching on extensions (including timeout) can now be performed using `match_extensions` parameter. Refer to documentation for more details. Removed - `non_mocked_hosts` option is not available anymore. Use `should_mock` instead as in the following sample: ```python import pytest @@pytest.mark.httpx_mock(non_mocked_hosts=["my_local_test_host"]) def test_previous_behavior(httpx_mock): ... @@pytest.mark.httpx_mock(should_mock=lambda request: request.url.host not in ["my_local_test_host"]) def test_new_behavior(httpx_mock): ... ``` Please note that your hosts might need to be prefixed with `www.` depending on your usage. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.13 2024/10/09 20:14:17 adam Exp $ a14 1 TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel @ 1.13 log @py-test-httpx: updated to 0.32.0 0.32.0 Added - The following option is now available: - `can_send_already_matched_responses` (boolean), defaulting to `False`. - Assertion failure message in case of unmatched responses is now linking documentation on how to deactivate the check. - Assertion failure message in case of unmatched requests is now linking documentation on how to deactivate the check. - `httpx.TimeoutException` message issued in case of unmatched request is now linking documentation on how to reuse responses (in case some responses are already matched). Fixed - Documentation now clearly state the risks associated with changing the default options. - Assertion failure message in case of unmatched requests at teardown is now describing requests in a more user-friendly way. - Assertion failure message in case of unmatched requests at teardown is now prefixing requests with `- ` to highlight the fact that this is a list, preventing misapprehension in case only one element exists. - Assertion failure message in case of unmatched responses at teardown is now prefixing responses with `- ` to highlight the fact that this is a list, preventing misapprehension in case only one element exists. - `httpx.TimeoutException` message issued in case of unmatched request is now prefixing available responses with `- ` to highlight the fact that this is a list, preventing misapprehension in case only one element exists. - `httpx.TimeoutException` message issued in case of unmatched request is now listing unmatched responses (in registration order) before already matched one (still in registration order). - The incentive behind this change is to help identify a potential mismatch faster as the first unmatched response is the most likely to be the one expected to match. - Response description in failure messages (`httpx.TimeoutException` message issued in case of unmatched request or assertion failure message in case of unmatched responses at teardown) is now displaying if the response was already matched or not and less misleading in it's phrasing about what it can match (a single request by default). Changed - Last registered matching response will not be reused by default anymore in case all matching responses have already been sent. - This behavior can be changed thanks to the new `pytest.mark.httpx_mock(can_send_already_matched_responses=True)` option. - The incentive behind this change is to spot regression if a request was issued more than the expected number of times. - `HTTPXMock` class was only exposed for type hinting purpose. This is now explained in the class docstring. - As a result this is the last time a change to `__init__` signature will be documented and considered a breaking change. - Future changes will not be documented and will be considered as internal refactoring not worth a version bump. - `__init__` now expects one parameter, the newly introduced (since [0.31.0]) options. - `HTTPXMockOptions` class was never intended to be exposed and is now marked as private. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.12 2024/09/23 08:12:12 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.32.0 @ 1.12 log @py-test-httpx: updated to 0.31.1 0.31.1 Fixed - It is now possible to match on content provided as async iterable by the client. 0.31.0 Changed - Tests will now fail at teardown by default if some requests were issued but were not matched. - This behavior can be changed thanks to the new ``pytest.mark.httpx_mock(assert_all_requests_were_expected=False)`` option. - The `httpx_mock` fixture is now configured using a marker (many thanks to [`Frazer McLean`](https://github.com/RazerM)). ```python # Apply marker to whole module pytestmark = pytest.mark.httpx_mock(assert_all_responses_were_requested=False) # Or to specific tests @@pytest.mark.httpx_mock(non_mocked_hosts=[...]) def test_foo(httpx_mock): ... ``` - The following options are available: - `assert_all_responses_were_requested` (boolean), defaulting to `True`. - `assert_all_requests_were_expected` (boolean), defaulting to `True`. - `non_mocked_hosts` (iterable), defaulting to an empty list, meaning all hosts are mocked. - `httpx_mock.reset` do not expect any parameter anymore and will only reset the mock state (no assertions will be performed). Removed - `pytest` `7` is not supported anymore (`pytest` `8` has been out for 9 months already). - `assert_all_responses_were_requested` fixture is not available anymore, use `pytest.mark.httpx_mock(assert_all_responses_were_requested=False)` instead. - `non_mocked_hosts` fixture is not available anymore, use `pytest.mark.httpx_mock(non_mocked_hosts=[])` instead. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.11 2024/02/21 19:21:53 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.31.1 a22 2 PYTHON_VERSIONS_INCOMPATIBLE= 38 @ 1.11 log @py-test-httpx: updated to 0.30.0 0.30.0 Changed - Requires [`httpx`](https://www.python-httpx.org)==0.27.\* Fixed - Switch from `setup.py` to `pyproject.toml` @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.10 2024/01/30 20:47:36 adam Exp $ d3 2 a4 2 DISTNAME= pytest-httpx-0.30.0 PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/^py//} d17 1 a17 1 DEPENDS+= ${PYPKGPREFIX}-test>=7.0:../../devel/py-test d23 1 a23 1 PYTHON_VERSIONS_INCOMPATIBLE= 27 38 @ 1.10 log @py-test-httpx: updated to 0.29.0 0.29.0 - Add support for [`pytest`](https://docs.pytest.org)==8.\* ([`pytest`](https://docs.pytest.org)==7.\* is still supported for now). @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.9 2024/01/01 11:47:34 adam Exp $ d3 2 a4 2 DISTNAME= pytest_httpx-0.29.0 PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/pytest_/test-/} d14 1 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-httpx>=0.26:../../www/py-httpx @ 1.9 log @py-test-httpx: updated to 0.28.0 0.28.0 Changed - Requires [`httpx`](https://www.python-httpx.org)==0.26.\* @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.8 2023/11/16 09:39:59 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.28.0 @ 1.8 log @py-test-httpx: updated to 0.27.0 0.27.0 Added - Explicit support for python `3.12`. Fixed - Custom HTTP transport are now handled (parent call to `handle_async_request` or `handle_request`). Changed - Only HTTP transport are now mocked, this should not have any impact, however if it does, please feel free to open an issue describing your use case. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.7 2023/09/27 15:14:30 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.27.0 d13 3 a15 1 DEPENDS+= ${PYPKGPREFIX}-httpx>=0.25:../../www/py-httpx d17 1 a17 1 TEST_DEPENDS+= ${PYPKGPREFIX}-test-asyncio>=0.21:../../devel/py-test-asyncio d24 1 a24 4 do-test: cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} tests .include "../../lang/python/egg.mk" @ 1.7 log @py-test-httpx: updated to 0.26.0 0.26.0 Added - Added `proxy_url` parameter which allows matching on proxy URL. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.6 2023/09/14 09:28:21 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.26.0 @ 1.6 log @py-test-httpx: updated to 0.25.0 0.25.0 Changed - Requires [`httpx`](https://www.python-httpx.org)==0.25.\* Removed - `pytest` `6` is no longer supported. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.5 2023/09/06 20:05:12 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.25.0 @ 1.5 log @py-test-httpx: updated to 0.24.0 0.24.0 Added - Added `match_json` parameter which allows matching on JSON decoded body (matching against python representation instead of bytes). Changed - Even if it was never documented as a feature, the `match_headers` parameter was not considering header names case when matching. - As this might have been considered a feature by some users, the fact that `match_headers` will now respect casing is documented as a breaking change. Fixed - Matching on headers does not ignore name case anymore, the name must now be cased as sent (as some servers might expect a specific case). - Error message in case a request does not match will now include request headers with mismatching name case as well. - Error message in case a request does not match will now include request headers when not provided as lower-cased to `match_headers`. - Add `:Any` type hint to `**matchers` function arguments to satisfy strict type checking mode in [`pyright`](https://microsoft.github.io/pyright/#/). @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.4 2023/08/04 05:10:22 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.24.0 d13 2 a14 2 DEPENDS+= ${PYPKGPREFIX}-httpx>=0.24:../../www/py-httpx DEPENDS+= ${PYPKGPREFIX}-test>=6.0:../../devel/py-test @ 1.4 log @py-test-httpx: updated to 0.23.1 0.23.1 Fixed - Version `0.23.0` introduced a regression removing the support for mutating json content provided in `httpx_mock.add_response`. - This is fixed, you can now expect the JSON return being as it was when provided to `httpx_mock.add_response`: ```python mutating_json = {"content": "request 1"} # This will return {"content": "request 1"} httpx_mock.add_response(json=mutating_json) mutating_json["content"] = "request 2" # This will return {"content": "request 2"} httpx_mock.add_response(json=mutating_json) ``` 0.23.0 Removed - Python `3.7` and `3.8` are no longer supported. Fixed - `httpx_mock.add_response` is now returning a new `httpx.Response` instance upon each matching request. Preventing unnecessary recursion in streams. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.3 2023/04/17 09:59:50 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.23.1 @ 1.3 log @py-test-httpx: updated to 0.22.0 0.22.0 Requires httpx==0.24.* @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.2 2023/01/20 12:37:03 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.22.0 d15 2 d20 4 a23 1 PYTHON_VERSIONS_INCOMPATIBLE= 27 @ 1.2 log @py-test-httpx: updated to 0.21.3 0.21.3 Fixed Update version specifiers for pytest dependency to support packaging 23. Add explicit support for python 3.11. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.1 2022/11/15 12:17:08 adam Exp $ d3 1 a3 1 DISTNAME= pytest_httpx-0.21.3 d13 2 a14 2 DEPENDS+= ${PYPKGPREFIX}-httpx>=0.23.0:../../www/py-httpx DEPENDS+= ${PYPKGPREFIX}-test>=6.0.0:../../devel/py-test @ 1.1 log @py-test-httpx: added version 0.21.2 Send responses to HTTPX using pytest. @ text @d1 1 a1 1 # $NetBSD$ d3 1 a3 1 DISTNAME= pytest_httpx-0.21.2 @