-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
TypeError on Python 3.11.0b1 with coverage 6.3.3 #1376
Comments
@domdfcoding That's very odd, I haven't seen something like that. Do you have other files in the current directory? Can you run |
Also, there are no wheels for 3.11.0b1, so at best you downloaded the sdist from PyPI. Can you provide more details? |
I have the same error. You can see it here: https://gitlab.com/merchise-autrement/xotl.plato/-/jobs/2639831211 The tests are run with
|
Using the image |
I have a same issue here with 3.11.0b4: https://github.com/csernazs/pytest-httpserver/runs/7326218373?check_suite_focus=true |
@csernazs can you provide instructions for me to reproduce the issue? |
Hi, For pytest-httpserver, I could reproduce it with creating a
Then if I run:
It reproduces the issue. The point here is that I have a lot of dependencies there (for pytest-httpserver), and if I create a small venv (without pytest-httpserver) I can't reproduce the issue. So the following works for me:
where p.py is a trivial hello world:
For me it seems that the availability of other packages in the venv might affect the bug. |
It is also interesting that if I run coverage on the trivial
Then it prints a strange pattern to the stdout:
|
For me, my problem was that poetry installed an older coverage package, and that was not working with python 3.11. I'm sorry for the false alarm. |
Yes, poetry installed 6.2 because your project supports Python 3.6, and 6.2 is the latest coverage.py version that also supports 3.6. |
This dependency spec seems to help, when using [tool.poetry.group.test.dependencies]
pytest = "^7.0.0"
pytest-cov = "^4.0.0"
coverage = [
{ extras = [
"toml",
], version = "^6.0", python = ">=3.6,<3.7" },
{ extras = [
"toml",
], version = ">=6.5", python = ">=3.7" },
] |
Describe the bug
When running coverage 6.3.3 on Python 3.11.0b1 the program immediately exits with:
To Reproduce
How can we reproduce the problem? Please be specific. Don't link to a failing CI job. Answer the questions below:
coverage debug sys
is helpful.pip freeze
is helpful.coverage==6.3.3
coverage run t.py
(t.py
is empty.)Expected behavior
Coverage runs without error.
Additional context
Full output:
Line 323 in
inorout.py
callsoriginal_filename.startswith('<')
. Debugging with pdb, I can see thatoriginal_filename
isb' '
(a bytestring containing only a space).I can't reproduce this issue if I build coverage from source, only if I install the wheel from PyPI.
The text was updated successfully, but these errors were encountered: