Respect the string_if_invalid template setting when
--fail-on-template-vars is active and
:func:@pytest.mark.ignore_template_errors <pytest.mark.ignore_template_errors>
is used.
Avoid running database migrations for :class:~django.test.SimpleTestCase
unittest tests.
Added docstrings to public fixtures.
Bugfixes
^^^^^^^^
Fix type hints for pytest_django.asserts.assertFormError() and
pytest_django.asserts.assertForSetError().
@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.
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.
@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.
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.
... (truncated)
Commits
f0e070d Merge pull request #166 from Colin-b/develop
* Raise `TypeError` instead of `ValueError` if constructor is called with value of wrong type.
* Update ``ruff`` linter rules and switch to ``hatch fmt``.
Added
* Added :meth:`.ULID.parse`-method, which allows to create a :class:`.ULID`-instance from an
arbitrary supported input value. `@perrotuerto <https://github.com/perrotuerto>`_.
Fixed
Documentation bug in the example of :meth:.ULID.milliseconds@tsugumi-sys <https://github.com/tsugumi-sys>_.
Commits
1f1a9e1 feat: Use from_hex for strings of length 32
Fix compression speed gains for the thread pool when running Django’s collectstatic.
The thread pool had no effect due to use of a generator for the results, a refactoring introduced when reviewing the initial PR.
Thanks to Petr Přikryl for the investigation and fix in PR [#616](https://github.com/evansd/whitenoise/issues/616) <https://github.com/evansd/whitenoise/pull/616>__.
6.8.1 (2024-10-28)
Raise any errors from threads in the whitenoise.compress command.
Regression in 6.8.0.
Thanks to Tom Grainger for the spotting this with a comment on PR [#484](https://github.com/evansd/whitenoise/issues/484) <https://github.com/evansd/whitenoise/pull/484#discussion_r1818989096>__.
6.8.0 (2024-10-28)
Drop Django 3.2 to 4.1 support.
Drop Python 3.8 support.
Support Python 3.13.
Fix a bug introduced in version 6.0.0 where Range requests could lead to database connection errors in other requests.
Thanks to Per Myren for the detailed investigation and fix in PR [#612](https://github.com/evansd/whitenoise/issues/612) <https://github.com/evansd/whitenoise/pull/612>__.
Use Django’s |FORCE_SCRIPT_NAME|__ setting correctly.
This reverts a change from version 5.3.0 that added a call to Django’s |get_script_prefix() method|__ outside of the request-response cycle.
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 ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore 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 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 ` 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 ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the python-packages group with 8 updates in the / directory:
1.35.8
1.35.54
1.19.0
1.20.0
4.8.0
4.9.0
0.30.0
0.33.0
2.7.0
3.0.0
2024.1
2024.2
2.13.0
2.18.0
6.7.0
6.8.2
Updates
boto3
from 1.35.8 to 1.35.54Commits
fdb78d3
Merge branch 'release-1.35.54'3b67876
Bumping version to 1.35.546494499
Add changelog entries from botocore7fda69a
Merge branch 'release-1.35.53'923c9e4
Merge branch 'release-1.35.53' into developd6e1a82
Bumping version to 1.35.5388bbcd4
Add changelog entries from botocore93b71d0
Merge branch 'release-1.35.52'e980e72
Merge branch 'release-1.35.52' into developd61432d
Bumping version to 1.35.52Updates
django-htmx
from 1.19.0 to 1.20.0Changelog
Sourced from django-htmx's changelog.
Commits
168d861
Version 1.20.02aa0fec
Add django-template-partials example to Tips (#413)44b4e17
Drop Python 3.8 support (#488)9087769
Add automated release process (#489)c934531
[pre-commit.ci] pre-commit autoupdate (#486)3cee88d
Bump astral-sh/setup-uv from 1 to 3 in the github-actions group (#485)41632d4
Add Djade to pre-commitd37ba1b
Support Python 3.13 (#483)b5954fc
Upgrade requirements (#482)b125308
Use uv on GitHub Actions (#481)Updates
pytest-django
from 4.8.0 to 4.9.0Release notes
Sourced from pytest-django's releases.
Changelog
Sourced from pytest-django's changelog.
Commits
1157a7c
Release 4.9.0089843c
Add a few type annotationsd878d56
Add a missing type annotation19605d7
fail-on-template-vars: modernize stack inspection code (#1129)c746a46
Avoid running database migrations forSimpleTestCase
(#1120)8502a12
Replace psycopg2, psycopg2cffi -> psycopg in testing and docs52b2205
Drop support for EOL Django 3.2, 4.1, add support for 5.1c66f9d3
ci: use trusted publishing for release30602a2
tox: update ruff, mypya39b910
Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.10.0Updates
pytest-httpx
from 0.30.0 to 0.33.0Release notes
Sourced from pytest-httpx's releases.
... (truncated)
Changelog
Sourced from pytest-httpx's changelog.
... (truncated)
Commits
f0e070d
Merge pull request #166 from Colin-b/developd737f01
Release version 0.33.0 today4aa75d1
Allow to match on extensions6f8f338
fix todo53b7d13
Allow to match on multipart body more easily69e6301
release with 3.1355fb5bd
Add should_mock optiondcc725f
Merge pull request #160 from Colin-b/develop2da1848
Avoid unused variables with a dedicated name50bd257
Document how to use httpx.URLUpdates
python-ulid
from 2.7.0 to 3.0.0Release notes
Sourced from python-ulid's releases.
Changelog
Sourced from python-ulid's changelog.
Commits
1f1a9e1
feat: Use from_hex for strings of length 32bd08a09
chore: Fix pipeline dependency70742fb
feat(coverage): Combine coverge from matrix runs99b64a9
chore: Brainfartfc02f34
feat(cli): Fix CLI entrypointc60e7f2
feat(ci): Use pypi/hatch install action85835a6
feat(ruff): Update linter, rules and fix code accordinglya8108b7
feat(devbox): Add Devbox for general Python setup7d6d38e
fix invalid parameter reference: milliseconds (#30)ca8857c
Implement ULID.parse() (#29)Updates
pytz
from 2024.1 to 2024.2Commits
3944f75
Bump version numbers to 2024.2 / 2024b640c9bd
IANA 2024b382ca0c
Squashed 'tz/' changes from 380c07cef..923e54bae96a1e88
Stop testing unavailable and EOL Python 3.568186b6
Add support for Python 3.13e994058
Run other jobs if one fails2326f9f
Bump GitHub ActionsUpdates
sentry-sdk
from 2.13.0 to 2.18.0Release notes
Sourced from sentry-sdk's releases.
... (truncated)
Changelog
Sourced from sentry-sdk's changelog.
... (truncated)
Commits
09946cb
Update CHANGELOG.md0a8ef92
release: 2.18.0dd1117d
Add LaunchDarkly and OpenFeature integration (#3648)d06a189
docs(hub): Correct typo in a comment (#3726)5e2d2cf
fix(tracing): End http.client span on timeout (#3723)5c5d98a
test: Fix UTC assuming test (#3722)ce9986c
fix(http2): Check for h2 existence (#3690)02d0934
fix(profiling): Usetype()
instead when extracting frames (#3716)bf40090
test(tornado): Unpinpytest
fortornado-latest
tests (#3714)000c8e6
fix(starlette): Prefer python_multipart import over multipart (#3710)Updates
whitenoise
from 6.7.0 to 6.8.2Changelog
Sourced from whitenoise's changelog.
Commits
2f75ac8
Version 6.8.261853c7
Fix compression speed gains (#616)bfc5dae
Version 6.8.16bbec0f
Raise errors from threads in whitenoise.compress (#615)0b054e5
Version 6.8.054c464a
Upgrade and clarify Django quickstart docs (#548)d5caf8d
Compress each file in a ThreadPool (#484)9494ff3
Use settings.FORCE_SCRIPT_NAME correctly (#486)c42e93c
Make sure SlicedFile is closed properly (#612)f8dff50
Drop Django 3.2 to 4.1 support (#614)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