-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
attrs 21.3.0 breaks coverage report on Python 3.6 (regression from 21.2.0) #895
Comments
Interesting. Could be a coverage bug? Not sure why this would break it. |
python 3.7 has same issue working in CI/CD
but when i fixed attrs==21.2.0, its work |
@nedbat any idea? 🤔 |
OK, I think I've got it. Could y'all have a look at #896 and tell me if it fixes your problems? I can cut a release later today if yes. |
JFTR: the reason why it didn't come up in my own tests is because I always set a $ coverage run test.py; coverage report
No source for code: '/Users/hynek/tmp/rep-1>'.
$ coverage run --source test test.py; coverage report
Name Stmts Miss Cover
-----------------------------
test.py 1 0 100%
-----------------------------
TOTAL 1 0 100% |
Yeah, #896 works for me, both in my minimal test case and in my actual application (Zulip). Thanks for the quick fix! |
Thank you for the quick confirmation! |
21.4 is on PyPI – sorry for the regression and hope it's fixed now. |
469: build(deps): bump attrs from 21.3.0 to 21.4.0 r=ChrisRBe a=dependabot[bot] Bumps [attrs](https://github.com/python-attrs/attrs) from 21.3.0 to 21.4.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/python-attrs/attrs/releases">attrs's releases</a>.</em></p> <blockquote> <h2>21.4.0</h2> <p>This is a quick bug fix release for a regression that causes <code>coverage report</code> fail under certain circumstances.</p> <h1>Full Changelog</h1> <h2>Changes</h2> <ul> <li>Fixed the test suite on PyPy3.8 where <code>cloudpickle</code> does not work. <a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/892">#892</a></li> <li>Fixed <code>coverage report</code> for projects that use <code>attrs</code> and don't set a <code>--source</code>. <a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/895">#895</a>, <a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/896">#896</a></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python-attrs/attrs/blob/main/CHANGELOG.rst">attrs's changelog</a>.</em></p> <blockquote> <h2>21.4.0 (2021-12-29)</h2> <p>Changes ^^^^^^^</p> <ul> <li>Fixed the test suite on PyPy3.8 where <code>cloudpickle</code> does not work. <code>[#892](python-attrs/attrs#892) <https://github.com/python-attrs/attrs/issues/892></code>_</li> <li>Fixed <code>coverage report</code> for projects that use <code>attrs</code> and don't set a <code>--source</code>. <code>[#895](python-attrs/attrs#895) <https://github.com/python-attrs/attrs/issues/895></code><em>, <code>[#896](python-attrs/attrs#896) <https://github.com/python-attrs/attrs/issues/896></code></em></li> </ul> <hr /> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python-attrs/attrs/commit/2de90143100e713d8ae6b5d1adb5e1e879af01fb"><code>2de9014</code></a> Prepare 21.4.0</li> <li><a href="https://github.com/python-attrs/attrs/commit/02ba249b81a8d01ef6e7b04a7412556234aaa3bb"><code>02ba249</code></a> Remove dead anchors</li> <li><a href="https://github.com/python-attrs/attrs/commit/1ff3f1ee919178946bb48442f1e183ea99dae373"><code>1ff3f1e</code></a> Minor changelog polish</li> <li><a href="https://github.com/python-attrs/attrs/commit/0575d51ffddc0de465e7229571d11f9c6f6b8575"><code>0575d51</code></a> Make virtual repr file names unique (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/896">#896</a>)</li> <li><a href="https://github.com/python-attrs/attrs/commit/03dd7136cf1ccc58c9612531ba9711892830c1fb"><code>03dd713</code></a> Do not require cloudpickle for PyPy (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/892">#892</a>)</li> <li><a href="https://github.com/python-attrs/attrs/commit/ce50f40b52567564000af685959dc6df97c5f384"><code>ce50f40</code></a> Use correct words</li> <li><a href="https://github.com/python-attrs/attrs/commit/9424a930f966ade789b1ea4b8043efe916c50769"><code>9424a93</code></a> Tell coverage about import attrs</li> <li><a href="https://github.com/python-attrs/attrs/commit/c86fbc864862983111184eb9c3092afe2f2d477e"><code>c86fbc8</code></a> Use better word</li> <li><a href="https://github.com/python-attrs/attrs/commit/7695908aa7b4a96fbfefb7432145f843ae9c0c98"><code>7695908</code></a> docs: fix very minor typo (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/894">#894</a>)</li> <li><a href="https://github.com/python-attrs/attrs/commit/ada66bef24700d159acff4b72b7cb34a263ccccf"><code>ada66be</code></a> docs: remove typo in README.rst (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/893">#893</a>)</li> <li>Additional commits viewable in <a href="https://github.com/python-attrs/attrs/compare/21.3.0...21.4.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=attrs&package-manager=pip&previous-version=21.3.0&new-version=21.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
469: build(deps): bump attrs from 21.3.0 to 21.4.0 r=ChrisRBe a=dependabot[bot] Bumps [attrs](https://github.com/python-attrs/attrs) from 21.3.0 to 21.4.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/python-attrs/attrs/releases">attrs's releases</a>.</em></p> <blockquote> <h2>21.4.0</h2> <p>This is a quick bug fix release for a regression that causes <code>coverage report</code> fail under certain circumstances.</p> <h1>Full Changelog</h1> <h2>Changes</h2> <ul> <li>Fixed the test suite on PyPy3.8 where <code>cloudpickle</code> does not work. <a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/892">#892</a></li> <li>Fixed <code>coverage report</code> for projects that use <code>attrs</code> and don't set a <code>--source</code>. <a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/895">#895</a>, <a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/896">#896</a></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python-attrs/attrs/blob/main/CHANGELOG.rst">attrs's changelog</a>.</em></p> <blockquote> <h2>21.4.0 (2021-12-29)</h2> <p>Changes ^^^^^^^</p> <ul> <li>Fixed the test suite on PyPy3.8 where <code>cloudpickle</code> does not work. <code>[#892](python-attrs/attrs#892) <https://github.com/python-attrs/attrs/issues/892></code>_</li> <li>Fixed <code>coverage report</code> for projects that use <code>attrs</code> and don't set a <code>--source</code>. <code>[#895](python-attrs/attrs#895) <https://github.com/python-attrs/attrs/issues/895></code><em>, <code>[#896](python-attrs/attrs#896) <https://github.com/python-attrs/attrs/issues/896></code></em></li> </ul> <hr /> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python-attrs/attrs/commit/2de90143100e713d8ae6b5d1adb5e1e879af01fb"><code>2de9014</code></a> Prepare 21.4.0</li> <li><a href="https://github.com/python-attrs/attrs/commit/02ba249b81a8d01ef6e7b04a7412556234aaa3bb"><code>02ba249</code></a> Remove dead anchors</li> <li><a href="https://github.com/python-attrs/attrs/commit/1ff3f1ee919178946bb48442f1e183ea99dae373"><code>1ff3f1e</code></a> Minor changelog polish</li> <li><a href="https://github.com/python-attrs/attrs/commit/0575d51ffddc0de465e7229571d11f9c6f6b8575"><code>0575d51</code></a> Make virtual repr file names unique (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/896">#896</a>)</li> <li><a href="https://github.com/python-attrs/attrs/commit/03dd7136cf1ccc58c9612531ba9711892830c1fb"><code>03dd713</code></a> Do not require cloudpickle for PyPy (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/892">#892</a>)</li> <li><a href="https://github.com/python-attrs/attrs/commit/ce50f40b52567564000af685959dc6df97c5f384"><code>ce50f40</code></a> Use correct words</li> <li><a href="https://github.com/python-attrs/attrs/commit/9424a930f966ade789b1ea4b8043efe916c50769"><code>9424a93</code></a> Tell coverage about import attrs</li> <li><a href="https://github.com/python-attrs/attrs/commit/c86fbc864862983111184eb9c3092afe2f2d477e"><code>c86fbc8</code></a> Use better word</li> <li><a href="https://github.com/python-attrs/attrs/commit/7695908aa7b4a96fbfefb7432145f843ae9c0c98"><code>7695908</code></a> docs: fix very minor typo (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/894">#894</a>)</li> <li><a href="https://github.com/python-attrs/attrs/commit/ada66bef24700d159acff4b72b7cb34a263ccccf"><code>ada66be</code></a> docs: remove typo in README.rst (<a href="https://github-redirect.dependabot.com/python-attrs/attrs/issues/893">#893</a>)</li> <li>Additional commits viewable in <a href="https://github.com/python-attrs/attrs/compare/21.3.0...21.4.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=attrs&package-manager=pip&previous-version=21.3.0&new-version=21.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
attrs 21.3.0 is breaking code coverage [1]. To fix this, bump attrs to 21.4.0. [1] python-attrs/attrs#895 Signed-off-by: Bastian Krause <bst@pengutronix.de>
With attrs 21.3.0, if I run a script that does
import attr
usingcoverage
, I get an error fromcoverage report
.This worked with attrs 21.2.0.
I bisected the problem to commit 5a368d8 (#858). Cc @thetorpedodog @hynek.
The text was updated successfully, but these errors were encountered: