fix(deps): update all non-major dependencies
This MR contains the following updates:
| Package | Type | Update | Change | Age | Confidence |
|---|---|---|---|---|---|
| DavidAnson/markdownlint-cli2 | repository | minor |
v0.17.2 -> v0.18.1
|
||
| alessandrojcm/commitlint-pre-commit-hook | repository | minor |
v9.22.0 -> v9.23.0
|
||
| editorconfig-checker/editorconfig-checker.python | repository | minor |
3.2.1 -> 3.4.0
|
||
| google-auth | dependencies | minor |
2.40.1 -> 2.41.1
|
||
| message-schemas | dependencies | minor |
^0.6.0 -> ^0.7.0
|
||
| msgraph-sdk | dependencies | minor |
1.28.0 -> 1.47.0
|
||
| pre-commit/mirrors-mypy | repository | minor |
v1.15.0 -> v1.18.2
|
||
| pydantic (changelog) | dependencies | minor |
2.11.7 -> 2.12.3
|
||
| pydantic-settings (changelog) | dependencies | minor |
2.9.1 -> 2.11.0
|
||
| pytest (changelog) | dev | minor |
8.3.5 -> 8.4.2
|
||
| pytest-env | dev | minor |
1.1.5 -> 1.2.0
|
||
| registry.gitlab.developers.cam.ac.uk/uis/devops/lib/ucam-faas-python | final | minor |
0.8.0 -> 0.17.5
|
||
| ucam-faas | dependencies | minor |
^0.8.0 -> ^0.17.0
|
||
| ucam-observe | dependencies | patch |
0.2.0 -> 0.2.1
|
||
| uis/devops/continuous-delivery/ci-templates | repository | minor |
v6.10.0 -> v6.15.0
|
Note: The pre-commit manager in Renovate is not supported by the pre-commit maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.
Release Notes
alessandrojcm/commitlint-pre-commit-hook (alessandrojcm/commitlint-pre-commit-hook)
v9.23.0
Features
editorconfig-checker/editorconfig-checker.python (editorconfig-checker/editorconfig-checker.python)
v3.4.0
v3.3.0
googleapis/google-auth-library-python (google-auth)
v2.41.1
Bug Fixes
v2.41.0
Features
- Add support for cachetools 6.0 (#1773) (af18060)
- Add trust boundary support for service accounts and impersonation. (#1778) (99be2ce)
Bug Fixes
- Deprecating load_credentials_from_dict (58b66ec)
- Deprecating load_credentials_from_file (58b66ec)
- Fix type error in credentials.py for python 3.7 and 3.8 (#1805) (c30a6a7)
Documentation
v2.40.3
Bug Fixes
- Auth fetch token from default endpoint (#1779) (88891cc)
- Remove unnecessary call to mds service (#1769) (7c61c7d)
- Retry 504 errors (#1767) (554f967)
v2.40.2
Bug Fixes
microsoftgraph/msgraph-sdk-python (msgraph-sdk)
v1.47.0
Features
- generation: update request builders and models (2772eb5)
- generation: update request builders and models (6fc8672)
v1.46.0
Features
- generation: update request builders and models (8ace06e)
v1.45.0
Features
- generation: update request builders and models (9b00d33)
v1.44.0
Features
- generation: update request builders and models (c73f3af)
v1.40.0
Features
- generation: update request builders and models (15c9742)
v1.39.0
Features
- generation: update request builders and models (cd04cfb)
v1.38.0
Features
- generation: update request builders and models (47a564d)
- generation: update request builders and models (b35949b)
v1.37.0
Features
- generation: update request builders and models (f7de565)
v1.36.0
Features
- generation: update request builders and models (7f49d36)
v1.35.0
Features
- generation: update request builders and models (5a3dc37)
v1.34.0
Features
- generation: update request builders and models (49dbc7e)
v1.33.0
Features
- generation: update request builders and models (2cb94a6)
v1.32.0
Features
- generation: update request builders and models (48cf860)
v1.31.0
Features
- generation: update request builders and models (f445a90)
v1.30.0
Features
- generation: update request builders and models (303fb7d)
v1.29.0
Features
pydantic/pydantic (pydantic)
v2.12.3
What's Changed
This is the third 2.12 patch release, fixing issues related to the FieldInfo class, and reverting a change to the supported
after model validator function signatures.
- Raise a warning when an invalid after model validator function signature is raised by @Viicos in #12414. Starting in 2.12.0, using class methods for after model validators raised an error, but the error wasn't raised concistently. We decided to emit a deprecation warning instead.
- Add
FieldInfo.asdict()method, improve documentation aroundFieldInfoby @Viicos in #12411. This also add back support for mutations onFieldInfoclasses, that are reused asAnnotatedmetadata. However, note that this is still not a supported pattern. Instead, please refer to the added example in the documentation.
The blog post section on changes was also updated to document the changes related to serialize_as_any.
v2.12.2
What's Changed
Fixes
- Release a new
pydantic-coreversion, as a corrupted CPython 3.10manylinux2014_aarch64wheel got uploaded (pydantic-core#1843). - Fix issue with recursive generic models with a parent model class by @Viicos in #12398
v2.12.1
What's Changed
This is the first 2.12 patch release, addressing most (but not all yet) regressions from the initial 2.12.0 release.
Fixes
- Do not evaluate annotations when inspecting validators and serializers by @Viicos in #12355
- Make sure
Noneis converted asNoneTypein Python 3.14 by @Viicos in #12370 - Backport V1 runtime warning when using Python 3.14 by @Viicos in #12367
- Fix error message for invalid validator signatures by @Viicos in #12366
- Populate field name in
ValidationInfofor validation of default value by @Viicos in pydantic-core#1826 - Encode credentials in
MultiHostUrlbuilder by @willswire in pydantic-core#1829 - Respect field serializers when using
serialize_as_anyserialization flag by @davidhewitt in pydantic-core#1829 - Fix various
RootModelserialization issues by @davidhewitt in pydantic-core#1836
New Contributors
- @willswire made their first contribution in pydantic-core#1829
v2.12.0
What's Changed
This is the final 2.12 release. It features the work of 20 external contributors and provides useful new features, along with initial Python 3.14 support. Several minor changes (considered non-breaking changes according to our versioning policy) are also included in this release. Make sure to look into them before upgrading.
Note that Pydantic V1 is not compatible with Python 3.14 and greater.
Changes (see the alpha and beta releases for additional changes since 2.11):
Packaging
New Features
- Add
extraparameter to the validate functions by @anvilpete in #12233 - Add
exclude_computed_fieldsserialization option by @Viicos in #12334 - Add
preverse_empty_pathURL options by @Viicos in #12336 - Add
union_formatparameter to JSON Schema generation by @Viicos in #12147 - Add
__qualname__parameter forcreate_modelby @Atry in #12001
Fixes
- Do not try to infer name from lambda definitions in pipelines API by @Viicos in #12289
- Use proper namespace for functions in
TypeAdapterby @Viicos in #12324 - Use
Anyfor context type annotation inTypeAdapterby @inducer in #12279 - Expose
FieldInfoinpydantic.fields.__all__by @Viicos in #12339 - Respect
validation_aliasin@validate_callby @Viicos in #12340 - Use
Anyas context annotation in plugin API by @Viicos in #12341 - Use proper
stacklevelin warnings when possible by @Viicos in #12342
New Contributors
- @anvilpete made their first contribution in #12233
- @JonathanWindell made their first contribution in #12327
- @inducer made their first contribution in #12279
- @Atry made their first contribution in #12001
v2.11.10
What's Changed
Fixes
- Backport v1.10.24 changes by @Viicos
v2.11.9: 2025-09-13
What's Changed
Fixes
- Backport v1.10.23 changes by @Viicos
Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.8...v2.11.9
v2.11.8: 2025-09-13
v2.11.8 (2025-09-13)
What's Changed
Fixes
Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.7...v2.11.8
pydantic/pydantic-settings (pydantic-settings)
v2.11.0
What's Changed
- CLI Serialize Support by @kschwab in #643
- Inspect type aliases to determine if an annotation is complex by @tselepakis in #644
- Revert "fix: Respect 'cli_parse_args' from model_config with settings_customise_sources (#611)" by @hramezani in #655
- Remove parsing of command line arguments from
CliSettingsSource.__init__. by @trygve-baerland in #656 - turn off allow_abbrev on subparsers by @mroch in #658
- CLI Serialization Fixes by @kschwab in #649
- Fix PydanticModel type checking. by @kschwab in #659
- Avoid env_prefix falling back to env vars without prefix by @tselepakis in #648
- Warn if model_config sets unused keys for missing settings sources by @HomerusJa in #663
- Included endpoint_url kwarg in AWSSecretsManagerSettingsSource class by @adrianohrl in #664
- Fix typo ("Accesing") in the "Adding sources" docs by @deepyaman in #668
- CLI Windows Path Fix by @kschwab in #669
- Cli root model support by @kschwab in #677
- Snake case conversion in Azure Key Vault by @AndreuCodina in #680
- Make
InitSettingsSourceresolution deterministic by @enrico-stauss in #681 - Update deps by @hramezani in #683
New Contributors
- @tselepakis made their first contribution in #644
- @trygve-baerland made their first contribution in #656
- @mroch made their first contribution in #658
- @HomerusJa made their first contribution in #663
- @adrianohrl made their first contribution in #664
- @deepyaman made their first contribution in #668
- @enrico-stauss made their first contribution in #681
Full Changelog: https://github.com/pydantic/pydantic-settings/compare/2.10.1...v2.11.0
v2.10.1
What's Changed
- Fix UnboundLocalError error in _replace_field_names_case_insensitively by @hramezani in #639
- Remove unknown file reference in documentation by @Viicos in #640
- Prepare release 2.10.1 by @hramezani in #642
Full Changelog: https://github.com/pydantic/pydantic-settings/compare/2.10.0...2.10.1
v2.10.0
What's Changed
- Fix running tests when azure-keyvault-secrets is not installed by @CyberTailor in #601
- Fix running tests when google-cloud-secret-manager is not installed by @CyberTailor in #602
- Support loading a specific nested key from YAML in YamlConfigSettingsSource by @Seunghan-Jung in #603
- Fix CLI suppression for model group help by @kschwab in #604
- Fix missing DEFAULT_PATH import by @hramezani in #606
- Fix case-insensitive handling of nested aliases in EnvironmentSettingsSource by @d15ky in #608
- Azure Key Vault case insensitive support and dash-underscore translation by @d15ky in #607
- fix: Respect 'cli_parse_args' from model_config with settings_customise_sources by @karta9821 in #611
- Bump astral-sh/setup-uv by @hramezani in #612
- Update packages by @hramezani in #613
- Update README.md by @hramezani in #616
- Fix CI badge by @hramezani in #617
- Update dependencies by @hramezani in #618
- Fix coverage report by @hramezani in #619
- Fix _consume_object_or_array on unbalanced brackets in JSON strings by @andryak in #621
- add region as a parameter to aws secret manager by @barakor-vs in #622
- Expose GCP Secret Manager case sensitive option by @bellmatthewf in #626
- Update deps by @hramezani in #633
- feat: Add
cli_shortcutsto CLI settings by @karta9821 in #624 - Expose AWS Secrets Manager case sensitive option by @femiadebayo in #629
- Prepare release 2.10.0 by @hramezani in #635
New Contributors
- @Seunghan-Jung made their first contribution in #603
- @d15ky made their first contribution in #608
- @karta9821 made their first contribution in #611
- @andryak made their first contribution in #621
- @barakor-vs made their first contribution in #622
- @bellmatthewf made their first contribution in #626
- @femiadebayo made their first contribution in #629
Full Changelog: https://github.com/pydantic/pydantic-settings/compare/v2.9.1...2.10.0
pytest-dev/pytest (pytest)
v8.4.2
pytest 8.4.2 (2025-09-03)
Bug fixes
-
#13478: Fixed a crash when using
console_output_style{.interpreted-text role="confval"} withtimesand a module is skipped. -
#13530: Fixed a crash when using
pytest.approx{.interpreted-text role="func"} anddecimal.Decimal{.interpreted-text role="class"} instances with thedecimal.FloatOperation{.interpreted-text role="class"} trap set. -
#13549: No longer evaluate type annotations in Python
3.14when inspecting function signatures.This prevents crashes during module collection when modules do not explicitly use
from __future__ import annotationsand import types for annotations within aif TYPE_CHECKING:block. -
#13559: Added missing [int]{.title-ref} and [float]{.title-ref} variants to the [Literal]{.title-ref} type annotation of the [type]{.title-ref} parameter in
pytest.Parser.addini{.interpreted-text role="meth"}. -
#13563:
pytest.approx{.interpreted-text role="func"} now only importsnumpyif NumPy is already insys.modules. This fixes unconditional import behavior introduced in [8.4.0]{.title-ref}.
Improved documentation
-
#13577: Clarify that
pytest_generate_testsis discovered in test modules/classes; other hooks must be inconftest.pyor plugins.
Contributor-facing changes
-
#13480: Self-testing: fixed a few test failures when run with
-Wdefaultor a similar override. -
#13547: Self-testing: corrected expected message for
test_doctest_unexpected_exceptionin Python3.14. -
#13684: Make pytest's own testsuite insensitive to the presence of the
CIenvironment variable -- byogrisel{.interpreted-text role="user"}.
v8.4.1
pytest 8.4.1 (2025-06-17)
Bug fixes
-
#13461: Corrected
_pytest.terminal.TerminalReporter.isattyto support being called as a method. Before it was just a boolean which could break correct code when using-o log_cli=true). -
#13477: Reintroduced
pytest.PytestReturnNotNoneWarning{.interpreted-text role="class"} which was removed by accident in pytest [8.4]{.title-ref}.This warning is raised when a test functions returns a value other than
None, which is often a mistake made by beginners.See
return-not-none{.interpreted-text role="ref"} for more information. -
#13497: Fixed compatibility with
Twisted 25+.
Improved documentation
-
#13492: Fixed outdated warning about
faulthandlernot working on Windows.
v8.4.0
pytest 8.4.0 (2025-06-02)
Removals and backward incompatible breaking changes
-
#11372: Async tests will now fail, instead of warning+skipping, if you don't have any suitable plugin installed.
-
#12346: Tests will now fail, instead of raising a warning, if they return any value other than None.
-
#12874: We dropped support for Python 3.8 following its end of life (2024-10-07).
-
#12960: Test functions containing a yield now cause an explicit error. They have not been run since pytest 4.0, and were previously marked as an expected failure and deprecation warning.
See
the docs <yield tests deprecated>{.interpreted-text role="ref"} for more information.
Deprecations (removal in next major release)
-
#10839: Requesting an asynchronous fixture without a [pytest_fixture_setup]{.title-ref} hook that resolves it will now give a DeprecationWarning. This most commonly happens if a sync test requests an async fixture. This should have no effect on a majority of users with async tests or fixtures using async pytest plugins, but may affect non-standard hook setups or
autouse=True. For guidance on how to work around this warning seesync-test-async-fixture{.interpreted-text role="ref"}.
New features
-
#11538: Added
pytest.RaisesGroup{.interpreted-text role="class"} as an equivalent topytest.raises{.interpreted-text role="func"} for expectingExceptionGroup{.interpreted-text role="exc"}. Also addspytest.RaisesExc{.interpreted-text role="class"} which is now the logic behindpytest.raises{.interpreted-text role="func"} and used as parameter topytest.RaisesGroup{.interpreted-text role="class"}.RaisesGroupincludes the ability to specify multiple different expected exceptions, the structure of nested exception groups, and flags for emulatingexcept* <except_star>{.interpreted-text role="ref"}. Seeassert-matching-exception-groups{.interpreted-text role="ref"} and docstrings for more information. -
#12081: Added
capteesys{.interpreted-text role="fixture"} to capture AND pass output to next handler set by--capture=. -
#12504:
pytest.mark.xfail{.interpreted-text role="func"} now acceptspytest.RaisesGroup{.interpreted-text role="class"} for theraisesparameter when you expect an exception group. You can also pass apytest.RaisesExc{.interpreted-text role="class"} if you e.g. want to make use of thecheckparameter. -
#12713: New [--force-short-summary]{.title-ref} option to force condensed summary output regardless of verbosity level.
This lets users still see condensed summary output of failures for quick reference in log files from job outputs, being especially useful if non-condensed output is very verbose.
-
#12749: pytest traditionally collects classes/functions in the test module namespace even if they are imported from another file.
For example:
contents of src/domain.py
class Testament: ...
contents of tests/test_testament.py
from domain import Testament
def test_testament(): ...
```
In this scenario with the default options, pytest will collect the class [Testament]{.title-ref} from [tests/test_testament.py]{.title-ref} because it starts with [Test]{.title-ref}, even though in this case it is a production class being imported in the test module namespace.
This behavior can now be prevented by setting the new `collect_imported_tests`{.interpreted-text role="confval"} configuration option to `false`, which will make pytest collect classes/functions from test files **only** if they are defined in that file.
\-- by `FreerGit`{.interpreted-text role="user"}
-
#12765: Thresholds to trigger snippet truncation can now be set with
truncation_limit_lines{.interpreted-text role="confval"} andtruncation_limit_chars{.interpreted-text role="confval"}.See
truncation-params{.interpreted-text role="ref"} for more information. -
#13125:
console_output_style{.interpreted-text role="confval"} now supportstimesto show execution time of each test. -
#13192:
pytest.raises{.interpreted-text role="func"} will now raise a warning when passing an empty string tomatch, as this will match against any value. Usematch="^$"if you want to check that an exception has no message. -
#13192:
pytest.raises{.interpreted-text role="func"} will now print a helpful string diff if matching fails and the match parameter has^and$and is otherwise escaped. -
#13192: You can now pass
with pytest.raises(check=fn): <pytest.raises>{.interpreted-text role="func"}, wherefnis a function which takes a raised exception and returns a boolean. Theraisesfails if no exception was raised (as usual), passes if an exception is raised andfnreturnsTrue(as well asmatchand the type matching, if specified, which are checked before), and propagates the exception iffnreturnsFalse(which likely also fails the test). -
#13228:
hidden-param{.interpreted-text role="ref"} can now be used inidofpytest.param{.interpreted-text role="func"} or inidsofMetafunc.parametrize <pytest.Metafunc.parametrize>{.interpreted-text role="py:func"}. It hides the parameter set from the test name. -
#13253: New flag:
--disable-plugin-autoload <disable_plugin_autoload>{.interpreted-text role="ref"} which works as an alternative toPYTEST_DISABLE_PLUGIN_AUTOLOAD{.interpreted-text role="envvar"} when setting environment variables is inconvenient; and allows setting it in config files withaddopts{.interpreted-text role="confval"}.
Improvements in existing functionality
-
#10224: pytest's
shortandlongtraceback styles (how-to-modifying-python-tb-printing{.interpreted-text role="ref"}) now have partial657{.interpreted-text role="pep"} support and will show specific code segments in the traceback.================================= FAILURES ================================= _______________________ test_gets_correct_tracebacks _______________________ test_tracebacks.py:12: in test_gets_correct_tracebacks assert manhattan_distance(p1, p2) == 1 ^^^^^^^^^^^^^^^^^^^^^^^^^^ test_tracebacks.py:6: in manhattan_distance return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y) ^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'x'-- by
ammaraskar{.interpreted-text role="user"} -
#11118: Now
pythonpath{.interpreted-text role="confval"} configures [$PYTHONPATH]{.title-ref} earlier than before during the initialization process, which now also affects plugins loaded via the [-p]{.title-ref} command-line option.-- by
millerdev{.interpreted-text role="user"} -
#11381: The
typeparameter of theparser.addinimethod now accepts ["int"]{.title-ref} and"float"parameters, facilitating the parsing of configuration values in the configuration file.Example:
def pytest_addoption(parser): parser.addini("int_value", type="int", default=2, help="my int value") parser.addini("float_value", type="float", default=4.2, help="my float value")The [pytest.ini]{.title-ref} file:
[pytest] int_value = 3 float_value = 5.4 -
#11525: Fixtures are now clearly represented in the output as a "fixture object", not as a normal function as before, making it easy for beginners to catch mistakes such as referencing a fixture declared in the same module but not requested in the test function.
-- by
the-compiler{.interpreted-text role="user"} andglyphack{.interpreted-text role="user"} -
#12426: A warning is now issued when
pytest.mark.usefixtures ref{.interpreted-text role="ref"} is used without specifying any fixtures. Previously, empty usefixtures markers were silently ignored. -
#12707: Exception chains can be navigated when dropped into Pdb in Python 3.13+.
-
#12736: Added a new attribute [name]{.title-ref} with the fixed value ["pytest tests"]{.title-ref} to the root tag [testsuites]{.title-ref} of the junit-xml generated by pytest.
This attribute is part of many junit-xml specifications and is even part of the [junit-10.xsd]{.title-ref} specification that pytest's implementation is based on.
-
#12943: If a test fails with an exceptiongroup with a single exception, the contained exception will now be displayed in the short test summary info.
-
#12958: A number of
unraisable <unraisable>{.interpreted-text role="ref"} enhancements:- Set the unraisable hook as early as possible and unset it as late as possible, to collect the most possible number of unraisable exceptions.
- Call the garbage collector just before unsetting the unraisable hook, to collect any straggling exceptions.
- Collect multiple unraisable exceptions per test phase.
- Report the
tracemalloc{.interpreted-text role="mod"} allocation traceback (if available). - Avoid using a generator based hook to allow handling
StopIteration{.interpreted-text role="class"} in test failures. - Report the unraisable exception as the cause of the
pytest.PytestUnraisableExceptionWarning{.interpreted-text role="class"} exception if raised. - Compute the
reprof the unraisable object in the unraisable hook so you get the latest information if available, and should help with resurrection of the object.
-
#13010:
pytest.approx{.interpreted-text role="func"} now can compare collections that contain numbers and non-numbers mixed. -
#13016: A number of
threadexception <unraisable>{.interpreted-text role="ref"} enhancements:- Set the excepthook as early as possible and unset it as late as possible, to collect the most possible number of unhandled exceptions from threads.
- Collect multiple thread exceptions per test phase.
- Report the
tracemalloc{.interpreted-text role="mod"} allocation traceback (if available). - Avoid using a generator based hook to allow handling
StopIteration{.interpreted-text role="class"} in test failures. - Report the thread exception as the cause of the
pytest.PytestUnhandledThreadExceptionWarning{.interpreted-text role="class"} exception if raised. - Extract the
nameof the thread object in the excepthook which should help with resurrection of the thread.
-
#13031: An empty parameter set as in
pytest.mark.parametrize([], ids=idfunc)will no longer trigger a call toidfuncwith internal objects. -
#13115: Allows supplying
ExceptionGroup[Exception]andBaseExceptionGroup[BaseException]topytest.raisesto keep full typing onExceptionInfo <pytest.ExceptionInfo>{.interpreted-text role="class"}:with pytest.raises(ExceptionGroup[Exception]) as exc_info: some_function()Parametrizing with other exception types remains an error - we do not check the types of child exceptions and thus do not permit code that might look like we do.
-
#13122: The
--stepwisemode received a number of improvements:-
It no longer forgets the last failed test in case pytest is executed later without the flag.
This enables the following workflow:
- Execute pytest with
--stepwise, pytest then stops at the first failing test; - Iteratively update the code and run the test in isolation, without the
--stepwiseflag (for example in an IDE), until it is fixed. - Execute pytest with
--stepwiseagain and pytest will continue from the previously failed test, and if it passes, continue on to the next tests.
Previously, at step 3, pytest would start from the beginning, forgetting the previously failed test.
This change however might cause issues if the
--stepwisemode is used far apart in time, as the state might get stale, so the internal state will be reset automatically in case the test suite changes (for now only the number of tests are considered for this, we might change/improve this on the future). - Execute pytest with
-
New
--stepwise-reset/--sw-resetflag, allowing the user to explicitly reset the stepwise state and restart the workflow from the beginning.
-
-
#13308: Added official support for Python 3.14.
-
#13380: Fix
ExceptionGroup{.interpreted-text role="class"} traceback filtering to exclude pytest internals. -
#13415: The author metadata of the BibTex example is now correctly formatted with last names following first names. An example of BibLaTex has been added. BibTex and BibLaTex examples now clearly indicate that what is cited is software.
-- by
willynilly{.interpreted-text role="user"} -
#13420: Improved test collection performance by optimizing path resolution used in
FSCollector. -
#13457: The error message about duplicate parametrization no longer displays an internal stack trace.
-
#4112: Using
pytest.mark.usefixtures <pytest.mark.usefixtures ref>{.interpreted-text role="ref"} onpytest.param{.interpreted-text role="func"} now produces an error instead of silently doing nothing. -
#5473: Replace [:]{.title-ref} with [;]{.title-ref} in the assertion rewrite warning message so it can be filtered using standard Python warning filters before calling
pytest.main{.interpreted-text role="func"}.
[#​6985](https://github.com/pytest-dev/pytest/issues/6985): Improved `pytest.approx`{.interpreted-text role="func"} to enhance the readability of value ranges and tolerances between 0.001 and 1000.
: - The [repr]{.title-ref} method now provides clearer output for values within those ranges, making it easier to interpret the results.
- Previously, the output for those ranges of values and tolerances was displayed in scientific notation (e.g., [42 ± 1.0e+00]{.title-ref}). The updated method now presents the tolerance as a decimal for better readability (e.g., [42 ± 1]{.title-ref}).
Example:
**Previous Output:**
``` console
>>> pytest.approx(42, abs=1)
42 ± 1.0e+00
```
**Current Output:**
``` console
>>> pytest.approx(42, abs=1)
42 ± 1
```
\-- by `fazeelghafoor`{.interpreted-text role="user"}
-
#7683: The formerly optional
pygmentsdependency is now required, causing output always to be source-highlighted (unless disabled via the--code-highlight=noCLI option).
Bug fixes
-
#10404: Apply filterwarnings from config/cli as soon as possible, and revert them as late as possible so that warnings as errors are collected throughout the pytest run and before the unraisable and threadexcept hooks are removed.
This allows very late warnings and unraisable/threadexcept exceptions to fail the test suite.
This also changes the warning that the lsof plugin issues from PytestWarning to the new warning PytestFDWarning so it can be more easily filtered.
-
#11067: The test report is now consistent regardless if the test xfailed via
pytest.mark.xfail <pytest.mark.xfail ref>{.interpreted-text role="ref"} orpytest.fail{.interpreted-text role="func"}.Previously, xfailed tests via the marker would have the string
"reason: "prefixed to the message, while those xfailed via the function did not. The prefix has been removed. -
#12008: In
11220{.interpreted-text role="pr"}, an unintended change in reordering was introduced by changing the way indices were assigned to direct params. More specifically, before that change, the indices of direct params to metafunc's callspecs were assigned after all parametrizations took place. Now, that change is reverted. -
#12863: Fix applying markers, including
pytest.mark.parametrize <pytest.mark.parametrize ref>{.interpreted-text role="ref"} when placed above [@staticmethod]{.title-ref} or [@classmethod]{.title-ref}. -
#12929: Handle StopIteration from test cases, setup and teardown correctly.
-
#12938: Fixed
--durations-minargument not respected if-vvis used. -
#12946: Fixed missing help for
pdb{.interpreted-text role="mod"} commands wrapped by pytest -- byadamchainz{.interpreted-text role="user"}. -
#12981: Prevent exceptions in
pytest.Config.add_cleanup{.interpreted-text role="func"} callbacks preventing further cleanups. -
#13047: Restore
pytest.approx{.interpreted-text role="func"} handling of equality checks between [bool]{.title-ref} and [numpy.bool_]{.title-ref} types.Comparing [bool]{.title-ref} and [numpy.bool_]{.title-ref} using
pytest.approx{.interpreted-text role="func"} accidentally changed in version [8.3.4]{.title-ref} and [8.3.5]{.title-ref} to no longer match:>>> import numpy as np >>> from pytest import approx >>> [np.True_, np.True_] == pytest.approx([True, True]) FalseThis has now been fixed:
>>> [np.True_, np.True_] == pytest.approx([True, True]) True -
#13119: Improved handling of invalid regex patterns for filter warnings by providing a clear error message.
-
#13175: The diff is now also highlighted correctly when comparing two strings.
-
#13248: Fixed an issue where passing a
scopeinMetafunc.parametrize <pytest.Metafunc.parametrize>{.interpreted-text role="py:func"} withindirect=Truecould result in other fixtures being unable to depend on the parametrized fixture. -
#13291: Fixed
reprofattrsobjects in assertion failure messages when usingattrs>=25.2. -
#13312: Fixed a possible
KeyErrorcrash on PyPy during collection of tests involving higher-scoped parameters. -
#13345: Fix type hints for
pytest.TestReport.when{.interpreted-text role="attr"} andpytest.TestReport.location{.interpreted-text role="attr"}. -
#13377: Fixed handling of test methods with positional-only parameter syntax.
Now, methods are supported that formally define
selfas positional-only and/or fixture parameters as keyword-only, e.g.:class TestClass: def test_method(self, /, *, fixture): ...Before, this caused an internal error in pytest.
-
#13384: Fixed an issue where pytest could report negative durations.
-
#13420: Added
lru_cachetonodes._check_initialpaths_for_relpath. -
#9037: Honor
disable_test_id_escaping_and_forfeit_all_rights_to_community_support{.interpreted-text role="confval"} when escaping ids in parametrized tests.
Improved documentation
-
#12535: [This example]{.title-ref}<https://docs.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures> showed
printstatements that do not exactly reflect what the different branches actually do. The fix makes the example more precise. -
#13218: Pointed out in the
pytest.approx{.interpreted-text role="func"} documentation that it considers booleans unequal to numeric zero or one. -
#13221: Improved grouping of CLI options in the
--helpoutput. -
#6649: Added
~pytest.TerminalReporter{.interpreted-text role="class"} to theapi-reference{.interpreted-text role="ref"} documentation page. -
#8612: Add a recipe for handling abstract test classes in the documentation.
A new example has been added to the documentation to demonstrate how to use a mixin class to handle abstract test classes without manually setting the
__test__attribute for subclasses. This ensures that subclasses of abstract test classes are automatically collected by pytest.
Packaging updates and notes for downstreams
-
#13317: Specified minimum allowed versions of
colorama,iniconfig, andpackaging; and bumped the minimum allowed version ofexceptiongroupforpython_version<'3.11'from a release candidate to a full release.
Contributor-facing changes
-
#12017: Mixed internal improvements:
- Migrate formatting to f-strings in some tests.
- Use type-safe constructs in JUnitXML tests.
- Moved
MockTiminginto_pytest.timing.
-- by
RonnyPfannschmidt{.interpreted-text role="user"} -
#12647: Fixed running the test suite with the
hypothesispytest plugin.
Miscellaneous internal changes
-
#6649: Added
~pytest.TerminalReporter{.interpreted-text role="class"} to the public pytest API, as it is part of the signature of thepytest_terminal_summary{.interpreted-text role="hook"} hook.
pytest-dev/pytest-env (pytest-env)
v1.2.0
What's Changed
- Add support for 3.14 and drop 3.9 by @gaborbernat in #163
Full Changelog: https://github.com/pytest-dev/pytest-env/compare/1.1.5...1.2.0
uis/devops/lib/ucam-faas-python (ucam-faas)
v0.17.5
Bug Fixes
- deps: update dependency pre-commit to v4 (40e3145)
v0.17.4
Bug Fixes
- deps: pin dependencies (68ec701)
v0.17.3
Bug Fixes
v0.17.2
Bug Fixes
- update dependencies and pin python image (ef978b5)
v0.17.1
Bug Fixes
- update repo link for PyPi (4f85ada)
v0.17.0
Features
- add CloudEvent validation for webhook handler proxy (f0c880e)
v0.16.0
Features
- docs: add auto-built API documentation (b3998b0)
v0.15.0
Features
- support undoing functions_framework global state changes (516966e)
v0.14.1
v0.14.0
Features
- add support for reading message payload from bucket (37f8b6e)
v0.13.0
Features
- add authentication to webhook endpoint (34496a6)
Bug Fixes
- exclude run handler function from coverage (316b70d)
- remove JSON checking from data publishing (e81418f)
v0.12.0
Features
- refactor entra webhook container (319cf45)
Bug Fixes
- move entra webhook code into separate module (219026f)
v0.11.0
Features
- add long-running task support (f11c827)
Bug Fixes
- remove unneeded initialize argument (8f23b43)
v0.10.0
Features
- push docker images to public registry (b5b68ff)
v0.9.3
v0.9.2
Bug Fixes
- bump ci template to v6.10.0 to avoid release-it releasing twice (937dbe6)
- remove duplicated file release-it.json (ed53ae2)
v0.9.1
v0.9.0
Features
- add release-it config (23f78f3)
- include traceback on unhandled exceptions (5161cef)
- type-annotate ucam_fass and example modules (470334e)
Bug Fixes
uis/devops/continuous-delivery/ci-templates (uis/devops/continuous-delivery/ci-templates)
v6.15.0
Changed
-
terraform-module.yml: Add support for Terraform testing with additional cleanup scripts.
Fixed
-
terraform-module.yml: Override thetflintjob so that theterraform_standard_module_structurerule is applied. -
terraform-module.yml: Override thepre-commitjob to avoid duplication of ourterraform-fmt,tflint, andtrivyjobs.
v6.14.2
v6.14.1
v6.14.0
v6.13.0
v6.12.3
v6.12.2
Fixed
- terraform-module: override .
test-job-rulesfromterraform-lint.ymlas theterraform-module.ymltemplate needs to support Auto-DevOps.
v6.12.1
v6.12.0
v6.11.0
Changed
-
terraform-lint: use customtflintdocker image for thetflintjob. This image includes the UIS DevOps customtflintruleset. -
terraform-lint: move default tflint arguments to a$TFLINT_ARGSvariable to allow repositories to override if required. -
terraform-module: enabletflintin our Terraform reusable module pipeline.
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.