Exclusion patterns can now be multi-line, thanks to Daniel Diniz <pull 1807_>. This enables many interesting exclusion use-cases, including those
requested in issues 118 <issue 118_> (entire files), 996 <issue 996_>_ (multiple lines only when appearing together), 1741 <issue 1741_>_ (remainder of a function), and 1803 <issue 1803_>_
(arbitrary sequence of marked lines). See the :ref:multi_line_exclude
section of the docs for more details and examples.
The JSON report now includes per-function and per-class coverage information.
Thanks to Daniel Diniz <pull 1809_>_ for getting the work started. This
closes issue 1793_ and issue 1532_.
Fixed an incorrect calculation of "(no class)" lines in the HTML classes
report.
We’ve just uploaded mypy 1.11 to the Python Package Index (PyPI). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
python3 -m pip install -U mypy
You can read the full documentation for this release on Read the Docs.
Support Python 3.12 Syntax for Generics (PEP 695)
Mypy now supports the new type parameter syntax introduced in Python 3.12 (PEP 695).
This feature is still experimental and must be enabled with the --enable-incomplete-feature=NewGenericSyntax flag, or with enable_incomplete_feature = NewGenericSyntax in the mypy configuration file.
We plan to enable this by default in the next mypy feature release.
This example demonstrates the new syntax:
# Generic function
def f[T](https://github.com/python/mypy/blob/master/x: T) -> T: ...
reveal_type(f(1)) # Revealed type is 'int'
Generic class
class C[T]:
def init(self, x: T) -> None:
self.x = x
c = C('a')
reveal_type(c.x) # Revealed type is 'str'
Type alias
type A[T] = C[list[T]]
This feature was contributed by Jukka Lehtosalo.
Support for functools.partial
Mypy now type checks uses of functools.partial. Previously mypy would accept arbitrary arguments.
The 8.3.0 release failed to include the change notes and docs for the release. This patch release remedies this. There are no other changes.
8.3.0
pytest 8.3.0 (2024-07-20)
New features
#12231: Added [--xfail-tb]{.title-ref} flag, which turns on traceback output for XFAIL results.
If the [--xfail-tb]{.title-ref} flag is not given, tracebacks for XFAIL results are NOT shown.
The style of traceback for XFAIL is set with [--tb]{.title-ref}, and can be [auto|long|short|line|native|no]{.title-ref}.
Note: Even if you have [--xfail-tb]{.title-ref} set, you won't see them if [--tb=no]{.title-ref}.
Some history:
With pytest 8.0, [-rx]{.title-ref} or [-ra]{.title-ref} would not only turn on summary reports for xfail, but also report the tracebacks for xfail results. This caused issues with some projects that utilize xfail, but don't want to see all of the xfail tracebacks.
This change detaches xfail tracebacks from [-rx]{.title-ref}, and now we turn on xfail tracebacks with [--xfail-tb]{.title-ref}. With this, the default [-rx]{.title-ref}/ [-ra]{.title-ref} behavior is identical to pre-8.0 with respect to xfail tracebacks. While this is a behavior change, it brings default behavior back to pre-8.0.0 behavior, which ultimately was considered the better course of action.
#12281: Added support for keyword matching in marker expressions.
Now tests can be selected by marker keyword arguments.
Supported values are int{.interpreted-text role="class"}, (unescaped) str{.interpreted-text role="class"}, bool{.interpreted-text role="class"} & None{.interpreted-text role="data"}.
See marker examples <marker_keyword_expression_example>{.interpreted-text role="ref"} for more information.
-- by lovetheguitar{.interpreted-text role="user"}
#12567: Added --no-fold-skipped command line option.
If this option is set, then skipped tests in short summary are no longer grouped
by reason but all tests are printed individually with their nodeid in the same
way as other statuses.
-- by pbrezina{.interpreted-text role="user"}
Improvements in existing functionality
#12469: The console output now uses the "third-party plugins" terminology,
replacing the previously established but confusing and outdated
reference to setuptools <setuptools:index>{.interpreted-text role="std:doc"}
-- by webknjaz{.interpreted-text role="user"}.
#12544, #12545: Python virtual environment detection was improved by
checking for a pyvenv.cfg{.interpreted-text role="file"} file, ensuring reliable detection on
various platforms -- by zachsnickers{.interpreted-text role="user"}.
Bumps the all-dependencies group with 11 updates in the / directory:
4.1.3
4.2.0
0.111.0
0.111.1
2.8.0
2.8.2
7.5.4
7.6.0
1.10.1
1.11.0
8.2.2
8.3.1
0.5.0
0.5.4
0.30.1
0.30.3
2024.6.2
2024.7.4
2.5.36
2.6.0
70.2.0
71.1.0
Updates
bcrypt
from 4.1.3 to 4.2.0Commits
8d05111
Bump version for 4.2.0 release (#843)884baed
Import improvements from cryptography wheel building and release (#840)dd72470
Remove setup.py (#842)11961af
Small cleanup (#841)65e08f7
Added 3.13 to CI (#839)7efb8fa
Bump portable-atomic from 1.6.0 to 1.7.0 in /src/_bcrypt (#836)b1ec034
Bump syn from 2.0.71 to 2.0.72 in /src/_bcrypt (#837)2e9cdc2
Bump pyo3 from 0.22.1 to 0.22.2 in /src/_bcrypt (#834)d004722
Bump syn from 2.0.70 to 2.0.71 in /src/_bcrypt (#833)bb10016
Bump actions/setup-python from 5.1.0 to 5.1.1 (#832)Updates
fastapi
from 0.111.0 to 0.111.1Release notes
Sourced from fastapi's releases.
... (truncated)
Commits
b199364
🔖 Release version 0.111.138db0a5
📝 Update release notes0f22c76
📝 Update release notes4d3ef06
➖ Remove orjson and ujson from default dependencies (#11842)7a9396c
📝 Update release notes0b1e2ec
✏️ Rewording indocs/en/docs/fastapi-cli.md
(#11716)fb15c48
📝 Update release notes9d74b23
♻️ Simplify internal docs script (#11777)3a8f6cd
📝 Update release notes60f7fe4
📝 Update Hypercorn links in all the docs (#11744)Updates
pydantic
from 2.8.0 to 2.8.2Release notes
Sourced from pydantic's releases.
Changelog
Sourced from pydantic's changelog.
Commits
4978ee2
update history0345929
v bumpd390a04
Fix issue with assertion caused by pluggable schema validator (#9838)040865f
update history5a33e3b
bump version2f9abb2
Bumppydantic-core
tov2.20.1
,pydantic-extra-types
tov2.9.0
(#9832)ce9c5f7
Remove spooky meetings file (#9824)6bdd6d1
Pedantic typo correction within explanation of Pydantic's root in 'pedantic' ...701ccde
Fix list constraint json schema application (#9818)2a066a2
Bumpruff
tov0.5.0
andpyright
tov1.1.369
(#9801)Updates
coverage
from 7.5.4 to 7.6.0Changelog
Sourced from coverage's changelog.
Commits
59a3cd7
docs: sample HTML for 7.6.07f27fa7
docs: prep for 7.6.06a268b0
docs: issues closed by the json region reporting5bfe9e7
chore: bump actions/setup-python from 5.1.0 to 5.1.1 (#1814)ab609ef
docs: mention json region reporting in the changes92d96b9
fix: json report needs 'no class' and 'no function' alsoe47e7e7
refactor: move duplicate code into methods3d6be2b
fix: json format should bump for regionsa9992d2
test: add a test of json regions with branches8b89764
test: json expectations should have explicit format numberUpdates
mypy
from 1.10.1 to 1.11.0Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
dbd5f5c
Remove +dev from version for 1.11 releasef0a8c69
Update CHANGELOG for mypy 1.11 (#17540)371f780
CHANGELOG.md update for 1.11 (#17539)2563da0
Fix daemon crash on invalid type in TypedDict (#17495)d8c67c3
[release 1.11] Ignore some errors in typeshed (#17510)294daff
Mention --enable-incomplete-feature=NewGenericSyntax (#17462)5c33abf
Further improvements to functools.partial handling (#17425)c37d972
Fix type comments crash inside generic definitions (#16849)d39f023
Add changelog entry for 1.10.1 (#17436)6c1d867
Fix ParamSpec inference against TypeVarTuple (#17431)Updates
pytest
from 8.2.2 to 8.3.1Release notes
Sourced from pytest's releases.
... (truncated)
Commits
de98446
Prepare release version 8.3.1bd0a042
Merge pull request #12636 from pytest-dev/update-release-notes664325b
doc/changelog: update 8.3.0 notes19d225d
Merge pull request #12635 from pytest-dev/release-8.3.0bc33028
Prepare release version 8.3.0a7d5a8e
Merge pull request #12557 from x612skm/maintainence/11771-pypy-3.9-bumpced7072
Add a change note for PR #11771d42b76d
Adjust test_errors_in_xfail_skip_expressions for PyPy9eee45a
Bump PyPy runtime to v3.9 @ GHAd489247
Fix caching of parameterized fixtures (#12600)Updates
ruff
from 0.5.0 to 0.5.4Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
53b84ab
Cleanup redundant spaces from changelog (#12424)3664f85
Bump version to v0.5.4 (#12423)2c1926b
Insert parentheses for multi-argument generators (#12422)4bcc96a
Avoid shadowing diagnostics for@override
methods (#12415)c0a2b49
Fix the Github link error for Neovim in the setup for editors in the docs. (#...ca22248
Update docs Settings output-format default (#12409)d8cf8ac
[red-knot] Resolve symbols frombuiltins.pyi
in the stdlib if they cannot b...1c7b840
[red-knot] fix incremental benchmark (#12400)f82bb67
[red-knot] trace file when inferring types (#12401)5f96f69
[red-knot] Fix bug where module resolution would not be invalidated if an ent...Updates
uvicorn
from 0.30.1 to 0.30.3Release notes
Sourced from uvicorn's releases.
Changelog
Sourced from uvicorn's changelog.
Commits
5bf788f
Version 0.30.3 (#2395)8f4c8a7
Add 100% clean coverage (#2394)9baded3
Bump the python-packages group with 9 updates (#2376)9279825
ClientDisconnect
inherits fromOSError
instead ofIOError
(#2393)875f6c6
SuppressKeyboardInterrupt
from CLI and programmatic usage (#2384)ca24e1b
Version 0.30.2 (#2380)c23cd24
Iterate subprocesses in-place (#2373)d79f285
docs(readme): add granian as an alternative (#2359)4e9f48d
Addreason
support on WebSocketDisconnectEvent (#2324)Updates
certifi
from 2024.6.2 to 2024.7.4Commits
bd81538
2024.07.04 (#295)06a2cbf
Bump peter-evans/create-pull-request from 6.0.5 to 6.1.0 (#294)13bba02
Bump actions/checkout from 4.1.6 to 4.1.7 (#293)e8abcd0
Bump pypa/gh-action-pypi-publish from 1.8.14 to 1.9.0 (#292)Updates
identify
from 2.5.36 to 2.6.0Commits
577bfe1
v2.6.02e9f390
Merge pull request #468 from harrymander/fix-index-error-with-env-shebang0853fe3
Merge pull request #457 from wircho/adolfo-add-ejson818c07f
Add ejson extension909fd82
Merge pull request #469 from pre-commit/pre-commit-ci-update-configa9fd388
[pre-commit.ci] pre-commit autoupdate90c7a1e
Fix IndexError when shebang is just '#!/usr/bin/env'437ef92
Merge pull request #467 from pre-commit/pre-commit-ci-update-config525954b
[pre-commit.ci] pre-commit autoupdate0651fca
Merge pull request #464 from pre-commit/pre-commit-ci-update-configUpdates
pydantic-core
from 2.20.0 to 2.20.1Release notes
Sourced from pydantic-core's releases.
Commits
0e6b377
Bumpspeedate
to v0.14.1 and prep for v0.20.1 (#1347)b7fa254
Bump the python-packages group across 1 directory with 7 updates (#1361)de19683
Bump num-bigint from 0.4.5 to 0.4.6 (#1357)4519e9f
Bump uuid from 1.9.0 to 1.9.1 (#1356)510daf8
Bumppytest-examples
to get tests passing with ruffv0.5.0
(#1360)a017bd9
try restore 3.13 PGO builds (#1346)Updates
setuptools
from 70.2.0 to 71.1.0Changelog
Sourced from setuptools's changelog.