Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pytest-httpx requirement from ~=0.33.0 to ~=0.34.0 in the dependencies group #537

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 25, 2024

Updates the requirements on pytest-httpx to permit the latest version.
Updates pytest-httpx to 0.34.0

Release notes

Sourced from pytest-httpx's releases.

0.34.0 (2024-11-18)

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.
Changelog

Sourced from pytest-httpx's changelog.

[0.34.0] - 2024-11-18

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.

[0.33.0] - 2024-10-28

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:
    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.

[0.32.0] - 2024-09-27

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.

... (truncated)

Commits
  • c91c327 Merge pull request #172 from Colin-b/develop
  • 19195f5 Merge pull request #171 from Colin-b/release_new_version
  • 1f5125b Release 0.34.0
  • 30f361b Merge pull request #170 from Colin-b/update_tests
  • 88e2ff3 Merge remote-tracking branch 'origin/master' into update_tests
  • f5e5de7 Introduce is_optional and is_reusable parameters
  • 7b70d28 Better error message for get_request failure
  • f560e40 Merge pull request #169 from Colin-b/allow_to_register_multi_responses
  • ceb09f0 Allow multi match per response
  • 066b4d2 Merge pull request #168 from Colin-b/allow_to_register_optional_responses
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Updates the requirements on [pytest-httpx](https://github.com/Colin-b/pytest_httpx) to permit the latest version.

Updates `pytest-httpx` to 0.34.0
- [Release notes](https://github.com/Colin-b/pytest_httpx/releases)
- [Changelog](https://github.com/Colin-b/pytest_httpx/blob/develop/CHANGELOG.md)
- [Commits](Colin-b/pytest_httpx@v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: pytest-httpx
  dependency-type: direct:production
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot requested a review from CasperWA as a code owner November 25, 2024 04:33
@dependabot dependabot bot added CI/CD Continuous Integration / Continuous Deployment dependencies Pull requests that update a dependency file skip-changelog Skip this issue/PR in the CHANGLOG.md labels Nov 25, 2024
@CasperWA CasperWA enabled auto-merge (squash) November 25, 2024 04:33
AnyUrl from pydantic is no longer hashable.
@CasperWA CasperWA merged commit b174d62 into main Nov 25, 2024
13 checks passed
@CasperWA CasperWA deleted the dependabot/pip/main/dependencies-dee59b100c branch November 25, 2024 11:30
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.99%. Comparing base (450789a) to head (5d60d8b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
optimade_gateway/models/gateways.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #537      +/-   ##
==========================================
- Coverage   88.08%   87.99%   -0.10%     
==========================================
  Files          39       39              
  Lines        1242     1249       +7     
==========================================
+ Hits         1094     1099       +5     
- Misses        148      150       +2     
Flag Coverage Δ
mongodb 87.91% <86.66%> (-0.10%) ⬇️
mongomock 87.99% <86.66%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Continuous Integration / Continuous Deployment dependencies Pull requests that update a dependency file skip-changelog Skip this issue/PR in the CHANGLOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant