-
Notifications
You must be signed in to change notification settings - Fork 590
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
Get traceback-trimming working under Python 3.11 #3298
Comments
I will give this a go :-) |
@Zac-HD I think this is cause by the difference in tracestack in 3.10 and 3.11: 3.10:
3.11:
as you see in 3.11 the stack quickly go to exit in python 3.11 contextlib.py itself which causes the check in the So what do you think? shall we trim the exit in 3.11 as well (which we just need to add extras in the check) or is there any nicer way to treat it? |
Yeah, let's do it! Specifically, trim frames from I also considered replacing the |
Oh also one thing that bugs me a lot, why we have a |
By the way, I wonder if the contextlib exit stuff will still exist after 3.11 release? (currently at alpha) cause it seems it can still vary a lot (e.g. adding the tomllib) when realse. See psf/black#2983 It seems to me that it is weird that the stacktrace of contextlib is there and I am thinking that it may got removed when 3.11 is released. If so, this will be automatically fix isn't it?
|
I have created the PR anyway, if the problem still exist next week when it got release we are ready. |
We can also just ask some core devs at the sprints if this is intentional - and either handle it in Hypothesis if it is, or try to get it fixed+tested in CPython if it's not 🙂 |
Yes I love this idea, let's see tomorrow (or today if they are around) |
Or we can just open an issue there, someone will have an answer. |
Go for it, and tag me + reference this issue? |
Closing this in favor of python/cpython#92202; I'll remove the test-skips when we start running beta1 in CI. |
Follow-up to #3294 - if we remove the workarounds in
conftest.py
, two tests fail:After brief investigation, it looks like this is a a real change that we'll need to adapt our code to; and since traceback-trimming is pretty important to our user's experience I'd like to ship that well before 3.11.0 final.
The text was updated successfully, but these errors were encountered: