Skip to content

Coverage misses with Python 3.10 #1187

Closed
@warsaw

Description

@warsaw

Describe the bug
I think there are still Python 3.10 compatibility problems, despite #1184 and #1106 and possibly other bugs. When testing flufl.lock against Python 3.10 (in CI and locally), I'm seeing line misses only in Python 3.10. These misses still appear to exist after testing locally with CPython 3.10 head and coveragepy head.

To Reproduce

  1. git clone https://gitlab.com/warsaw/flufl.lock.git
  2. cd flufl.lock
  3. git switch qa
  4. tox -e py39 -e py310

Expected behavior (Python 3.9)

---------- coverage: platform darwin, python 3.9.6-final-0 -----------
Name                      Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------------
flufl/lock/__init__.py        5      0      0      0   100%
flufl/lock/_lockfile.py     251      0     70      0   100%
---------------------------------------------------------------------
TOTAL                       256      0     70      0   100%
Coverage XML written to file coverage.xml

Actual behavior (Python 3.10)

---------- coverage: platform darwin, python 3.10.0-beta-4 -----------
Name                      Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------------
flufl/lock/__init__.py        5      0      0      0   100%
flufl/lock/_lockfile.py     253      0     70      3    99%   412->415, 418->420, 535->exit
---------------------------------------------------------------------
TOTAL                       258      0     70      3    99%
Coverage XML written to file coverage.xml

FAIL Required test coverage of 100.0% not reached. Total coverage: 99.09%

From local testing the lines are covered AFAICT, so there should be no functional difference between 3.9 and 3.10. The commonality is that these are conditionals inside try/excepts with raises in the true branch of the conditional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcpythonReported as a bug in CPythonfixed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions