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

File size increase in 6.4.3 when using dynamic_context #1586

Closed
davidszotten opened this issue Mar 15, 2023 · 8 comments · Fixed by #1629
Closed

File size increase in 6.4.3 when using dynamic_context #1586

davidszotten opened this issue Mar 15, 2023 · 8 comments · Fixed by #1629
Labels
bug Something isn't working fixed

Comments

@davidszotten
Copy link
Contributor

davidszotten commented Mar 15, 2023

Describe the bug
Hi. I suspect this is related to #1538, hence the similar name, but this is a different aspect. My symptom is a huge increase in coverage data file size (~4 -> 200Mb)

To Reproduce
I made a test project with 3 pytest files ,each with a single empty test, and added dynamic_context = test_function to a coveragerc

running pytest under coverage and then reading the line_bits table, i get
(coverage run -m pytest tests/ ; sqlite3 .coverage 'select path, context from line_bits join file on file_id = file.id join context on context_id = context.id')

on 6.4.2

tests/test_1.py|
tests/test_1.py|test_1.test1
tests/test_2.py|
tests/test_2.py|test_2.test2
tests/test_3.py|
tests/test_3.py|test_3.test3

on 6.4.3

tests/test_1.py|
tests/test_1.py|test_1.test1
tests/test_1.py|test_2.test2
tests/test_1.py|test_3.test3
tests/test_2.py|
tests/test_2.py|test_1.test1
tests/test_2.py|test_2.test2
tests/test_2.py|test_3.test3
tests/test_3.py|
tests/test_3.py|test_1.test1
tests/test_3.py|test_2.test2
tests/test_3.py|test_3.test3

It looks like there is now a line for every file for every context.

Is this expected? Avoidable? The fix for #1538 seems to focus on queries. does that mean we can't avoid storing the extra data in the first place?

@davidszotten davidszotten added bug Something isn't working needs triage labels Mar 15, 2023
@nedbat
Copy link
Owner

nedbat commented Mar 15, 2023

Can you share the code for your test project?

@davidszotten
Copy link
Contributor Author

@davidszotten
Copy link
Contributor Author

i might be missing a bunch of context/knowledge, but from what i can tell, while f54428f fixes the issue on top of 6.4.2 through 7.0.5, as of 7.10.0, at least the example from cython still passes after reverting f54428f

@davidszotten
Copy link
Contributor Author

was 4cc32922685c6#diff-e5185ca855df54af4f94c983f99b52cfad9ddc17386353d09acdfa994dd72a33L574-L579 an alternative (and better) fix for the cython issue than adding lots of empty file-context entries?

andersk added a commit to andersk/coveragepy that referenced this issue May 23, 2023
This reverts commit f54428f (nedbat#1347),
which was a big regression in performance and file sizes when using
dynamic_context, and is no longer needed for nedbat#972 as of
4cc3292 (nedbat#1538).

Fixes nedbat#1586.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@andersk
Copy link
Contributor

andersk commented May 23, 2023

@davidszotten My testing agrees, so we can revert f54428f:

nedbat pushed a commit to andersk/coveragepy that referenced this issue May 29, 2023
This reverts commit f54428f (nedbat#1347),
which was a big regression in performance and file sizes when using
dynamic_context, and is no longer needed for nedbat#972 as of
4cc3292 (nedbat#1538).

Fixes nedbat#1586.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
nedbat added a commit to andersk/coveragepy that referenced this issue May 29, 2023
nedbat added a commit that referenced this issue May 29, 2023
* Revert "Map also empty dictionaries to file"

This reverts commit f54428f (#1347),
which was a big regression in performance and file sizes when using
dynamic_context, and is no longer needed for #972 as of
4cc3292 (#1538).

Fixes #1586.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

* docs: details of the fix in pull #1629, fixing #1586.

---------

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
@nedbat
Copy link
Owner

nedbat commented May 29, 2023

Fixed in 6df9ee5.

@nedbat
Copy link
Owner

nedbat commented May 29, 2023

This is now released as part of coverage 7.2.7.

@davidszotten
Copy link
Contributor Author

Thanks!

@nedbat nedbat added fixed and removed needs triage labels May 31, 2023
renovate bot added a commit to allenporter/flux-local that referenced this issue Jun 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) | `==7.2.6` ->
`==7.2.7` |
[![age](https://badges.renovateapi.com/packages/pypi/coverage/7.2.7/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/coverage/7.2.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/coverage/7.2.7/compatibility-slim/7.2.6)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/coverage/7.2.7/confidence-slim/7.2.6)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v7.2.7`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-727--2023-05-29)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.2.6...7.2.7)

- Fix: reverted a `change from 6.4.3 <pull 1347_>`\_ that helped Cython,
but
also increased the size of data files when using dynamic contexts, as
described in the now-fixed `issue 1586`*. The problem is now avoided due
to a
recent change (`issue 1538`*). Thanks to `Anders Kaseorg <pull 1629_>`\_
and David Szotten for persisting with problem reports and detailed
diagnoses.

-   Wheels are now provided for CPython 3.12.

.. \_issue
1586:[nedbat/coveragepy#1586
.. \_pull
1629[nedbat/coveragepy#1629

.. \_changes\_7-2-6:

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMDUuMiIsInVwZGF0ZWRJblZlciI6IjM1LjEwNS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
RobertCraigie added a commit to RobertCraigie/prisma-client-py that referenced this issue Jul 21, 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) | `==7.2.5` ->
`==7.2.7` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/coverage/7.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/coverage/7.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/coverage/7.2.5/7.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/coverage/7.2.5/7.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [mkdocs-material](https://togithub.com/squidfunk/mkdocs-material) |
`==9.1.9` -> `==9.1.19` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/mkdocs-material/9.1.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/mkdocs-material/9.1.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/mkdocs-material/9.1.9/9.1.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/mkdocs-material/9.1.9/9.1.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [mock](http://mock.readthedocs.org/en/latest/)
([source](https://togithub.com/testing-cabal/mock)) | `==5.0.2` ->
`==5.1.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/mock/5.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/mock/5.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/mock/5.0.2/5.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/mock/5.0.2/5.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [pyright](https://togithub.com/RobertCraigie/pyright-python) |
`==1.1.306` -> `==1.1.317` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/pyright/1.1.317?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pyright/1.1.317?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pyright/1.1.306/1.1.317?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pyright/1.1.306/1.1.317?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [pytest](https://docs.pytest.org/en/latest/)
([source](https://togithub.com/pytest-dev/pytest),
[changelog](https://docs.pytest.org/en/stable/changelog.html)) |
`==7.3.1` -> `==7.4.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/pytest/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pytest/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pytest/7.3.1/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pytest/7.3.1/7.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [pytest-asyncio](https://togithub.com/pytest-dev/pytest-asyncio)
([changelog](https://pytest-asyncio.readthedocs.io/en/latest/reference/changelog.html))
| `==0.21.0` -> `==0.21.1` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/pytest-asyncio/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pytest-asyncio/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pytest-asyncio/0.21.0/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pytest-asyncio/0.21.0/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [pytest-mock](https://togithub.com/pytest-dev/pytest-mock)
([changelog](https://pytest-mock.readthedocs.io/en/latest/changelog.html))
| `==3.10.0` -> `==3.11.1` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/pytest-mock/3.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pytest-mock/3.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pytest-mock/3.10.0/3.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pytest-mock/3.10.0/3.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>nedbat/coveragepy (coverage)</summary>

###
[`v7.2.7`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-727--2023-05-29)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.2.6...7.2.7)

- Fix: reverted a `change from 6.4.3 <pull 1347_>`\_ that helped Cython,
but
also increased the size of data files when using dynamic contexts, as
described in the now-fixed `issue 1586`*. The problem is now avoided due
to a
recent change (`issue 1538`*). Thanks to `Anders Kaseorg <pull 1629_>`\_
and David Szotten for persisting with problem reports and detailed
diagnoses.

-   Wheels are now provided for CPython 3.12.

.. \_issue
1586:[nedbat/coveragepy#1586
.. \_pull
1629[nedbat/coveragepy#1629

.. \_changes\_7-2-6:

###
[`v7.2.6`](https://togithub.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-726--2023-05-23)

[Compare
Source](https://togithub.com/nedbat/coveragepy/compare/7.2.5...7.2.6)

- Fix: the `lcov` command could raise an IndexError exception if a file
is
translated to Python but then executed under its own name. Jinja2 does
this
    when rendering templates.  Fixes `issue 1553`\_.

- Python 3.12 beta 1 now inlines comprehensions. Previously they were
compiled
as invisible functions and coverage.py would warn you if they weren't
    completely executed.  This no longer happens under Python 3.12.

- Fix: the `coverage debug sys` command includes some environment
variables
in its output. This could have included sensitive data. Those values are
    now hidden with asterisks, closing `issue 1628`\_.

.. \_issue
1553:[nedbat/coveragepy#1553
.. \_issue
1628[nedbat/coveragepy#1628

.. \_changes\_7-2-5:

</details>

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

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

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

-   Added support for MkDocs 1.5+
- Fixed
[#&#8203;5699](https://togithub.com/squidfunk/mkdocs-material/issues/5699):
Improve error reporting in social plugin

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

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

-   Updated Danish translations
-   Added support for installing user requirements in Docker image
- Fixed
[#&#8203;5655](https://togithub.com/squidfunk/mkdocs-material/issues/5655):
Search separator with lookbehind breaks highlighting

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

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

- Fixed
[#&#8203;5633](https://togithub.com/squidfunk/mkdocs-material/issues/5633):
Code annotations with nested lists incorrectly mounted
- Fixed
[#&#8203;5628](https://togithub.com/squidfunk/mkdocs-material/issues/5628):
Regression in new social plugin configuration scheme

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

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

-   Updated Indonesian translations
-   Ensure scroll bar follows color scheme of operating system

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

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

- Fixed
[#&#8203;5566](https://togithub.com/squidfunk/mkdocs-material/issues/5566):
Indicate color scheme to operating system
- Fixed
[#&#8203;5565](https://togithub.com/squidfunk/mkdocs-material/issues/5565):
Update `Dockerfile` to latest version of base image
- Fixed
[#&#8203;5554](https://togithub.com/squidfunk/mkdocs-material/issues/5554):
Add additional version tags (`9`, `9.1`) to Docker image
- Fixed
[#&#8203;5536](https://togithub.com/squidfunk/mkdocs-material/issues/5536):
Strip tags of ARIA labels in table of contents

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

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

-   Updated Armenian and Greek translations

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

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

- Fixed
[#&#8203;5517](https://togithub.com/squidfunk/mkdocs-material/issues/5517):
Social plugin crashes for some fonts (e.g. Open Sans)

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

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

-   Updated Bengali (Bangla) translations
- Fixed
[#&#8203;5503](https://togithub.com/squidfunk/mkdocs-material/issues/5503):
Docker image publish errors on uppercase characters
- Fixed
[#&#8203;5407](https://togithub.com/squidfunk/mkdocs-material/issues/5407):
Auto-pause media when in hidden content tabs

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

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

- Fixed
[#&#8203;5487](https://togithub.com/squidfunk/mkdocs-material/issues/5487):
Social plugin crashes without options (9.1.10 regression)

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

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

-   Added `cards_layout_options` setting for social cards
-   Deprecated `cards_color` and `cards_font` setting for social cards

</details>

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

###
[`v5.1.0`](https://togithub.com/testing-cabal/mock/blob/HEAD/CHANGELOG.rst#510)

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

- bpo-44185: :func:`unittest.mock.mock_open` will call the :func:`close`
    method of the file handle mock when it is exiting from the context
    manager. Patch by Samet Yaslan.

- [gh-94924](https://togithub.com/testing-cabal/mock/issues/94924):
:func:`unittest.mock.create_autospec` now properly returns
coroutine functions compatible with :func:`inspect.iscoroutinefunction`

- bpo-17013: Add `ThreadingMock` to :mod:`unittest.mock` that can be
used
    to create Mock objects that can wait until they are called. Patch by
    Karthikeyan Singaravelan and Mario Corchero.

- bpo-41768: :mod:`unittest.mock` speccing no longer calls class
properties.
    Patch by Melanie Witt.

</details>

<details>
<summary>RobertCraigie/pyright-python (pyright)</summary>

###
[`v1.1.317`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.316...v1.1.317)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.316...v1.1.317)

###
[`v1.1.316`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.315...v1.1.316)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.315...v1.1.316)

###
[`v1.1.315`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.314...v1.1.315)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.314...v1.1.315)

###
[`v1.1.314`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.313...v1.1.314)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.313...v1.1.314)

###
[`v1.1.313`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.312...v1.1.313)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.312...v1.1.313)

###
[`v1.1.312`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.311...v1.1.312)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.311...v1.1.312)

###
[`v1.1.311`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.310...v1.1.311)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.310...v1.1.311)

###
[`v1.1.310`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.309...v1.1.310)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.309...v1.1.310)

###
[`v1.1.309`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.308...v1.1.309)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.308...v1.1.309)

###
[`v1.1.308`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.307...v1.1.308)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.307...v1.1.308)

###
[`v1.1.307`](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.306...v1.1.307)

[Compare
Source](https://togithub.com/RobertCraigie/pyright-python/compare/v1.1.306...v1.1.307)

</details>

<details>
<summary>pytest-dev/pytest (pytest)</summary>

###
[`v7.4.0`](https://togithub.com/pytest-dev/pytest/releases/tag/7.4.0)

[Compare
Source](https://togithub.com/pytest-dev/pytest/compare/7.3.2...7.4.0)

# pytest 7.4.0 (2023-06-23)

## Features

- [#&#8203;10901](https://togithub.com/pytest-dev/pytest/issues/10901):
Added `ExceptionInfo.from_exception()
<pytest.ExceptionInfo.from_exception>`{.interpreted-text role="func"}, a
simpler way to create an `~pytest.ExceptionInfo`{.interpreted-text
role="class"} from an exception.
This can replace `ExceptionInfo.from_exc_info()
<pytest.ExceptionInfo.from_exc_info()>`{.interpreted-text role="func"}
for most uses.

## Improvements

- [#&#8203;10872](https://togithub.com/pytest-dev/pytest/issues/10872):
Update test log report annotation to named tuple and fixed inconsistency
in docs for `pytest_report_teststatus`{.interpreted-text role="hook"}
hook.

- [#&#8203;10907](https://togithub.com/pytest-dev/pytest/issues/10907):
When an exception traceback to be displayed is completely filtered out
(by mechanisms such as `__tracebackhide__`, internal frames, and
similar), now only the exception string and the following message are
shown:

"All traceback entries are hidden. Pass \[--full-trace]{.title-ref} to
see hidden and internal frames.".

Previously, the last frame of the traceback was shown, even though it
was hidden.

- [#&#8203;10940](https://togithub.com/pytest-dev/pytest/issues/10940):
Improved verbose output (`-vv`) of `skip` and `xfail` reasons by
performing text wrapping while leaving a clear margin for progress
output.

    Added `TerminalReporter.wrap_write()` as a helper for that.

- [#&#8203;10991](https://togithub.com/pytest-dev/pytest/issues/10991):
Added handling of `%f` directive to print microseconds in log format
options, such as `log-date-format`.

- [#&#8203;11005](https://togithub.com/pytest-dev/pytest/issues/11005):
Added the underlying exception to the cache provider's path creation and
write warning messages.

- [#&#8203;11013](https://togithub.com/pytest-dev/pytest/issues/11013):
Added warning when `testpaths`{.interpreted-text role="confval"} is set,
but paths are not found by glob. In this case, pytest will fall back to
searching from the current directory.

- [#&#8203;11043](https://togithub.com/pytest-dev/pytest/issues/11043):
When \[--confcutdir]{.title-ref} is not specified, and there is no
config file present, the conftest cutoff directory
(\[--confcutdir]{.title-ref}) is now set to the `rootdir
<rootdir>`{.interpreted-text role="ref"}.
Previously in such cases, \[conftest.py]{.title-ref} files would be
probed all the way to the root directory of the filesystem.
If you are badly affected by this change, consider adding an empty
config file to your desired cutoff directory, or explicitly set
\[--confcutdir]{.title-ref}.

- [#&#8203;11081](https://togithub.com/pytest-dev/pytest/issues/11081):
The `norecursedirs`{.interpreted-text role="confval"} check is now
performed in a `pytest_ignore_collect`{.interpreted-text role="hook"}
implementation, so plugins can affect it.

If after updating to this version you see that your
\[norecursedirs]{.title-ref} setting is not being respected,
it means that a conftest or a plugin you use has a bad
\[pytest_ignore_collect]{.title-ref} implementation.
Most likely, your hook returns \[False]{.title-ref} for paths it does
not want to ignore,
which ends the processing and doesn't allow other plugins, including
pytest itself, to ignore the path.
The fix is to return \[None]{.title-ref} instead of \[False]{.title-ref}
for paths your hook doesn't want to ignore.

- [#&#8203;8711](https://togithub.com/pytest-dev/pytest/issues/8711):
`caplog.set_level()
<pytest.LogCaptureFixture.set_level>`{.interpreted-text role="func"} and
`caplog.at_level()
<pytest.LogCaptureFixture.at_level>`{.interpreted-text role="func"}
will temporarily enable the requested `level` if `level` was disabled
globally via
    `logging.disable(LEVEL)`.

## Bug Fixes

- [#&#8203;10831](https://togithub.com/pytest-dev/pytest/issues/10831):
Terminal Reporting: Fixed bug when running in `--tb=line` mode where
`pytest.fail(pytrace=False)` tests report `None`.
- [#&#8203;11068](https://togithub.com/pytest-dev/pytest/issues/11068):
Fixed the `--last-failed` whole-file skipping functionality ("skipped N
files") for `non-python test files <non-python tests>`{.interpreted-text
role="ref"}.
- [#&#8203;11104](https://togithub.com/pytest-dev/pytest/issues/11104):
Fixed a regression in pytest 7.3.2 which caused to
`testpaths`{.interpreted-text role="confval"} to be considered for
loading initial conftests,
even when it was not utilized (e.g. when explicit paths were given on
the command line).
    Now the `testpaths` are only considered when they are in use.
- [#&#8203;1904](https://togithub.com/pytest-dev/pytest/issues/1904):
Fixed traceback entries hidden with `__tracebackhide__ = True` still
being shown for chained exceptions (parts after "... the above exception
..." message).
- [#&#8203;7781](https://togithub.com/pytest-dev/pytest/issues/7781):
Fix writing non-encodable text to log file when using `--debug`.

## Improved Documentation

- [#&#8203;9146](https://togithub.com/pytest-dev/pytest/issues/9146):
Improved documentation for `caplog.set_level()
<pytest.LogCaptureFixture.set_level>`{.interpreted-text role="func"}.

## Trivial/Internal Changes

- [#&#8203;11031](https://togithub.com/pytest-dev/pytest/issues/11031):
Enhanced the CLI flag for `-c` to now include `--config-file` to make it
clear that this flag applies to the usage of a custom config file.

###
[`v7.3.2`](https://togithub.com/pytest-dev/pytest/releases/tag/7.3.2)

[Compare
Source](https://togithub.com/pytest-dev/pytest/compare/7.3.1...7.3.2)

# pytest 7.3.2 (2023-06-10)

## Bug Fixes

- [#&#8203;10169](https://togithub.com/pytest-dev/pytest/issues/10169):
Fix bug where very long option names could cause pytest to break with
`OSError: [Errno 36] File name too long` on some systems.
- [#&#8203;10894](https://togithub.com/pytest-dev/pytest/issues/10894):
Support for Python 3.12 (beta at the time of writing).
- [#&#8203;10987](https://togithub.com/pytest-dev/pytest/issues/10987):
`testpaths`{.interpreted-text role="confval"} is now honored to load
root `conftests`.
- [#&#8203;10999](https://togithub.com/pytest-dev/pytest/issues/10999):
The \[monkeypatch]{.title-ref}
\[setitem]{.title-ref}/\[delitem]{.title-ref} type annotations now allow
\[TypedDict]{.title-ref} arguments.
- [#&#8203;11028](https://togithub.com/pytest-dev/pytest/issues/11028):
Fixed bug in assertion rewriting where a variable assigned with the
walrus operator could not be used later in a function call.
- [#&#8203;11054](https://togithub.com/pytest-dev/pytest/issues/11054):
Fixed `--last-failed`'s "(skipped N files)" functionality for files
inside of packages (directories with \[\__init\_\_.py]{.title-ref}
files).

</details>

<details>
<summary>pytest-dev/pytest-asyncio (pytest-asyncio)</summary>

###
[`v0.21.1`](https://togithub.com/pytest-dev/pytest-asyncio/releases/tag/v0.21.1):
pytest-asyncio 0.21.1

[Compare
Source](https://togithub.com/pytest-dev/pytest-asyncio/compare/v0.21.0...v0.21.1)

### 0.21.1 (2023-07-12)

- Output a proper error message when an invalid `asyncio_mode` is
selected.
- Extend warning message about unclosed event loops with additional
possible cause.

[#&#8203;531](https://togithub.com/pytest-dev/pytest-asyncio/issues/531)
- Previously, some tests reported "skipped" or "xfailed" as a result.
Now all tests report a "success" result.

</details>

<details>
<summary>pytest-dev/pytest-mock (pytest-mock)</summary>

###
[`v3.11.1`](https://togithub.com/pytest-dev/pytest-mock/blob/HEAD/CHANGELOG.rst#3111-2023-06-15)

[Compare
Source](https://togithub.com/pytest-dev/pytest-mock/compare/v3.11.0...v3.11.1)

(This release source code is identical to `3.11.0` except a small
internal fix to deployment/CI)

-   Fixed introspection for failed `assert_has_calls` (`#365`\_).

- Updated type annotations for `mocker.patch` and `mocker.spy`
(`#364`\_).

..
\_#365:[pytest-dev/pytest-mock#365
..
\_#364[pytest-dev/pytest-mock#364

###
[`v3.11.0`](https://togithub.com/pytest-dev/pytest-mock/blob/HEAD/CHANGELOG.rst#3110-2023-06-15)

[Compare
Source](https://togithub.com/pytest-dev/pytest-mock/compare/v3.10.0...v3.11.0)

-   Fixed introspection for failed `assert_has_calls` (`#365`\_).

- Updated type annotations for `mocker.patch` and `mocker.spy`
(`#364`\_).

..
\_#365:[pytest-dev/pytest-mock#365
..
\_#364[pytest-dev/pytest-mock#364

</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://developer.mend.io/github/RobertCraigie/prisma-client-py).

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Craigie <robert@craigie.dev>
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants