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

Make coverage packaging be PEP-517 compliant #1395

Closed
ssbarnea opened this issue Jun 6, 2022 · 18 comments
Closed

Make coverage packaging be PEP-517 compliant #1395

ssbarnea opened this issue Jun 6, 2022 · 18 comments
Labels
enhancement New feature or request install question Further information is requested

Comments

@ssbarnea
Copy link
Sponsor

ssbarnea commented Jun 6, 2022

Describe the bug
I observed some warnings when installing coverage related to the packaging of coverage, likely caused by lack of PEP-517 compliance.

Using legacy 'setup.py install' for coverage, since package 'wheel' is not installed.

To Reproduce

pip install coverage

Expected behavior
Full PEP-517 compliance (aka removal of setup.py and adoption of pyproject.toml).

Additional context
Add any other context about the problem here.

@ssbarnea ssbarnea added bug Something isn't working needs triage labels Jun 6, 2022
@nedbat
Copy link
Owner

nedbat commented Jun 6, 2022

I'm not opposed to this, but could use help changing the tooling.

@nedbat nedbat added install enhancement New feature or request and removed needs triage bug Something isn't working labels Jun 6, 2022
@pfmoore
Copy link

pfmoore commented Jun 6, 2022

There's not actually a problem here with PEP 517 compliance:

❯ pip install --no-binary coverage coverage
Collecting coverage
  Using cached coverage-6.4.1.tar.gz (719 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: coverage
  Building wheel for coverage (pyproject.toml) ... done
  Created wheel for coverage: filename=coverage-6.4.1-cp310-cp310-win_amd64.whl size=186291 sha256=3a568a74b8c95e42043eb4c118e09b6eb89a2d0f5b2b0617cfa7bef5cac793a5
  Stored in directory: c:\users\gustav\appdata\local\pip\cache\wheels\a7\02\73\c1f7efbef9c538f8893948fa77a61364777e01e861fa54fcec
Successfully built coverage
Installing collected packages: coverage
Successfully installed coverage-6.4.1

Certainly, coverage could change its build process to reflect recent standards, but the existing code is recognised and handled correctly, at least by a modern version of pip.

Maybe the OP can give a better explanation of how to reproduce the issue, as it doesn't seem to reproduce for me.

I'll note that the error reported, "Using legacy 'setup.py install' for coverage, since package 'wheel' is not installed" would not normally be given by pip if run with no special options, as wheel is installed into the build environment automatically. Was the problem that the OP was using --no-build-isolation (or some other non-standard option) when running pip?

@nedbat nedbat added the question Further information is requested label Jun 6, 2022
@ssbarnea
Copy link
Sponsor Author

I am sure that I did not add any argument to pip when doing so and I seen this warning being displayed multiple times (different repos using coverage). Maybe in some cases pip ends up creating a build environment for one package without wheel package, one that requires coverage.

It might be related to pip or tox but I was still unable to find any place where this flag would have being set.

Sadly I forgot to post full log and now I do not know on which project I seen it. I will be back with more details, i bet it will not take long to see it again as I use coverage in most projects.

@ssbarnea
Copy link
Sponsor Author

Reproduced it. It happens all the time if you do not have wheel installed. In my case macos, python 3.11-dev from pyenv, no virtualenv active and pip 22.1.1:

$ pip install -v --no-cache-dir coverage
Using pip 22.1.2 from /Users/ssbarnea/.pyenv/versions/3.11-dev/lib/python3.11/site-packages/pip (python 3.11)
Collecting coverage
  Downloading coverage-6.4.1.tar.gz (719 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 720.0/720.0 kB 7.2 MB/s eta 0:00:00
  Running command python setup.py egg_info
  running egg_info
  creating /private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-pip-egg-info-n54j1ri1/coverage.egg-info
  writing /private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-pip-egg-info-n54j1ri1/coverage.egg-info/PKG-INFO
  writing dependency_links to /private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-pip-egg-info-n54j1ri1/coverage.egg-info/dependency_links.txt
  writing entry points to /private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-pip-egg-info-n54j1ri1/coverage.egg-info/entry_points.txt
  writing requirements to /private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-pip-egg-info-n54j1ri1/coverage.egg-info/requires.txt
  writing top-level names to /private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-pip-egg-info-n54j1ri1/coverage.egg-info/top_level.txt
  writing manifest file '/private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-pip-egg-info-n54j1ri1/coverage.egg-info/SOURCES.txt'
  reading manifest file '/private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-pip-egg-info-n54j1ri1/coverage.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  no previously-included directories found matching 'doc/_build'
  no previously-included directories found matching 'doc/_spell'
  no previously-included directories found matching 'tests/eggsrc/build'
  adding license file 'LICENSE.txt'
  writing manifest file '/private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-pip-egg-info-n54j1ri1/coverage.egg-info/SOURCES.txt'
  Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for coverage, since package 'wheel' is not installed.
Installing collected packages: coverage
  Running command Running setup.py install for coverage
  running install
  running build
  running build_py
  creating build
  creating build/lib.macosx-12.4-arm64-3.11
  creating build/lib.macosx-12.4-arm64-3.11/coverage
...
  running install_egg_info
  running egg_info
  writing coverage.egg-info/PKG-INFO
  writing dependency_links to coverage.egg-info/dependency_links.txt
  writing entry points to coverage.egg-info/entry_points.txt
  writing requirements to coverage.egg-info/requires.txt
  writing top-level names to coverage.egg-info/top_level.txt
  reading manifest file 'coverage.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  no previously-included directories found matching 'doc/_build'
  no previously-included directories found matching 'doc/_spell'
  no previously-included directories found matching 'tests/eggsrc/build'
  adding license file 'LICENSE.txt'
  writing manifest file 'coverage.egg-info/SOURCES.txt'
  Copying coverage.egg-info to /Users/ssbarnea/.pyenv/versions/3.11-dev/lib/python3.11/site-packages/coverage-6.4.1-py3.11.egg-info
  running install_scripts
  Installing coverage script to /Users/ssbarnea/.pyenv/versions/3.11-dev/bin
  Installing coverage-3.11 script to /Users/ssbarnea/.pyenv/versions/3.11-dev/bin
  Installing coverage3 script to /Users/ssbarnea/.pyenv/versions/3.11-dev/bin
  writing list of installed files to '/private/var/folders/32/1xrphgzd4xv777syxjtkpdw80000gn/T/pip-record-fivujvk0/install-record.txt'
  Running setup.py install for coverage ... done
Successfully installed coverage-6.4.1

@pfmoore WTDY, does it count as a pip bug? Shouldn't pip install wheel when missing instead of falling back to setup.py? As wheel is not magically installed by default.

PS. Either way, it is still true that removing setup.py would avoid getting this warning and make pip use the pyproject.toml file.

@pfmoore
Copy link

pfmoore commented Jun 10, 2022

@pfmoore WTDY, does it count as a pip bug? Shouldn't pip install wheel when missing instead of falling back to setup.py?

As my previous post shows, it's not obvious that it's a pip bug, as it works on Windows. So my expectation is that it's something in your environment. Pip does install wheel when missing, unless there's command line settings (or configuration) to make it behave differently.

What does pip config list show?

PS. Either way, it is still true that removing setup.py would avoid getting this warning and make pip use the pyproject.toml file.

Not necessarily. If your environment is blocking build isolation somehow, removing setup.py would simply cause pip to fail saying it can't build without the build dependencies.

@ssbarnea
Copy link
Sponsor Author

There is no custom pip config present.

$ pip config list
global.timeout='10'

I tried to use other python versions (like 3.9 from system/brew) and I was not able to reproduce the issue, mainly because coverage already has binary wheels for most platforms and pythons.

The reason why I seen this is because there is no binary wheel for 3.11 and will likely reproduce with any py311. I still think we should do something about it to avoid it, like installing wheel.

@pfmoore
Copy link

pfmoore commented Jun 11, 2022

As I showed, --no-binary coverage allows you to test on other versions of Python. But I think I see why I was confused. You (presumably) have setuptools installed, but not wheel. I had neither setuptools nor wheel installed. This is messy heuristic code in pip that decides when to trigger the legacy install route. I wouldn't worry too much about it, as it is being gradually phased out anyway (PEP 517 builds will be used all the time in the not too distant future anyway).

Sorry for the wasted time, and thanks for your patience.

Coverage works fine under PEP 517 as it stands, but adding a pyproject.toml is a reasonable thing to do (it's a couple of lines):

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

Note that you don't need to include wheel in requires because setuptools will add the extra build dependency itself.

Removing setup.py is not necessary for "full PEP 517 compliance" and is probably more work than necessary. I'm not objecting to the suggestion, just noting that it needs a better justification than "PEP 517 requires it"...

ssbarnea added a commit to ssbarnea/coveragepy that referenced this issue Jun 11, 2022
@ssbarnea
Copy link
Sponsor Author

Interestingly adding the pyproject.toml did uncover other unrelated problems, failure to even install due to greenlet not compiling with python 3.11, found python-greenlet/greenlet#305

PS. I do really appreciate your patience on this, btw feel free to rename or propose a different issue title to make it more appropriate as it is not fully PEP-517. Ditching the setup.py may be long shot, but still nice.

@nedbat
Copy link
Owner

nedbat commented Sep 7, 2022

I've made a pull request: #1447. It didn't have an problem with greenlet, should I be concerned?

@nedbat
Copy link
Owner

nedbat commented Sep 7, 2022

Hmm, I was using greenlet==1.1.2 and it worked, but in the meantime they've released 1.1.3 as requested in python-greenlet/greenlet#305, so all is well I guess.

@nedbat
Copy link
Owner

nedbat commented Sep 13, 2022

This is in commit 447334c.

@nedbat
Copy link
Owner

nedbat commented Sep 17, 2022

Now that I've done this, I can no longer run my test suite while offline. Is there way to run "make clean; tox" while not connected to the internet?

@ssbarnea
Copy link
Sponsor Author

Pip can be used offline, but you probably forgot something. Something that I almost always add inside tox file, is a PIP_DISABLE_VERSION_CHECK=1 to setenv as pip is too aggressive about that.

@layday
Copy link

layday commented Sep 17, 2022

I assume the issue is that pip attempts to install wheel which is not provisioned by venv. You could try downloading wheel ahead of time and setting PIP_NO_INDEX=1 and PIP_FIND_LINKS=/path/to/wheel/dir in your environment.

@nedbat
Copy link
Owner

nedbat commented Sep 17, 2022

This was what I tried: run the test suite once while online, turn off the network, run tox exactly the same again. No cleaning, etc. The second run fails. What am I doing wrong, or what do I have to do differently?

% tox -e py39
py39 develop-inst-noop: /Users/nedbatchelder/coverage/trunk
py39 installed: atomicwrites==1.4.1,attrs==22.1.0,backports.functools-lru-cache==1.6.4,cffi==1.15.1,colorama==0.4.5,-e git+ssh://git@github.com/nedbat/coveragepy.git@5908ca17f844edf8def46ee28fdf5aeeec4257fe#egg=coverage,decorator==5.1.1,distlib==0.3.6,dnspython==2.2.1,eventlet==0.33.1,exceptiongroup==1.0.0rc9,execnet==1.9.0,filelock==3.8.0,flaky==3.7.0,future==0.18.2,gevent==21.12.0,greenlet==1.1.3,hypothesis==6.54.5,importlib-metadata==4.12.0,iniconfig==1.1.1,packaging==21.3,platformdirs==2.5.2,pluggy==1.0.0,py==1.11.0,PyContracts @ https://github.com/slorg1/contracts/archive/c5a6da27d4dc9985f68e574d20d86000880919c3.zip,pycparser==2.21,pyparsing==3.0.9,pytest==7.1.3,pytest-forked==1.4.0,pytest-xdist==2.5.0,qualname==0.1.0,six==1.16.0,sortedcontainers==2.4.0,tomli==2.0.1,typing_extensions==4.3.0,virtualenv==20.16.5,zipp==3.8.1,zope.event==4.5.0,zope.interface==5.4.0
py39 run-test-pre: PYTHONHASHSEED='2791579876'
py39 run-test: commands[0] | python igor.py zip_mods
py39 run-test: commands[1] | python setup.py --quiet build_ext --inplace
py39 run-test: commands[2] | python -m pip install -q -e .
py39 run-test: commands[3] | python igor.py test_with_tracer c
=== CPython 3.9.14 with C tracer (.tox/py39/bin/python) ===
bringing up nodes...
.......................................................................................................x.....x............s...s...................x........ [ 13%]
.........x....................................................s..s...........................................x............................................ [ 26%]
...........................................................................................s.............................................................. [ 39%]
.......................................................................................................................................................... [ 52%]
.................................................................................s........................................................................ [ 65%]
........................................................................................s..................s.......................s...................... [ 79%]
...........................................s.............................................................................................................. [ 92%]
..........................................................s................................                                                                [100%]
1154 passed, 11 skipped, 5 xfailed in 55.63s
py39 run-test: commands[4] | python igor.py remove_extension
py39 run-test: commands[5] | python igor.py test_with_tracer py
Skipping tests with Python tracer: Only one tracer: no Python tracer for CPython
____________________________________________________________________________ summary _____________________________________________________________________________
  py39: commands succeeded
  congratulations :)

Turned off the wifi, then:

% tox -e py39
py39 develop-inst-noop: /Users/nedbatchelder/coverage/trunk
py39 installed: atomicwrites==1.4.1,attrs==22.1.0,backports.functools-lru-cache==1.6.4,cffi==1.15.1,colorama==0.4.5,-e git+ssh://git@github.com/nedbat/coveragepy.git@5908ca17f844edf8def46ee28fdf5aeeec4257fe#egg=coverage,decorator==5.1.1,distlib==0.3.6,dnspython==2.2.1,eventlet==0.33.1,exceptiongroup==1.0.0rc9,execnet==1.9.0,filelock==3.8.0,flaky==3.7.0,future==0.18.2,gevent==21.12.0,greenlet==1.1.3,hypothesis==6.54.5,importlib-metadata==4.12.0,iniconfig==1.1.1,packaging==21.3,platformdirs==2.5.2,pluggy==1.0.0,py==1.11.0,PyContracts @ https://github.com/slorg1/contracts/archive/c5a6da27d4dc9985f68e574d20d86000880919c3.zip,pycparser==2.21,pyparsing==3.0.9,pytest==7.1.3,pytest-forked==1.4.0,pytest-xdist==2.5.0,qualname==0.1.0,six==1.16.0,sortedcontainers==2.4.0,tomli==2.0.1,typing_extensions==4.3.0,virtualenv==20.16.5,zipp==3.8.1,zope.event==4.5.0,zope.interface==5.4.0
py39 run-test-pre: PYTHONHASHSEED='400962076'
py39 run-test: commands[0] | python igor.py zip_mods
py39 run-test: commands[1] | python setup.py --quiet build_ext --inplace
py39 run-test: commands[2] | python -m pip install -q -e .
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x1055c0f40>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/setuptools/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x105a4a190>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/setuptools/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x105a4aeb0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/setuptools/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x105d68ee0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/setuptools/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x105d68a30>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/setuptools/
      ERROR: Could not find a version that satisfies the requirement setuptools (from versions: none)
      ERROR: No matching distribution found for setuptools
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: InvocationError for command /Users/nedbatchelder/coverage/trunk/.tox/py39/bin/python -m pip install -q -e . (exited with code 1)
____________________________________________________________________________ summary _____________________________________________________________________________
ERROR:   py39: commands failed

@ssbarnea
Copy link
Sponsor Author

I suspect that this might be caused by either virtualenv or venv.

For example virtualenv has some optional flags --no-download and --never-download, which I am unable to see any for venv, but at the same time, AFAIK venv itself with not go online.

Try venv(s) first, to rule them out.

@pfmoore
Copy link

pfmoore commented Sep 18, 2022

The problem is that pip is building the project (the python -m pip install -q -e . command) in an isolated environment. That's a newly created environment where everything gets installed from scratch. You are offline, so pip can't get setuptools and wheel from PyPI.

What you need to do is download wheels for setuptools and wheel from PyPI, and store them somewhere local. Then, when you're offline, set the envrionment variable PIP_FIND_LINKS to the path of the directory you stored those links in. You may also need to set PIP_NO_INDEX to 1, to stop pip tring PyPI. Those environment variables will be inherited by the build process, so the build will use your local wheels, and not go looking for PyPI to get them.

You may need to tell tox to pass the PIP_* environment variables through to the test command, I think it clears out the environment by default.

@nedbat
Copy link
Owner

nedbat commented Sep 29, 2022

This is now released as part of coverage 6.5.0.

@nedbat nedbat closed this as completed Sep 29, 2022
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Nov 8, 2022
Version 6.5.0 — 2022-09-29
--------------------------

- 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 1395: nedbat/coveragepy#1395
.. _issue 1425: nedbat/coveragepy#1425
.. _pull 1438: nedbat/coveragepy#1438
.. _issue 1449: nedbat/coveragepy#1449
allenporter pushed a commit to allenporter/flux-local that referenced this issue 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:[nedbat/coveragepy#1347
.. \_issue
972[nedbat/coveragepy#972
.. \_issue
131[nedbat/coveragepy#1319
.. \_issue
15[nedbat/coveragepy#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:[nedbat/coveragepy#1524

.. \_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:[nedbat/coveragepy#1527

.. \_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:[nedbat/coveragepy#1522

.. \_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:[nedbat/coveragepy#1515
.. \_issue
1516[nedbat/coveragepy#1516
.. \_issue
151[nedbat/coveragepy#1519

.. \_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:[nedbat/coveragepy#1510
.. \_issue
1511[nedbat/coveragepy#1511
.. \_issue
151[nedbat/coveragepy#1512
.. \_issue
15[nedbat/coveragepy#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[nedbat/coveragepy#1395
.. \_issue
14[nedbat/coveragepy#1425
.. \_issue
1[nedbat/coveragepy#1449
.. \_pull
[nedbat/coveragepy#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:[nedbat/coveragepy#972
.. \_issue
1428[nedbat/coveragepy#1428
.. \_pull
134[nedbat/coveragepy#1347
.. \_pull
14[nedbat/coveragepy#1403
.. \_pull
1[nedbat/coveragepy#1405
.. \_pull
[nedbat/coveragepy#1413
..
\_pull[nedbat/coveragepy#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request install question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants