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

Perfromance drop in 7.0.2 comparing to 7.0.1 #1527

Closed
detoyz opened this issue Jan 4, 2023 · 11 comments
Closed

Perfromance drop in 7.0.2 comparing to 7.0.1 #1527

detoyz opened this issue Jan 4, 2023 · 11 comments
Labels
bug Something isn't working fixed performance Something is too slow

Comments

@detoyz
Copy link

detoyz commented Jan 4, 2023

Describe the bug
Our test suite execution time drastically increased during update of coverage version from 7.0.1 to 7.0.2

On 7.0.1

================================= 1209 passed, 2 warnings, 106 subtests passed in 102.66s (0:01:42) =================================

On 7.0.2(3)

================================= 1209 passed, 2 warnings, 106 subtests passed in 447.32s (0:07:27) =================================

To Reproduce

Execution command

coverage run -m pytest

Pytest run headers (for python version, pytest plugins)

platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0
configfile: pyproject.toml, testpaths: tests
plugins: asyncio-0.20.3, subtests-0.9.0, mock-3.10.0, bdd-6.1.1, Faker-15.3.4, respx-0.20.1
asyncio: mode=Mode.AUTO

Project/test context

Project is typical fastapi/starlette + sqlalchemy, written in async/await paradigm. Most tests are typical calls to web api request and assert api response. Unfortunately cannot share source code itself, but let me know if more info needed, maybe will be able to make a "demo" mini-project.

Coverage config

[tool.coverage.run]
branch = true
concurrency = [
    "greenlet",  # for async sqlalchemy
]
command_line = "-m pytest -v"
dynamic_context = "test_function"
source_pkgs = [
    "src",
]

[tool.coverage.report]
skip_empty = true
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "if __name__ == .__main__."
]

[tool.coverage.html]
directory = "htmlcov"
show_contexts = true

Expected behavior
There probably shouldn't be such a huge performance drawback

Additional context
Initially I thought problem is connected to python3.11 and #1287, but after downgrading first to 6.X, performance degradation was gone. Than started to upgrade version by version, until had performance issue again.

I feel that problem can be connected to refactoring made in 7.0.2, as mentioned here:

Refactor: added many type annotations, including a number of refactorings. This should not affect outward behavior, but they were a bit invasive in some places, so keep your eyes peeled for oddities.

@detoyz detoyz added bug Something isn't working needs triage labels Jan 4, 2023
@nedbat
Copy link
Owner

nedbat commented Jan 4, 2023

The changes between 7.0.1 and 7.0.2 are very minimal, other than adding type annotations. Can you check that you have the C tracer installed with 7.0.2? The most likely cause of the slow down is using the Python tracer instead. The best information would be from adding this command to your CI: python -m coverage debug sys.

@nedbat nedbat added performance Something is too slow and removed needs triage labels Jan 4, 2023
@nedbat
Copy link
Owner

nedbat commented Jan 4, 2023

My bad, it could be the changes between 7.0.1 and 7.0.2, but check the "debug sys" output before we go further.

@detoyz
Copy link
Author

detoyz commented Jan 4, 2023

Output for 7.0.3

-- sys -------------------------------------------------------
               coverage_version: 7.0.3
                coverage_module: <project_root>/.venv/lib/python3.11/site-packages/coverage/__init__.py
                         tracer: -none-
                        CTracer: available
           plugins.file_tracers: -none-
            plugins.configurers: -none-
      plugins.context_switchers: -none-
              configs_attempted: .coveragerc
                                 setup.cfg
                                 tox.ini
                                 pyproject.toml
                   configs_read: <project_root>/pyproject.toml
                    config_file: <project_root>/pyproject.toml
                config_contents: b'...coverage sections presented in ticket description...'
                      data_file: -none-
                         python: 3.11.1 (main, Dec 23 2022, 11:47:36) [GCC 12.2.0]
                       platform: Linux-5.19.0-26-generic-x86_64-with-glibc2.36
                 implementation: CPython
                     executable: <project_root>/.venv/bin/python3
                   def_encoding: utf-8
                    fs_encoding: utf-8
                            pid: 182078
                            cwd: <project_root>
                           path: <project_root>
                                 /usr/local/lib/python311.zip
                                 /usr/local/lib/python3.11
                                 /usr/local/lib/python3.11/lib-dynload
                                 <project_root>/.venv/lib/python3.11/site-packages
                    environment: HOME = ***
                   command_line: <project_root>/.venv/lib/python3.11/site-packages/coverage/__main__.py debug sys
         sqlite3_sqlite_version: 3.39.3
             sqlite3_temp_store: 0
        sqlite3_compile_options: ATOMIC_INTRINSICS=1, COMPILER=gcc-12.2.0, DEFAULT_AUTOVACUUM,
                                 DEFAULT_CACHE_SIZE=-2000, DEFAULT_FILE_FORMAT=4,
                                 DEFAULT_JOURNAL_SIZE_LIMIT=-1, DEFAULT_MMAP_SIZE=0, DEFAULT_PAGE_SIZE=4096,
                                 DEFAULT_PCACHE_INITSZ=20, DEFAULT_RECURSIVE_TRIGGERS,
                                 DEFAULT_SECTOR_SIZE=4096, DEFAULT_SYNCHRONOUS=2,
                                 DEFAULT_WAL_AUTOCHECKPOINT=1000, DEFAULT_WAL_SYNCHRONOUS=2,
                                 DEFAULT_WORKER_THREADS=0, ENABLE_COLUMN_METADATA, ENABLE_DBSTAT_VTAB,
                                 ENABLE_FTS3, ENABLE_FTS3_PARENTHESIS, ENABLE_FTS3_TOKENIZER, ENABLE_FTS4,
                                 ENABLE_FTS5, ENABLE_LOAD_EXTENSION, ENABLE_MATH_FUNCTIONS,
                                 ENABLE_PREUPDATE_HOOK, ENABLE_RTREE, ENABLE_SESSION, ENABLE_STMTVTAB,
                                 ENABLE_UNLOCK_NOTIFY, ENABLE_UPDATE_DELETE_LIMIT, HAVE_ISNAN,
                                 LIKE_DOESNT_MATCH_BLOBS, MALLOC_SOFT_LIMIT=1024, MAX_ATTACHED=10,
                                 MAX_COLUMN=2000, MAX_COMPOUND_SELECT=500, MAX_DEFAULT_PAGE_SIZE=32768,
                                 MAX_EXPR_DEPTH=1000, MAX_FUNCTION_ARG=127, MAX_LENGTH=1000000000,
                                 MAX_LIKE_PATTERN_LENGTH=50000, MAX_MMAP_SIZE=0x7fff0000,
                                 MAX_PAGE_COUNT=1073741823, MAX_PAGE_SIZE=65536, MAX_SCHEMA_RETRY=25,
                                 MAX_SQL_LENGTH=1000000000, MAX_TRIGGER_DEPTH=1000,
                                 MAX_VARIABLE_NUMBER=250000, MAX_VDBE_OP=250000000, MAX_WORKER_THREADS=8,
                                 MUTEX_PTHREADS, OMIT_LOOKASIDE, SECURE_DELETE, SOUNDEX, SYSTEM_MALLOC,
                                 TEMP_STORE=1, THREADSAFE=1, USE_URI

Output for 7.0.1 produces same lines for CTracer:

-- sys -------------------------------------------------------
               coverage_version: 7.0.1
                coverage_module: <project_root>/.venv/lib/python3.11/site-packages/coverage/__init__.py
                         tracer: -none-
                        CTracer: available
           plugins.file_tracers: -none-
            plugins.configurers: -none-
      plugins.context_switchers: -none-
...

@nedbat
Copy link
Owner

nedbat commented Jan 4, 2023

Maybe it's the dynamic_context = "test_function" setting. I see a slight slowdown in 7.0.2 for that setting (18% slower, 93sec vs 79sec), but that is much different than the 4x slowdown that you are seeing.

Can you try running without that setting to see the time difference?

@detoyz
Copy link
Author

detoyz commented Jan 4, 2023

Maybe it's the dynamic_context = "test_function" setting.

Yep, you're right. By removing dynamic_context = "test_function" execution time on 7.0.3 is even faster than on 7.0.1 with it enabled.

7.0.1 with dynamic_context = "test_function"

=========================================== 1213 passed, 2 warnings, 117 subtests passed in 205.85s (0:03:25) ============================================

7.0.3 with dynamic_context = "test_function"

=========================================== 1213 passed, 2 warnings, 117 subtests passed in 605.46s (0:10:05) ============================================

7.0.3 without dynamic_context

=========================================== 1213 passed, 2 warnings, 117 subtests passed in 123.15s (0:02:03) ============================================

(Note: I use different machine now to run suite, so results are not same as in description, but % of performance drops are about ~the same)

@detoyz
Copy link
Author

detoyz commented Jan 5, 2023

@nedbat just FYI, we removed dynamic_context from CI, so for us issue can be considered as "resolved". Feel free to decide whether you want to investigate further & if needed update/close issue. I'll also be open to help you with further investigation if needed.

P.S. Thank you for amazing work you put in for this project. I truly enjoy using it and it made my life as a professional software engineer so much easier and happier 🎉

@nedbat
Copy link
Owner

nedbat commented Jan 5, 2023

My own testing seems to confirm that dynamic_context = "test_function" is typically about 20% slower with 7.0.2 than with 7.0.1. Can you say anything about what is unusual in your test suite that might give a clue about the extreme slow-down you saw? Another thing I see is "subtests", which I have never used. Can you give us a sneak peek at how you are using them?

@detoyz
Copy link
Author

detoyz commented Jan 6, 2023

Sure!

subtests is a plugin for pytsest to basically have several asserts in one test that are considered as "sub-tests"

Example of our test using it

@pytest.mark.asyncio
async def test_validation_errors_rendered(
    self, api, subtests
):
    resp = await api.post(
        ...
    )

    assert resp.status == falcon.HTTP_422

    with subtests.test("expect title length error"):
        assert "at most 120 characters" in resp.text

    with subtests.test("expect url error"):
        assert "invalid or missing URL scheme" in resp.text

Regarding our test suite, as I mentioned in description, it's a typical web-api tests with only exception maybe that we utilizing all async-way (async web server, async db drivers, async redis, async httpx, etc)

Let me try to test more with/without dynamic context individual tests and came back to you, because I want to trim down what could lead 4x slowdown.

@detoyz
Copy link
Author

detoyz commented Jan 6, 2023

@nedbat I could reproduce issue on a small demo project, that I published here -> https://github.com/detoyz/coverage_perf_702
All basic fixtures and setup I tried to mimic our own setup. Feel free to pull it out and try it yourself.

7.0.3 with dynamic_context = "test_function"

===== 50 passed in 7.81s ====

7.0.3 without dynamic_context = "test_function"

==== 50 passed in 2.81s ====

Potential cause of slowdown

As it seems to me, each SQLAlchemy awaitable (that internally by sqlalchemy opens a greenlet as far as I know) call in the code that is tested/executed - slows down execution under dynamic_context=true

So by increasing amount of calls here:

for x in range(50): 
    await conn.execute(
        sa.insert(Event).values({"name": f"some name {x}"})
    )

I could reproduce 3-4x slowdown.

So maybe it's something with related greenlet concurrency option? But my knowledge here is limited 😅

@nedbat
Copy link
Owner

nedbat commented Jan 7, 2023

Thanks for the test repo, I was able to use it with git bisect to find the problem. It was much more boring that any of us thought! It's fixed in commit b3b05bd.

         plugin._coverage_enabled = False
         disposition.trace = False

-    @functools.lru_cache(maxsize=0)
+    @functools.lru_cache(maxsize=None)
     def cached_mapped_file(self, filename: str) -> str:
         """A locally cached version of file names mapped through file_mapper."""
         return self.file_mapper(filename)

@nedbat
Copy link
Owner

nedbat commented Jan 7, 2023

This is now released as part of coverage 7.0.4.

RobertCraigie referenced this issue in RobertCraigie/prisma-client-py Feb 1, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [coverage](https://togithub.com/nedbat/coveragepy) | `==6.5.0` ->
`==7.1.0` |
[![age](https://badges.renovateapi.com/packages/pypi/coverage/7.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/coverage/7.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/coverage/7.1.0/compatibility-slim/6.5.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/coverage/7.1.0/confidence-slim/6.5.0)](https://docs.renovatebot.com/merge-confidence/)
|
| [mkdocs-material](https://togithub.com/squidfunk/mkdocs-material) |
`==8.5.11` -> `==9.0.9` |
[![age](https://badges.renovateapi.com/packages/pypi/mkdocs-material/9.0.9/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/mkdocs-material/9.0.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/mkdocs-material/9.0.9/compatibility-slim/8.5.11)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/mkdocs-material/9.0.9/confidence-slim/8.5.11)](https://docs.renovatebot.com/merge-confidence/)
|
| [mock](http://mock.readthedocs.org/en/latest/)
([source](https://togithub.com/testing-cabal/mock)) | `==4.0.3` ->
`==5.0.1` |
[![age](https://badges.renovateapi.com/packages/pypi/mock/5.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/mock/5.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/mock/5.0.1/compatibility-slim/4.0.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/mock/5.0.1/confidence-slim/4.0.3)](https://docs.renovatebot.com/merge-confidence/)
|
| [pre-commit](https://togithub.com/pre-commit/pre-commit) | `==2.21.0`
-> `==3.0.2` |
[![age](https://badges.renovateapi.com/packages/pypi/pre-commit/3.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/pre-commit/3.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/pre-commit/3.0.2/compatibility-slim/2.21.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/pre-commit/3.0.2/confidence-slim/2.21.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>nedbat/coveragepy</summary>

###
[`v7.1.0`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-710--2023-01-24)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.5...7.1.0)

- Added: the debug output file can now be specified with `[run]
debug_file`
    in the configuration file.  Closes `issue 1319`\_.

- Performance: fixed a slowdown with dynamic contexts that's been around
since
6.4.3. The fix closes `issue 1538`*. Thankfully this doesn't break the
`Cython change`* that fixed `issue 972`\_. Thanks to Mathieu Kniewallner
for
    the deep investigative work and comprehensive issue report.

-   Typing: all product and test code has type annotations.

.. \_Cython
change:[https://github.com/nedbat/coveragepy/pull/1347](https://togithub.com/nedbat/coveragepy/pull/1347)7
.. \_issue
972[https://github.com/nedbat/coveragepy/issues/972](https://togithub.com/nedbat/coveragepy/issues/972)72
.. \_issue
131[https://github.com/nedbat/coveragepy/issues/1319](https://togithub.com/nedbat/coveragepy/issues/1319)319
.. \_issue
15[https://github.com/nedbat/coveragepy/issues/1538](https://togithub.com/nedbat/coveragepy/issues/1538)1538

.. \_changes\_7-0-5:

###
[`v7.0.5`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-705--2023-01-10)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.4...7.0.5)

- Fix: On Python 3.7, a file with type annotations but no `from
__future__
import annotations` would be missing statements in the coverage report.
This
    is now fixed, closing `issue 1524`\_.

.. \_issue
1524:[https://github.com/nedbat/coveragepy/issues/1524](https://togithub.com/nedbat/coveragepy/issues/1524)4

.. \_changes\_7-0-4:

###
[`v7.0.4`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-704--2023-01-07)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.3...7.0.4)

- Performance: an internal cache of file names was accidentally
disabled,
resulting in sometimes drastic reductions in performance. This is now
fixed,
closing `issue 1527`\_. Thanks to Ivan Ciuvalschii for the reproducible
test
    case.

.. \_issue
1527:[https://github.com/nedbat/coveragepy/issues/1527](https://togithub.com/nedbat/coveragepy/issues/1527)7

.. \_changes\_7-0-3:

###
[`v7.0.3`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-703--2023-01-03)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.2...7.0.3)

- Fix: when using pytest-cov or pytest-xdist, or perhaps both, the
combining
step could fail with `assert row is not None` using 7.0.2. This was due
to
a race condition that has always been possible and is still possible. In
7.0.1 and before, the error was silently swallowed by the combining
code.
Now it will produce a message "Couldn't combine data file" and ignore
the
    data file as it used to do before 7.0.2.  Closes `issue 1522`\_.

.. \_issue
1522:[https://github.com/nedbat/coveragepy/issues/1522](https://togithub.com/nedbat/coveragepy/issues/1522)2

.. \_changes\_7-0-2:

###
[`v7.0.2`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-702--2023-01-02)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.1...7.0.2)

- Fix: when using the `[run] relative_files = True` setting, a relative
    `[paths]` pattern was still being made absolute.  This is now fixed,
    closing `issue 1519`\_.

- Fix: if Python doesn't provide tomllib, then TOML configuration files
can
    only be read if coverage.py is installed with the `[toml]` extra.
Coverage.py will raise an error if TOML support is not installed when it
sees
    your settings are in a .toml file. But it didn't understand that
`[tools.coverage]` was a valid section header, so the error wasn't
reported
if you used that header, and settings were silently ignored. This is now
    fixed, closing `issue 1516`\_.

- Fix: adjusted how decorators are traced on PyPy 7.3.10, fixing `issue
1515`\_.

-   Fix: the `coverage lcov` report did not properly implement the
    `--fail-under=MIN` option.  This has been fixed.

- Refactor: added many type annotations, including a number of
refactorings.
This should not affect outward behavior, but they were a bit invasive in
some
    places, so keep your eyes peeled for oddities.

- Refactor: removed the vestigial and long untested support for Jython
and
    IronPython.

.. \_issue
1515:[https://github.com/nedbat/coveragepy/issues/1515](https://togithub.com/nedbat/coveragepy/issues/1515)5
.. \_issue
1516[https://github.com/nedbat/coveragepy/issues/1516](https://togithub.com/nedbat/coveragepy/issues/1516)16
.. \_issue
151[https://github.com/nedbat/coveragepy/issues/1519](https://togithub.com/nedbat/coveragepy/issues/1519)519

.. \_changes\_7-0-1:

###
[`v7.0.1`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-701--2022-12-23)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.0...7.0.1)

- When checking if a file mapping resolved to a file that exists, we
weren't
considering files in .whl files. This is now fixed, closing `issue
1511`\_.

- File pattern rules were too strict, forbidding plus signs and curly
braces in
directory and file names. This is now fixed, closing `issue 1513`\_.

-   Unusual Unicode or control characters in source files could prevent
    reporting.  This is now fixed, closing `issue 1512`\_.

- The PyPy wheel now installs on PyPy 3.7, 3.8, and 3.9, closing `issue
1510`\_.

.. \_issue
1510:[https://github.com/nedbat/coveragepy/issues/1510](https://togithub.com/nedbat/coveragepy/issues/1510)0
.. \_issue
1511[https://github.com/nedbat/coveragepy/issues/1511](https://togithub.com/nedbat/coveragepy/issues/1511)11
.. \_issue
151[https://github.com/nedbat/coveragepy/issues/1512](https://togithub.com/nedbat/coveragepy/issues/1512)512
.. \_issue
15[https://github.com/nedbat/coveragepy/issues/1513](https://togithub.com/nedbat/coveragepy/issues/1513)1513

.. \_changes\_7-0-0:

###
[`v7.0.0`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-700--2022-12-18)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/6.5.0...7.0.0)

Nothing new beyond 7.0.0b1.

.. \_changes\_7-0-0b1:

</details>

<details>
<summary>squidfunk/mkdocs-material</summary>

###
[`v9.0.9`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.9):
mkdocs-material-9.0.9

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.0.8...9.0.9)

-   Updated Bulgarian translations
-   Updated Chinese (Simplified) translations
-   Updated Dutch translations
-   Updated Hindi translations
-   Updated Japanese translations
-   Updated Polish translations

###
[`v9.0.8`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.8):
mkdocs-material-9.0.8

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.0.7...9.0.8)

-   Updated Croatian translations
-   Updated French translations
-   Updated Hungarian translations
-   Updated Portuguese (Brasilian) translations
-   Updated Spanish translations
-   Updated Ukrainian translations
-   Updated Urdu translations
-   Updated Vietnamese translations

###
[`v9.0.7`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.7):
mkdocs-material-9.0.7

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.0.6...9.0.7)

-   Improved accessibility of sidebar navigation
-   Moved all translations into community edition
-   Updated Polish and Portuguese (Brasilian) translations
-   Fixed info plugin terminating on subsequent reload when serving
- Fixed
[#&#8203;4910](https://togithub.com/squidfunk/mkdocs-material/issues/4910):
Sidebar navigation labels have invalid ARIA roles
- Fixed
[#&#8203;4884](https://togithub.com/squidfunk/mkdocs-material/issues/4884):
Search query terms can't be separated by colons

###
[`v9.0.6`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.6):
mkdocs-material-9.0.6

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.0.5...9.0.6)

- Fixed
[#&#8203;4883](https://togithub.com/squidfunk/mkdocs-material/issues/4883):
Automatically disable info plugin when serving
- Fixed
[#&#8203;4885](https://togithub.com/squidfunk/mkdocs-material/issues/4885):
Search plugin crashes in some exotic cases (9.0.3 regression)

###
[`v9.0.5`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.5):
mkdocs-material-9.0.5

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.0.4...9.0.5)

- Fixed
[#&#8203;4842](https://togithub.com/squidfunk/mkdocs-material/issues/4842):
Improved accessibility of search result list

###
[`v9.0.4`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.4):
mkdocs-material-9.0.4

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.0.3...9.0.4)

- Fixed
[#&#8203;4823](https://togithub.com/squidfunk/mkdocs-material/issues/4823):
Improved contrast ratio in footer (9.0.2 regression)
- Fixed
[#&#8203;4832](https://togithub.com/squidfunk/mkdocs-material/issues/4832):
Set navigation items back to black (9.0.3 regression)
- Fixed
[#&#8203;4843](https://togithub.com/squidfunk/mkdocs-material/issues/4843):
Emojis broken due to `maxcdn.com` shutting down
-   Upgraded Python Markdown Extensions to 9.9.1

###
[`v9.0.3`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.3):
mkdocs-material-9.0.3

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.0.2...9.0.3)

-   Improved discernability of section index pages in navigation
-   Improved collapsing of adjacent whitespace in search plugin
-   Updated Indonesian translations
-   Fixed view source of this page button when edit URL points to blob
- Fixed
[#&#8203;4829](https://togithub.com/squidfunk/mkdocs-material/issues/4829):
Search overlay does not close for active anchor result
- Fixed
[#&#8203;4824](https://togithub.com/squidfunk/mkdocs-material/issues/4824):
Search plugin crashes for `h[1-6]` contained in other elements
- Fixed
[#&#8203;4804](https://togithub.com/squidfunk/mkdocs-material/issues/4804):
Nested navigation items not expandable with keyboard
- Fixed
[#&#8203;4689](https://togithub.com/squidfunk/mkdocs-material/issues/4689):
anchor tracking not working for anchors in tables
-   Upgraded to Mermaid 9.3.0

###
[`v9.0.2`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.2):
mkdocs-material-9.0.2

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.0.1...9.0.2)

- Fixed
[#&#8203;4823](https://togithub.com/squidfunk/mkdocs-material/issues/4823):
Improved contrast ratio in footer to meet WCAG guidelines
- Fixed
[#&#8203;4819](https://togithub.com/squidfunk/mkdocs-material/issues/4819):
Social plugin crashes when card generation is disabled
- Fixed
[#&#8203;4817](https://togithub.com/squidfunk/mkdocs-material/issues/4817):
Search plugin crashes on numeric page titles in `nav`

###
[`v9.0.1`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.1):
mkdocs-material-9.0.1

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.0.0...9.0.1)

-   Removed `pipdeptree` dependency for built-in info plugin
-   Fixed appearance of linked tags when hovered (9.0.0 regression)
- Fixed
[#&#8203;4810](https://togithub.com/squidfunk/mkdocs-material/issues/4810):
Abbreviations run out of screen on touch devices
- Fixed
[#&#8203;4813](https://togithub.com/squidfunk/mkdocs-material/issues/4813):
View source and edit button links are the same

###
[`v9.0.0`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.0.0):
mkdocs-material-9.0.0

[Compare
Source](https://togithub.com/squidfunk/mkdocs-material/compare/8.5.11...9.0.0)

**Additions and improvements**

-   Added support for rich search previews
-   Added support for tokenizer lookahead
-   Added support for better search highlighting
-   Added support for excluding content from search
-   Added support for configurable search pipeline
-   Added support for offline search via offline plugin
-   Added support for multiple instances of built-in tags plugin
-   Added support for removing copy-to-clipboard button
-   Added support for removing footer navigation
-   Added support for button to view the source of a page
-   Improved readability of query string for search sharing
-   Improved stability of search plugin when using `--dirtyreload`
-   Improved search result group button, now sticky and stable
-   Updated Norwegian translations
-   Updated MkDocs to 1.4.2

**Removals**

-   Removed deprecated alternative admonition qualifiers
-   Removed `:is()` selectors (in output) for easier overriding
-   Removed `.title` suffix on translations
-   Removed legacy method for providing page title in feedback URL
-   Removed support for indexing only titles in search
-   Removed support for custom search transforms
-   Removed support for custom search workers
-   Removed temporary snow feature (easter egg)

**Fixes**

-   Fixed Norwegian and Korean language code
-   Fixed detection of composition events in search interface
-   Fixed search plugin not using title set via front matter
-   Fixed search highlighting of tags
-   Fixed search sharing URL using post transformed string
-   Fixed theme-color meta tag getting out-of-sync with palette toggle
-   Fixed prev/next page keyboard navigation when footer is not present
-   Fixed overflowing navigation tabs not being scrollable
-   Fixed inclusion of code block line numbers from search

</details>

<details>
<summary>testing-cabal/mock</summary>

###
[`v5.0.1`](https://togithub.com/testing-cabal/mock/blob/HEAD/CHANGELOG.rst#&#8203;501)

[Compare
Source](https://togithub.com/testing-cabal/mock/compare/5.0.0...5.0.1)

- [gh-100740](https://togithub.com/testing-cabal/mock/issues/100740):
Fix `unittest.mock.Mock` not respecting the spec for
    attribute names prefixed with `assert`.

- [gh-100690](https://togithub.com/testing-cabal/mock/issues/100690):
`Mock` objects which are not unsafe will now raise an
`AttributeError` when accessing an attribute that matches the name of an
    assertion but without the prefix `assert_`, e.g. accessing
`called_once` instead of `assert_called_once`. This is in addition to
this already happening for accessing attributes with prefixes `assert`,
    `assret`, `asert`, `aseert`, and `assrt`.

- [gh-96127](https://togithub.com/testing-cabal/mock/issues/96127):
`inspect.signature` was raising `TypeError` on call with
mock objects. Now it correctly returns `(*args, **kwargs)` as infered
    signature.

###
[`v5.0.0`](https://togithub.com/testing-cabal/mock/blob/HEAD/CHANGELOG.rst#&#8203;500)

[Compare
Source](https://togithub.com/testing-cabal/mock/compare/4.0.3...5.0.0)

- [gh-98624](https://togithub.com/testing-cabal/mock/issues/98624): Add
a mutex to unittest.mock.NonCallableMock to protect
    concurrent access to mock attributes.

- bpo-43478: Mocks can no longer be used as the specs for other Mocks.
As a
result, an already-mocked object cannot have an attribute mocked using
`autospec=True` or be the subject of a `create_autospec(...)` call. This
can uncover bugs in tests since these Mock-derived Mocks will always
pass
    certain tests (e.g. isinstance) and builtin assert functions (e.g.
    assert_called_once_with) will unconditionally pass.

- bpo-45156: Fixes infinite loop on :func:`unittest.mock.seal` of mocks
    created by :func:`~unittest.create_autospec`.

-   bpo-41403: Make :meth:`mock.patch` raise a :exc:`TypeError` with a
relevant error message on invalid arg. Previously it allowed a cryptic
    :exc:`AttributeError` to escape.

- [gh-91803](https://togithub.com/testing-cabal/mock/issues/91803): Fix
an error when using a method of objects mocked with
    :func:`unittest.mock.create_autospec` after it was sealed with
    :func:`unittest.mock.seal` function.

- bpo-41877: AttributeError for suspected misspellings of assertions on
mocks are now pointing out that the cause are misspelled assertions and
also what to do if the misspelling is actually an intended attribute
name.
The unittest.mock document is also updated to reflect the current set of
    recognised misspellings.

- bpo-43478: Mocks can no longer be provided as the specs for other
Mocks.
As a result, an already-mocked object cannot be passed to `mock.Mock()`.
This can uncover bugs in tests since these Mock-derived Mocks will
always
pass certain tests (e.g. isinstance) and builtin assert functions (e.g.
    assert_called_once_with) will unconditionally pass.

-   bpo-45010: Remove support of special method `__div__` in
    :mod:`unittest.mock`. It is not used in Python 3.

- [gh-84753](https://togithub.com/testing-cabal/mock/issues/84753):
:func:`inspect.iscoroutinefunction` now properly returns
`True` when an instance of :class:`unittest.mock.AsyncMock` is passed to
    it.  This makes it consistent with behavior of
    :func:`asyncio.iscoroutinefunction`.  Patch by Mehdi ABAAKOUK.

-   bpo-46852: Remove the undocumented private `float.__set_format__()`
method, previously known as `float.__setformat__()` in Python 3.7. Its
docstring said: "You probably don't want to use this function. It exists
    mainly to be used in Python's test suite." Patch by Victor Stinner.

- [gh-98086](https://togithub.com/testing-cabal/mock/issues/98086): Make
sure `patch.dict()` can be applied on async functions.

- [gh-100287](https://togithub.com/testing-cabal/mock/issues/100287):
Fix the interaction of :func:`unittest.mock.seal` with
    :class:`unittest.mock.AsyncMock`.

- [gh-83076](https://togithub.com/testing-cabal/mock/issues/83076):
Instantiation of `Mock()` and `AsyncMock()` is now 3.8x
    faster.

- bpo-41877: A check is added against misspellings of autospect,
auto_spec
    and set_spec being passed as arguments to patch, patch.object and
    create_autospec.

</details>

<details>
<summary>pre-commit/pre-commit</summary>

###
[`v3.0.2`](https://togithub.com/pre-commit/pre-commit/blob/HEAD/CHANGELOG.md#&#8203;302---2023-01-29)

[Compare
Source](https://togithub.com/pre-commit/pre-commit/compare/v3.0.1...v3.0.2)

\==================

##### Fixes

-   Prevent local `Gemfile` from interfering with hook execution.
- [#&#8203;2727](https://togithub.com/pre-commit/pre-commit/issues/2727)
PR by [@&#8203;asottile](https://togithub.com/asottile).
-   Fix `language: r`, `repo: local` hooks
-
[pre-commit-ci/issues#&#8203;107](https://togithub.com/pre-commit-ci/issues/issues/107)
by [@&#8203;lorenzwalthert](https://togithub.com/lorenzwalthert).
- [#&#8203;2728](https://togithub.com/pre-commit/pre-commit/issues/2728)
PR by [@&#8203;asottile](https://togithub.com/asottile).

###
[`v3.0.1`](https://togithub.com/pre-commit/pre-commit/blob/HEAD/CHANGELOG.md#&#8203;301---2023-01-26)

[Compare
Source](https://togithub.com/pre-commit/pre-commit/compare/v3.0.0...v3.0.1)

\==================

##### Fixes

-   Ensure coursier hooks are available offline after install.
- [#&#8203;2723](https://togithub.com/pre-commit/pre-commit/issues/2723)
PR by [@&#8203;asottile](https://togithub.com/asottile).

###
[`v3.0.0`](https://togithub.com/pre-commit/pre-commit/blob/HEAD/CHANGELOG.md#&#8203;300---2023-01-23)

[Compare
Source](https://togithub.com/pre-commit/pre-commit/compare/v2.21.0...v3.0.0)

\==================

##### Features

-   Make `language: golang` bootstrap `go` if not present.
- [#&#8203;2651](https://togithub.com/pre-commit/pre-commit/issues/2651)
PR by [@&#8203;taoufik07](https://togithub.com/taoufik07).
- [#&#8203;2649](https://togithub.com/pre-commit/pre-commit/issues/2649)
issue by [@&#8203;taoufik07](https://togithub.com/taoufik07).
- `language: coursier` now supports `additional_dependencies` and `repo:
local`
- [#&#8203;2702](https://togithub.com/pre-commit/pre-commit/issues/2702)
PR by [@&#8203;asottile](https://togithub.com/asottile).
-   Upgrade `ruby-build` to `20221225`.
- [#&#8203;2718](https://togithub.com/pre-commit/pre-commit/issues/2718)
PR by [@&#8203;jalessio](https://togithub.com/jalessio).

##### Fixes

-   Improve error message for invalid yaml for `pre-commit autoupdate`.
- [#&#8203;2686](https://togithub.com/pre-commit/pre-commit/issues/2686)
PR by [@&#8203;asottile](https://togithub.com/asottile).
- [#&#8203;2685](https://togithub.com/pre-commit/pre-commit/issues/2685)
issue by
[@&#8203;CarstenGrohmann](https://togithub.com/CarstenGrohmann).
-   `repo: local` no longer provisions an empty `git` repo.
- [#&#8203;2699](https://togithub.com/pre-commit/pre-commit/issues/2699)
PR by [@&#8203;asottile](https://togithub.com/asottile).

##### Updating

-   Drop support for python<3.8
- [#&#8203;2655](https://togithub.com/pre-commit/pre-commit/issues/2655)
PR by [@&#8203;asottile](https://togithub.com/asottile).
- Drop support for top-level list, use `pre-commit migrate-config` to
update.
- [#&#8203;2656](https://togithub.com/pre-commit/pre-commit/issues/2656)
PR by [@&#8203;asottile](https://togithub.com/asottile).
- Drop support for `sha` to specify revision, use `pre-commit
migrate-config`
    to update.
- [#&#8203;2657](https://togithub.com/pre-commit/pre-commit/issues/2657)
PR by [@&#8203;asottile](https://togithub.com/asottile).
- Remove `pre-commit-validate-config` and
`pre-commit-validate-manifest`, use
`pre-commit validate-config` and `pre-commit validate-manifest` instead.
- [#&#8203;2658](https://togithub.com/pre-commit/pre-commit/issues/2658)
PR by [@&#8203;asottile](https://togithub.com/asottile).
-   `language: golang` hooks must use `go.mod` to specify dependencies
- [#&#8203;2672](https://togithub.com/pre-commit/pre-commit/issues/2672)
PR by [@&#8203;taoufik07](https://togithub.com/taoufik07).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/RobertCraigie/prisma-client-py).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC42Mi4xIiwidXBkYXRlZEluVmVyIjoiMzQuMTE5LjAifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Craigie <robert@craigie.dev>
allenporter referenced this issue in allenporter/flux-local Feb 6, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [coverage](https://togithub.com/nedbat/coveragepy) | `==6.4.2` ->
`==7.1.0` |
[![age](https://badges.renovateapi.com/packages/pypi/coverage/7.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/coverage/7.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/coverage/7.1.0/compatibility-slim/6.4.2)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/coverage/7.1.0/confidence-slim/6.4.2)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>nedbat/coveragepy</summary>

###
[`v7.1.0`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-710--2023-01-24)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.5...7.1.0)

- Added: the debug output file can now be specified with `[run]
debug_file`
    in the configuration file.  Closes `issue 1319`\_.

- Performance: fixed a slowdown with dynamic contexts that's been around
since
6.4.3. The fix closes `issue 1538`*. Thankfully this doesn't break the
`Cython change`* that fixed `issue 972`\_. Thanks to Mathieu Kniewallner
for
    the deep investigative work and comprehensive issue report.

-   Typing: all product and test code has type annotations.

.. \_Cython
change:[https://github.com/nedbat/coveragepy/pull/1347](https://togithub.com/nedbat/coveragepy/pull/1347)7
.. \_issue
972[https://github.com/nedbat/coveragepy/issues/972](https://togithub.com/nedbat/coveragepy/issues/972)72
.. \_issue
131[https://github.com/nedbat/coveragepy/issues/1319](https://togithub.com/nedbat/coveragepy/issues/1319)319
.. \_issue
15[https://github.com/nedbat/coveragepy/issues/1538](https://togithub.com/nedbat/coveragepy/issues/1538)1538

.. \_changes\_7-0-5:

###
[`v7.0.5`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-705--2023-01-10)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.4...7.0.5)

- Fix: On Python 3.7, a file with type annotations but no `from
__future__
import annotations` would be missing statements in the coverage report.
This
    is now fixed, closing `issue 1524`\_.

.. \_issue
1524:[https://github.com/nedbat/coveragepy/issues/1524](https://togithub.com/nedbat/coveragepy/issues/1524)4

.. \_changes\_7-0-4:

###
[`v7.0.4`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-704--2023-01-07)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.3...7.0.4)

- Performance: an internal cache of file names was accidentally
disabled,
resulting in sometimes drastic reductions in performance. This is now
fixed,
closing `issue 1527`\_. Thanks to Ivan Ciuvalschii for the reproducible
test
    case.

.. \_issue
1527:[https://github.com/nedbat/coveragepy/issues/1527](https://togithub.com/nedbat/coveragepy/issues/1527)7

.. \_changes\_7-0-3:

###
[`v7.0.3`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-703--2023-01-03)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.2...7.0.3)

- Fix: when using pytest-cov or pytest-xdist, or perhaps both, the
combining
step could fail with `assert row is not None` using 7.0.2. This was due
to
a race condition that has always been possible and is still possible. In
7.0.1 and before, the error was silently swallowed by the combining
code.
Now it will produce a message "Couldn't combine data file" and ignore
the
    data file as it used to do before 7.0.2.  Closes `issue 1522`\_.

.. \_issue
1522:[https://github.com/nedbat/coveragepy/issues/1522](https://togithub.com/nedbat/coveragepy/issues/1522)2

.. \_changes\_7-0-2:

###
[`v7.0.2`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-702--2023-01-02)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.1...7.0.2)

- Fix: when using the `[run] relative_files = True` setting, a relative
    `[paths]` pattern was still being made absolute.  This is now fixed,
    closing `issue 1519`\_.

- Fix: if Python doesn't provide tomllib, then TOML configuration files
can
    only be read if coverage.py is installed with the `[toml]` extra.
Coverage.py will raise an error if TOML support is not installed when it
sees
    your settings are in a .toml file. But it didn't understand that
`[tools.coverage]` was a valid section header, so the error wasn't
reported
if you used that header, and settings were silently ignored. This is now
    fixed, closing `issue 1516`\_.

- Fix: adjusted how decorators are traced on PyPy 7.3.10, fixing `issue
1515`\_.

-   Fix: the `coverage lcov` report did not properly implement the
    `--fail-under=MIN` option.  This has been fixed.

- Refactor: added many type annotations, including a number of
refactorings.
This should not affect outward behavior, but they were a bit invasive in
some
    places, so keep your eyes peeled for oddities.

- Refactor: removed the vestigial and long untested support for Jython
and
    IronPython.

.. \_issue
1515:[https://github.com/nedbat/coveragepy/issues/1515](https://togithub.com/nedbat/coveragepy/issues/1515)5
.. \_issue
1516[https://github.com/nedbat/coveragepy/issues/1516](https://togithub.com/nedbat/coveragepy/issues/1516)16
.. \_issue
151[https://github.com/nedbat/coveragepy/issues/1519](https://togithub.com/nedbat/coveragepy/issues/1519)519

.. \_changes\_7-0-1:

###
[`v7.0.1`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-701--2022-12-23)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.0.0...7.0.1)

- When checking if a file mapping resolved to a file that exists, we
weren't
considering files in .whl files. This is now fixed, closing `issue
1511`\_.

- File pattern rules were too strict, forbidding plus signs and curly
braces in
directory and file names. This is now fixed, closing `issue 1513`\_.

-   Unusual Unicode or control characters in source files could prevent
    reporting.  This is now fixed, closing `issue 1512`\_.

- The PyPy wheel now installs on PyPy 3.7, 3.8, and 3.9, closing `issue
1510`\_.

.. \_issue
1510:[https://github.com/nedbat/coveragepy/issues/1510](https://togithub.com/nedbat/coveragepy/issues/1510)0
.. \_issue
1511[https://github.com/nedbat/coveragepy/issues/1511](https://togithub.com/nedbat/coveragepy/issues/1511)11
.. \_issue
151[https://github.com/nedbat/coveragepy/issues/1512](https://togithub.com/nedbat/coveragepy/issues/1512)512
.. \_issue
15[https://github.com/nedbat/coveragepy/issues/1513](https://togithub.com/nedbat/coveragepy/issues/1513)1513

.. \_changes\_7-0-0:

###
[`v7.0.0`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-700--2022-12-18)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/6.5.0...7.0.0)

Nothing new beyond 7.0.0b1.

.. \_changes\_7-0-0b1:

###
[`v6.5.0`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-650--2022-09-29)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/6.4.4...6.5.0)

- The JSON report now includes details of which branches were taken, and
which
are missing for each file. Thanks, `Christoph Blessing <pull 1438_>`*.
Closes
    `issue 1425`*.

- Starting with coverage.py 6.2, `class` statements were marked as a
branch.
This wasn't right, and has been reverted, fixing `issue 1449`\_. Note
this
will very slightly reduce your coverage total if you are measuring
branch
    coverage.

-   Packaging is now compliant with `PEP 517`*, closing `issue 1395`*.

- A new debug option `--debug=pathmap` shows details of the remapping of
    paths that happens during combine due to the `[paths]` setting.

- Fix an internal problem with caching of invalid Python parsing. Found
by
    OSS-Fuzz, fixing their `bug 50381`\_.

.. \_bug 50381:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50381
.. \_PEP 517: https://peps.python.org/pep-0517/
.. \_issue
139[https://github.com/nedbat/coveragepy/issues/1395](https://togithub.com/nedbat/coveragepy/issues/1395)395
.. \_issue
14[https://github.com/nedbat/coveragepy/issues/1425](https://togithub.com/nedbat/coveragepy/issues/1425)1425
.. \_issue
1[https://github.com/nedbat/coveragepy/issues/1449](https://togithub.com/nedbat/coveragepy/issues/1449)/1449
.. \_pull
[https://github.com/nedbat/coveragepy/pull/1438](https://togithub.com/nedbat/coveragepy/pull/1438)l/1438

.. \_changes\_6-4-4:

###
[`v6.4.4`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-644--2022-08-16)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/6.4.3...6.4.4)

-   Wheels are now provided for Python 3.11.

.. \_changes\_6-4-3:

###
[`v6.4.3`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-643--2022-08-06)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/6.4.2...6.4.3)

- Fix a failure when combining data files if the file names contained
glob-like
patterns. Thanks, `Michael Krebs and Benjamin Schubert <pull 1405_>`\_.

- Fix a messaging failure when combining Windows data files on a
different
drive than the current directory, closing `issue 1428`*. Thanks,
`Lorenzo
    Micò <pull 1430_>`*.

- Fix path calculations when running in the root directory, as you might
do in
    a Docker container. Thanks `Arthur Rio <pull 1403_>`\_.

- Filtering in the HTML report wouldn't work when reloading the index
page.
    This is now fixed.  Thanks, `Marc Legendre <pull 1413_>`\_.

- Fix a problem with Cython code measurement, closing `issue 972`*.
Thanks,
    `Matus Valo <pull 1347_>`*.

.. \_issue
972:[https://github.com/nedbat/coveragepy/issues/972](https://togithub.com/nedbat/coveragepy/issues/972)2
.. \_issue
1428[https://github.com/nedbat/coveragepy/issues/1428](https://togithub.com/nedbat/coveragepy/issues/1428)28
.. \_pull
134[https://github.com/nedbat/coveragepy/pull/1347](https://togithub.com/nedbat/coveragepy/pull/1347)347
.. \_pull
14[https://github.com/nedbat/coveragepy/issues/1403](https://togithub.com/nedbat/coveragepy/issues/1403)1403
.. \_pull
1[https://github.com/nedbat/coveragepy/issues/1405](https://togithub.com/nedbat/coveragepy/issues/1405)/1405
.. \_pull
[https://github.com/nedbat/coveragepy/issues/1413](https://togithub.com/nedbat/coveragepy/issues/1413)s/1413
..
\_pull[https://github.com/nedbat/coveragepy/pull/1430](https://togithub.com/nedbat/coveragepy/pull/1430)ll/1430

.. \_changes\_6-4-2:

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/allenporter/flux-local).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMjQuMiIsInVwZGF0ZWRJblZlciI6IjM0LjEyNC4yIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue May 5, 2023
Version 7.2.5 — 2023-04-30
--------------------------

- Fix: ``html_report()`` could fail with an AttributeError on ``isatty`` if run
  in an unusual environment where sys.stdout had been replaced.  This is now
  fixed.


Version 7.2.4 — 2023-04-28
--------------------------

PyCon 2023 sprint fixes!

- Fix: with ``relative_files = true``, specifying a specific file to include or
  omit wouldn't work correctly (`issue 1604`_).  This is now fixed, with
  testing help by `Marc Gibbons <pull 1608_>`_.

- Fix: the XML report would have an incorrect ``<source>`` element when using
  relative files and the source option ended with a slash (`issue 1541`_).
  This is now fixed, thanks to `Kevin Brown-Silva <pull 1608_>`_.

- When the HTML report location is printed to the terminal, it's now a
  terminal-compatible URL, so that you can click the location to open the HTML
  file in your browser.  Finishes `issue 1523`_ thanks to `Ricardo Newbery
  <pull 1613_>`_.

- Docs: a new :ref:`Migrating page <migrating>` with details about how to
  migrate between major versions of coverage.py.  It currently covers the
  wildcard changes in 7.x.  Thanks, `Brian Grohe <pull 1610_>`_.

.. _issue 1523: nedbat/coveragepy#1523
.. _issue 1541: nedbat/coveragepy#1541
.. _issue 1604: nedbat/coveragepy#1604
.. _pull 1608: nedbat/coveragepy#1608
.. _pull 1609: nedbat/coveragepy#1609
.. _pull 1610: nedbat/coveragepy#1610
.. _pull 1613: nedbat/coveragepy#1613


Version 7.2.3 — 2023-04-06
--------------------------

- Fix: the :ref:`config_run_sigterm` setting was meant to capture data if a
  process was terminated with a SIGTERM signal, but it didn't always.  This was
  fixed thanks to `Lewis Gaul <pull 1600_>`_, closing `issue 1599`_.

- Performance: HTML reports with context information are now much more compact.
  File sizes are typically as small as one-third the previous size, but can be
  dramatically smaller. This closes `issue 1584`_ thanks to `Oleh Krehel
  <pull 1587_>`_.

- Development dependencies no longer use hashed pins, closing `issue 1592`_.

.. _issue 1584: nedbat/coveragepy#1584
.. _pull 1587: nedbat/coveragepy#1587
.. _issue 1592: nedbat/coveragepy#1592
.. _issue 1599: nedbat/coveragepy#1599
.. _pull 1600: nedbat/coveragepy#1600


Version 7.2.2 — 2023-03-16
--------------------------

- Fix: if a virtualenv was created inside a source directory, and a sourced
  package was installed inside the virtualenv, then all of the third-party
  packages inside the virtualenv would be measured.  This was incorrect, but
  has now been fixed: only the specified packages will be measured, thanks to
  `Manuel Jacob <pull 1560_>`_.

- Fix: the ``coverage lcov`` command could create a .lcov file with incorrect
  LF (lines found) and LH (lines hit) totals.  This is now fixed, thanks to
  `Ian Moore <pull 1583_>`_.

- Fix: the ``coverage xml`` command on Windows could create a .xml file with
  duplicate ``<package>`` elements. This is now fixed, thanks to `Benjamin
  Parzella <pull 1574_>`_, closing `issue 1573`_.

.. _pull 1560: nedbat/coveragepy#1560
.. _issue 1573: nedbat/coveragepy#1573
.. _pull 1574: nedbat/coveragepy#1574
.. _pull 1583: nedbat/coveragepy#1583


Version 7.2.1 — 2023-02-26
--------------------------

- Fix: the PyPI page had broken links to documentation pages, but no longer
  does, closing `issue 1566`_.

- Fix: public members of the coverage module are now properly indicated so that
  mypy will find them, fixing `issue 1564`_.

.. _issue 1564: nedbat/coveragepy#1564
.. _issue 1566: nedbat/coveragepy#1566


Version 7.2.0 — 2023-02-22
--------------------------

- Added a new setting ``[report] exclude_also`` to let you add more exclusions
  without overwriting the defaults.  Thanks, `Alpha Chen <pull 1557_>`_,
  closing `issue 1391`_.

- Added a :meth:`.CoverageData.purge_files` method to remove recorded data for
  a particular file.  Contributed by `Stephan Deibel <pull 1547_>`_.

- Fix: when reporting commands fail, they will no longer congratulate
  themselves with messages like "Wrote XML report to file.xml" before spewing a
  traceback about their failure.

- Fix: arguments in the public API that name file paths now accept pathlib.Path
  objects.  This includes the ``data_file`` and ``config_file`` arguments to
  the Coverage constructor and the ``basename`` argument to CoverageData.
  Closes `issue 1552`_.

- Fix: In some embedded environments, an IndexError could occur on stop() when
  the originating thread exits before completion.  This is now fixed, thanks to
  `Russell Keith-Magee <pull 1543_>`_, closing `issue 1542`_.

- Added a ``py.typed`` file to announce our type-hintedness.  Thanks,
  `KotlinIsland <pull 1550_>`_.

.. _issue 1391: nedbat/coveragepy#1391
.. _issue 1542: nedbat/coveragepy#1542
.. _pull 1543: nedbat/coveragepy#1543
.. _pull 1547: nedbat/coveragepy#1547
.. _pull 1550: nedbat/coveragepy#1550
.. _issue 1552: nedbat/coveragepy#1552
.. _pull 1557: nedbat/coveragepy#1557


Version 7.1.0 — 2023-01-24
--------------------------

- Added: the debug output file can now be specified with ``[run] debug_file``
  in the configuration file.  Closes `issue 1319`_.

- Performance: fixed a slowdown with dynamic contexts that's been around since
  6.4.3.  The fix closes `issue 1538`_.  Thankfully this doesn't break the
  `Cython change`_ that fixed `issue 972`_.  Thanks to Mathieu Kniewallner for
  the deep investigative work and comprehensive issue report.

- Typing: all product and test code has type annotations.

.. _Cython change: nedbat/coveragepy#1347
.. _issue 972: nedbat/coveragepy#972
.. _issue 1319: nedbat/coveragepy#1319
.. _issue 1538: nedbat/coveragepy#1538

Version 7.0.5 — 2023-01-10
--------------------------

- Fix: On Python 3.7, a file with type annotations but no ``from __future__
  import annotations`` would be missing statements in the coverage report. This
  is now fixed, closing `issue 1524`_.

.. _issue 1524: nedbat/coveragepy#1524


Version 7.0.4 — 2023-01-07
--------------------------

- Performance: an internal cache of file names was accidentally disabled,
  resulting in sometimes drastic reductions in performance.  This is now fixed,
  closing `issue 1527`_.   Thanks to Ivan Ciuvalschii for the reproducible test
  case.

.. _issue 1527: nedbat/coveragepy#1527


Version 7.0.3 — 2023-01-03
--------------------------

- Fix: when using pytest-cov or pytest-xdist, or perhaps both, the combining
  step could fail with ``assert row is not None`` using 7.0.2.  This was due to
  a race condition that has always been possible and is still possible. In
  7.0.1 and before, the error was silently swallowed by the combining code.
  Now it will produce a message "Couldn't combine data file" and ignore the
  data file as it used to do before 7.0.2.  Closes `issue 1522`_.

.. _issue 1522: nedbat/coveragepy#1522


Version 7.0.2 — 2023-01-02
--------------------------

- Fix: when using the ``[run] relative_files = True`` setting, a relative
  ``[paths]`` pattern was still being made absolute.  This is now fixed,
  closing `issue 1519`_.

- Fix: if Python doesn't provide tomllib, then TOML configuration files can
  only be read if coverage.py is installed with the ``[toml]`` extra.
  Coverage.py will raise an error if TOML support is not installed when it sees
  your settings are in a .toml file. But it didn't understand that
  ``[tools.coverage]`` was a valid section header, so the error wasn't reported
  if you used that header, and settings were silently ignored.  This is now
  fixed, closing `issue 1516`_.

- Fix: adjusted how decorators are traced on PyPy 7.3.10, fixing `issue 1515`_.

- Fix: the ``coverage lcov`` report did not properly implement the
  ``--fail-under=MIN`` option.  This has been fixed.

- Refactor: added many type annotations, including a number of refactorings.
  This should not affect outward behavior, but they were a bit invasive in some
  places, so keep your eyes peeled for oddities.

- Refactor: removed the vestigial and long untested support for Jython and
  IronPython.

.. _issue 1515: nedbat/coveragepy#1515
.. _issue 1516: nedbat/coveragepy#1516
.. _issue 1519: nedbat/coveragepy#1519


Version 7.0.1 — 2022-12-23
--------------------------

- When checking if a file mapping resolved to a file that exists, we weren't
  considering files in .whl files.  This is now fixed, closing `issue 1511`_.

- File pattern rules were too strict, forbidding plus signs and curly braces in
  directory and file names.  This is now fixed, closing `issue 1513`_.

- Unusual Unicode or control characters in source files could prevent
  reporting.  This is now fixed, closing `issue 1512`_.

- The PyPy wheel now installs on PyPy 3.7, 3.8, and 3.9, closing `issue 1510`_.

.. _issue 1510: nedbat/coveragepy#1510
.. _issue 1511: nedbat/coveragepy#1511
.. _issue 1512: nedbat/coveragepy#1512
.. _issue 1513: nedbat/coveragepy#1513


Version 7.0.0 — 2022-12-18
--------------------------

Nothing new beyond 7.0.0b1.


Version 7.0.0b1 — 2022-12-03
----------------------------

A number of changes have been made to file path handling, including pattern
matching and path remapping with the ``[paths]`` setting (see
:ref:`config_paths`).  These changes might affect you, and require you to
update your settings.

(This release includes the changes from `6.6.0b1 <changes_6-6-0b1_>`_, since
6.6.0 was never released.)

- Changes to file pattern matching, which might require updating your
  configuration:

  - Previously, ``*`` would incorrectly match directory separators, making
    precise matching difficult.  This is now fixed, closing `issue 1407`_.

  - Now ``**`` matches any number of nested directories, including none.

- Improvements to combining data files when using the
  :ref:`config_run_relative_files` setting, which might require updating your
  configuration:

  - During ``coverage combine``, relative file paths are implicitly combined
    without needing a ``[paths]`` configuration setting.  This also fixed
    `issue 991`_.

  - A ``[paths]`` setting like ``*/foo`` will now match ``foo/bar.py`` so that
    relative file paths can be combined more easily.

  - The :ref:`config_run_relative_files` setting is properly interpreted in
    more places, fixing `issue 1280`_.

- When remapping file paths with ``[paths]``, a path will be remapped only if
  the resulting path exists.  The documentation has long said the prefix had to
  exist, but it was never enforced.  This fixes `issue 608`_, improves `issue
  649`_, and closes `issue 757`_.

- Reporting operations now implicitly use the ``[paths]`` setting to remap file
  paths within a single data file.  Combining multiple files still requires the
  ``coverage combine`` step, but this simplifies some single-file situations.
  Closes `issue 1212`_ and `issue 713`_.

- The ``coverage report`` command now has a ``--format=`` option.  The original
  style is now ``--format=text``, and is the default.

  - Using ``--format=markdown`` will write the table in Markdown format, thanks
    to `Steve Oswald <pull 1479_>`_, closing `issue 1418`_.

  - Using ``--format=total`` will write a single total number to the
    output.  This can be useful for making badges or writing status updates.

- Combining data files with ``coverage combine`` now hashes the data files to
  skip files that add no new information.  This can reduce the time needed.
  Many details affect the speed-up, but for coverage.py's own test suite,
  combining is about 40% faster. Closes `issue 1483`_.

- When searching for completely un-executed files, coverage.py uses the
  presence of ``__init__.py`` files to determine which directories have source
  that could have been imported.  However, `implicit namespace packages`_ don't
  require ``__init__.py``.  A new setting ``[report]
  include_namespace_packages`` tells coverage.py to consider these directories
  during reporting.  Thanks to `Felix Horvat <pull 1387_>`_ for the
  contribution.  Closes `issue 1383`_ and `issue 1024`_.

- Fixed environment variable expansion in pyproject.toml files.  It was overly
  broad, causing errors outside of coverage.py settings, as described in `issue
  1481`_ and `issue 1345`_.  This is now fixed, but in rare cases will require
  changing your pyproject.toml to quote non-string values that use environment
  substitution.

- An empty file has a coverage total of 100%, but used to fail with
  ``--fail-under``.  This has been fixed, closing `issue 1470`_.

- The text report table no longer writes out two separator lines if there are
  no files listed in the table.  One is plenty.

- Fixed a mis-measurement of a strange use of wildcard alternatives in
  match/case statements, closing `issue 1421`_.

- Fixed internal logic that prevented coverage.py from running on
  implementations other than CPython or PyPy (`issue 1474`_).

- The deprecated ``[run] note`` setting has been completely removed.

.. _implicit namespace packages: https://peps.python.org/pep-0420/
.. _issue 608: nedbat/coveragepy#608
.. _issue 649: nedbat/coveragepy#649
.. _issue 713: nedbat/coveragepy#713
.. _issue 757: nedbat/coveragepy#757
.. _issue 991: nedbat/coveragepy#991
.. _issue 1024: nedbat/coveragepy#1024
.. _issue 1212: nedbat/coveragepy#1212
.. _issue 1280: nedbat/coveragepy#1280
.. _issue 1345: nedbat/coveragepy#1345
.. _issue 1383: nedbat/coveragepy#1383
.. _issue 1407: nedbat/coveragepy#1407
.. _issue 1418: nedbat/coveragepy#1418
.. _issue 1421: nedbat/coveragepy#1421
.. _issue 1470: nedbat/coveragepy#1470
.. _issue 1474: nedbat/coveragepy#1474
.. _issue 1481: nedbat/coveragepy#1481
.. _issue 1483: nedbat/coveragepy#1483
.. _pull 1387: nedbat/coveragepy#1387
.. _pull 1479: nedbat/coveragepy#1479



Version 6.6.0b1 — 2022-10-31
----------------------------

(Note: 6.6.0 final was never released. These changes are part of `7.0.0b1
<changes_7-0-0b1_>`_.)

- Changes to file pattern matching, which might require updating your
  configuration:

  - Previously, ``*`` would incorrectly match directory separators, making
    precise matching difficult.  This is now fixed, closing `issue 1407`_.

  - Now ``**`` matches any number of nested directories, including none.

- Improvements to combining data files when using the
  :ref:`config_run_relative_files` setting:

  - During ``coverage combine``, relative file paths are implicitly combined
    without needing a ``[paths]`` configuration setting.  This also fixed
    `issue 991`_.

  - A ``[paths]`` setting like ``*/foo`` will now match ``foo/bar.py`` so that
    relative file paths can be combined more easily.

  - The setting is properly interpreted in more places, fixing `issue 1280`_.

- Fixed environment variable expansion in pyproject.toml files.  It was overly
  broad, causing errors outside of coverage.py settings, as described in `issue
  1481`_ and `issue 1345`_.  This is now fixed, but in rare cases will require
  changing your pyproject.toml to quote non-string values that use environment
  substitution.

- Fixed internal logic that prevented coverage.py from running on
  implementations other than CPython or PyPy (`issue 1474`_).

.. _issue 991: nedbat/coveragepy#991
.. _issue 1280: nedbat/coveragepy#1280
.. _issue 1345: nedbat/coveragepy#1345
.. _issue 1407: nedbat/coveragepy#1407
.. _issue 1474: nedbat/coveragepy#1474
.. _issue 1481: nedbat/coveragepy#1481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed performance Something is too slow
Projects
None yet
Development

No branches or pull requests

2 participants