-
-
Notifications
You must be signed in to change notification settings - Fork 718
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
test_deeply_nested_structures Failed: DID NOT RAISE <class 'TypeError'> with python3.12 #8700
Comments
playing around with this a bit on Python 3.13, yeah, I just can't get it to hit the codepath the test expects. Using anything from
and goes through thousands of calls to
which isn't the exception the test expects. No value seems to send the test down the path it expects to be on, where we get past that, but hit an exception other than |
It's worth noting that in this comment, @fjetter describes the test as "not super useful" and says the point of this part is really to test that if "we are hitting such an error, we're raising/ignoring it according to on_error". So we could just change this part of the test so we somehow force or mock out one of the serialization families to raise an exception, instead of trying to use an operation that we think will result in that happening 'naturally'. wdyt? |
Hi Adam,
It took me some time wrapping my head around answering, because
I did not really understand the purpose of the test initially
(and naked truth is: I'm still not confident that I understood).
Honestly, I'm wondering integration questions like: "what user
expectation is broken if the serialize function does not raise
TypeError when nearing RecursionError conditions?"
So, to your question:
It's worth noting that in [this
comment](https://github.com/dask/distributed/pull/7580/files#r1129355026),
@fjetter describes the test as "not super useful" and says the
point of this part is really to test that if "we are hitting
such an error, we're raising/ignoring it according to
on_error". So we could just change this part of the test so we
somehow force or mock out one of the serialization families to
raise an exception, instead of trying to use an operation that
we think will result in that happening 'naturally'. wdyt?
I concur with your idea of finding a more reliable way to trip
the TypeError raise. If the new way does not stress the stack
of the interpreter, it may even be possible to remove the test
skip on Windows. Naive me would have suggested trying to run
full steam ahead into the RecursionError, but I'm under the
impression this is not an option. Maybe you have much workable
ideas in mind, I let you to them. Thanks for your investigation
this far!
Have a nice day, :)
Étienne.
|
Describe the issue:
While working on dask distributed packaging in Debian sid, I encountered a test error affecting test_deeply_nested_structures, which seems to stem from serialize not behaving as expected.
Minimal Complete Verifiable Example:
Anything else we need to know?:
The test passes with Python 3.11.9, no problem, so something has changed in 3.12. While investigating whether the present issue would be a duplicate, I found out the way serialize was supposed to have its implementation for raising TypeError already adjusted for Python 3.12 (see change in distributed/protocol/serialize.py change introduced in merge request #8223), so this looks quite recent.
Environment:
The text was updated successfully, but these errors were encountered: