In Python 3.12 and above, you can try an experimental core based on the new sys.monitoring <python:sys.monitoring> module by defining a COVERAGE_CORE=sysmon environment variable. This should be faster for line coverage, but not for branch coverage, and plugins and dynamic contexts are not yet supported with it. I am very interested to hear how it works (or doesn't!) for you.
Fix: the change for multi-line signature exclusions in 7.3.3 broke other forms of nested clauses being excluded properly. This is now fixed, closing issue 1713.
Fix: in the HTML report, selecting code for copying won't select the line numbers also. Thanks, Robert Harris.
Fix: XML reports could fail with a TypeError if files had numeric components that were duplicates except for leading zeroes, like file1.py and file001.py. Fixes issue 1709.
The coverage annotate command used to announce that it would be removed in a future version. Enough people got in touch to say that they use it, so it will stay. Don't expect it to keep up with other new features though.
Added new debug options <cmd_run_debug>:
pytest writes the pytest test name into the debug output.
dataop2 writes the full data being added to CoverageData objects.
The coverage lcov command ignored the [report] exclude_lines and [report] exclude_also settings (issue 1684). This is now fixed, thanks Jacqueline Lee.
Sometimes SQLite will create journal files alongside the coverage.py database files. These are ephemeral, but could be mistakenly included when combining data files. Now they are always ignored, fixing issue 1605. Thanks to Brad Smith for suggesting fixes and providing detailed debugging.
On Python 3.12+, we now disable SQLite writing journal files, which should be a little faster.
The new 3.12 soft keyword type is properly bolded in HTML reports.
Removed the "fullcoverage" feature used by CPython to measure the coverage of early-imported standard library modules. CPython stopped using it in 2021, and it stopped working completely in Python 3.13.
In Python 3.12 and above, you can try an experimental core based on the new
:mod:sys.monitoring <python:sys.monitoring> module by defining a
COVERAGE_CORE=sysmon environment variable. This should be faster for
line coverage, but not for branch coverage, and plugins and dynamic contexts
are not yet supported with it. I am very interested to hear how it works (or
doesn't!) for you.
.. _changes_7-3-4:
Version 7.3.4 — 2023-12-20
Fix: the change for multi-line signature exclusions in 7.3.3 broke other
forms of nested clauses being excluded properly. This is now fixed, closing
issue 1713_.
Fix: in the HTML report, selecting code for copying won't select the line
numbers also. Thanks, Robert Harris <pull 1717_>_.
Fix: function definitions with multi-line signatures can now be excluded by
matching any of the lines, closing issue 684. Thanks, Jan Rusak, Maciej Kowalczyk and Joanna Ejzel <pull 1705_>.
Fix: XML reports could fail with a TypeError if files had numeric components
that were duplicates except for leading zeroes, like file1.py and
file001.py. Fixes issue 1709_.
The coverage annotate command used to announce that it would be removed
in a future version. Enough people got in touch to say that they use it, so
it will stay. Don't expect it to keep up with other new features though.
Added new :ref:debug options <cmd_run_debug>:
pytest writes the pytest test name into the debug output.
dataop2 writes the full data being added to CoverageData objects.
#11140: Fix non-string constants at the top of file being detected as docstrings on Python>=3.8.
#11572: Handle an edge case where sys.stderr{.interpreted-text role="data"} and sys.__stderr__{.interpreted-text role="data"} might already be closed when faulthandler{.interpreted-text role="ref"} is tearing down.
#11710: Fixed tracebacks from collection errors not getting pruned.
#7966: Removed unhelpful error message from assertion rewrite mechanism when exceptions are raised in __iter__ methods. Now they are treated un-iterable instead.
Improved Documentation
#11091: Updated documentation to refer to hyphenated options: replaced --junitxml with --junit-xml and --collectonly with --collect-only.
We’ve just uploaded mypy 1.8 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.
Type-checking Improvements
Do not intersect types in isinstance checks if at least one is final (Christoph Tyralla, PR 16330)
Detect that @final class without __bool__ cannot have falsey instances (Ilya Priven, PR 16566)
Do not allow TypedDict classes with extra keywords (Nikita Sobolev, PR 16438)
Do not allow class-level keywords for NamedTuple (Nikita Sobolev, PR 16526)
Make imprecise constraints handling more robust (Ivan Levkivskyi, PR 16502)
Fix strict-optional in extending generic TypedDict (Ivan Levkivskyi, PR 16398)
Allow type ignores of PEP 695 constructs (Shantanu, PR 16608)
Enable type_check_only support for TypedDict and NamedTuple (Nikita Sobolev, PR 16469)
Performance Improvements
Add fast path to analyzing special form assignments (Jukka Lehtosalo, PR 16561)
Improvements to Error Reporting
Don't show documentation links for plugin error codes (Ivan Levkivskyi, PR 16383)
Improve error messages for super checks and add more tests (Nikita Sobolev, PR 16393)
[orm] [usecase] Added preliminary support for Python 3.12 pep-695 type alias structures,
when resolving custom type maps for ORM Annotated Declarative mappings.
[orm] [bug] Fixed issue where when making use of the
_orm.relationship.post_update feature at the same time as using
a mapper version_id_col could lead to a situation where the second UPDATE
statement emitted by the post-update feature would fail to make use of the
correct version identifier, assuming an UPDATE was already emitted in that
flush which had already bumped the version counter.
[orm] [bug] Fixed issue where ORM Annotated Declarative would mis-interpret the left
hand side of a relationship without any collection specified as
uselist=True if the left type were given as a class and not a string,
without using future-style annotations.
[sql] [bug] Improved compilation of _sql.any_() / _sql.all_() in the
context of a negation of boolean comparison, will now render NOT (expr)
rather than reversing the equality operator to not equals, allowing
finer-grained control of negations for these non-typical operators.
[typing] [bug] Fixed regressions caused by typing added to the sqlalchemy.sql.functions
module in version 2.0.24, as part of #6810:
- Further enhancements to pep-484 typing to allow SQL functions from
`_sql.func` derived elements to work more effectively with ORM-mapped
attributes ([#10801](https://www.sqlalchemy.org/trac/ticket/10801))
Fixed the argument types passed to functions so that literal expressions
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-requirements group in /requirements with 6 updates:
7.3.1
7.4.0
7.4.3
7.4.4
1.7.1
1.8.0
3.5.0
3.6.0
2.0.23
2.0.25
4.11.4
4.12.0
Updates
coverage[toml]
from 7.3.1 to 7.4.0Release notes
Sourced from coverage[toml]'s releases.
Changelog
Sourced from coverage[toml]'s changelog.
... (truncated)
Commits
23a015c
docs: sample HTML for 7.4.04f020d4
docs: prep for 7.4.05bb88c3
build: temporarily disable metacov, it's flaky now with sysmon support3879b97
docs: mention sys.monitoring support9a84eeb
style: environment variable names should be monospace7882b8c
refactor: clean lint and mypy for sysmon et al5dad1a1
test: test which core we getb7e0c34
fix: don't default to sysmon yete5babcf
docs: explain the COVERAGE_*_CORE testing variablesebdc277
fix: usecore
more consistently thantracer
Updates
pytest
from 7.4.3 to 7.4.4Release notes
Sourced from pytest's releases.
Commits
33f694f
Prepare release version 7.4.476c107c
Merge pull request #11751 from bluetech/backport-11143-to-7.4.x531d76d
[7.4.x] Improve reporting from iter exceptions (#11749)a0f58fa
Merge pull request #11143 from tushar-deepsource/patch-1b1f3387
[7.4.x] #11091: documentation should use hypthonated properties (#11750)2cdd619
Merge pull request #11747 from pytest-dev/backport-11711-to-7.4.xd06c05b
[7.4.x] nodes: fix tracebacks from collection errors are not getting pruned5582bfc
[7.4.x] Improves clarity in Sphinx documentation for function signature. (#11...13024ef
[7.4.x] Fix for operation on closed file in faulthandler teardown (#11631)a40dacf
[7.4.x] XFAIL TestLocalPath.test_make_numbered_dir_multiprocess_safe (#11616)Updates
mypy
from 1.7.1 to 1.8.0Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
3b46750
remove +dev suffix from versionc9bc833
Fix tests broken by hatchling (#16655)60d30e3
Fix crash with type alias toCallable[[Unpack[Tuple[Any, ...]]], Any]
(#16541)f53f422
Allow type ignores of PEP 695 constructs (#16608)7c33e7c
@final
class without bool cannot have falsey instances (#16566)c224da5
Do not intersect types in isinstance checks if at least one is final (#16330)d54cc35
Change example in test cases with no stubs available (#16513)eb1ee97
Update hashes insync-typeshed.py
following recent typeshed sync (#16600)344298e
Revert use ofParamSpec
forfunctools.wraps
3e5d813
Revert typeshed ctypes changeUpdates
pre-commit
from 3.5.0 to 3.6.0Release notes
Sourced from pre-commit's releases.
Changelog
Sourced from pre-commit's changelog.
Commits
9c9983d
v3.6.07dc0a59
Merge pull request #3093 from pre-commit/removeprefixd3fa7f4
Merge pull request #3092 from pre-commit/minimum-version-first08478ec
python 3.9+: use removeprefix047439a
attempt minimum_pre_commit_version first when parsing configs23a2b73
Merge pull request #3079 from edgarrmondragon/deprecation-rmtree-onerrorcffabe5
Address deprecation warning inshutil.rmtree(onerror=...)
51df34e
Merge pull request #3078 from pre-commit/pre-commit-ci-update-confige36cefc
[pre-commit.ci] pre-commit autoupdate2280645
Merge pull request #3064 from pre-commit/pre-commit-ci-update-configUpdates
sqlalchemy
from 2.0.23 to 2.0.25Release notes
Sourced from sqlalchemy's releases.
... (truncated)
Commits
Updates
tox
from 4.11.4 to 4.12.0Release notes
Sourced from tox's releases.
Changelog
Sourced from tox's changelog.
Commits
776718c
release 4.12.0fc80080
Always pass FORCE_COLOR & NO_COLOR to the environment (#3172)659f714
Fix the CI (#3183)8406971
[pre-commit.ci] pre-commit autoupdate (#3182)3f8f53d
[pre-commit.ci] pre-commit autoupdate (#3177)61547b0
Fix 'open an issue' link in development.rst (#3179)328b348
[pre-commit.ci] pre-commit autoupdate (#3176)383845a
[pre-commit.ci] pre-commit autoupdate (#3166)d38c0e4
Bump actions/setup-python from 4 to 5 (#3167)dace6dd
Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.8.11 (#3164)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