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

Line incorrectly reported as uncovered in python 3.11 involving asyncio.to_thread and a conditional #1792

Open
atom-andrew opened this issue May 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@atom-andrew
Copy link

Describe the bug
In python 3.11. there I've found a case involving a conditional statement and multiple asyncio.to_thread invocations that causes a line to be reported as uncovered. The problem seems to be a regression from python 3.10 to python 3.11.0 and was fixed in python 3.12.0.

To Reproduce
How can we reproduce the problem? Please be specific. Don't link to a failing CI job. Answer the questions below:

  1. What version of Python are you using?
    3.11

  2. What version of coverage.py shows the problem? The output of coverage debug sys is helpful.
    7.5.1

  3. What versions of what packages do you have installed? The output of pip freeze is helpful.
    n/a

  4. What code shows the problem? Give us a specific commit of a specific repo that we can check out. If you've already worked around the problem, please provide a commit before that fix.
    See https://github.com/atom-computing/coverage-failure/blob/main/example.py#L21

  5. What commands should we run to reproduce the problem? Be specific. Include everything, even git clone, pip install, and so on. Explain like we're five!
    Clone https://github.com/atom-computing/coverage-failure with python 3.11 installed and run tox.
    In the workflow at https://github.com/atom-computing/coverage-failure/actions/runs/9244341369/job/25429518754, you can see that python 3.11 reports reduced coverage vs 3.10. and 3.12.

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

@atom-andrew atom-andrew added bug Something isn't working needs triage labels May 26, 2024
@atom-andrew atom-andrew changed the title Line incorrectly reported as uncovered in python 3.11 involving asyncio.to_thread and a conditionall Line incorrectly reported as uncovered in python 3.11 involving asyncio.to_thread and a conditional Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants