-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
INTERNALERROR> SystemError: AST constructor recursion depth mismatch (before=78, after=133) #11724
Comments
We have isolated it comes from the |
And it seems to have to do with
|
This is weird. Any chance you can share the actual code? What version of coverage do you have installed? About the CI, can you check the precise versions of Python and the packages you are using? |
even in CI, we run the tests in a container, so should be the same... perhaps semaphore is using something different 🤔 I can't explain it
|
We have 2 places we use match/case
and
|
Note to future error googlers: We're seeing this same exception despite not even using We do have a few Notes on |
Nice find, this worked for me as a workaround too |
@dpritchett-rebellion should this issue be moved to the main project to get the attention it needs? |
I was facing this same error too with PyTest on Python 3.11.7. The exact same PyTest version and test suite on Python versions 3.8, 3.9 & 3.10 did not have this issue. I am using pytest-cov, but disabling it did not seem to help. For me, adding I spent some time trying to figure out what the actual problem was and trying different combinations, but didn't want to spend too much time.
|
I encountered this problem today and I'm pretty sure the cause is a bug in the parser of cpython itself (python/cpython#106905), which has been around in that form in python3.11 releases since 3.11.0b4 up to and including 3.11.7. But this bug has now been fixed though, and indeed, for me, switching from 3.11.7 to a post-3.11.7 build has removed the issue. That bugfix is also listed already in the announcement for the next 3.11 release Hope this helps! |
Thank you @brianzi! This does indeed seem to be an upstream CPython bug, which has been fixed and released in 3.11.8. |
Summary
We are seeing a very weird error in which coverage runs with html outputs are raising this
INTERNALERROR
executed command and options:
Error traceback
We also cannot reproduce locally, only on CI (semaphore), very strange.
Expected vs actual result
I would expect the coverage not to raise this error. However I am not entirely convinced it is a bug, and not a config issue. Please educate me.
Reproducer
Versions
Output of relevant packages
pip list
,python --version
,pytest --version
etc.Make sure you include complete output of
tox
if you use it (it will show versions of various things).Config
Include your
tox.ini
,pytest.ini
,.coveragerc
,setup.cfg
or any relevant configuration.Code
Link to your repository, gist, pastebin or just paste raw code that illustrates the issue.
If you paste raw code make sure you quote it, eg:
The text was updated successfully, but these errors were encountered: