Replies: 4 comments 2 replies
-
The code that closed that |
Beta Was this translation helpful? Give feedback.
-
I think this is quite interesting, especially thanks to pointers from @simonw. I didn't know about the @tomchristie Is this an example of promoting this to a proper issue? |
Beta Was this translation helpful? Give feedback.
-
I had a look at implementing a
|
Beta Was this translation helpful? Give feedback.
-
Presumably we want both Implementation-wise we may well want to wait until after #1550 is resolved, as well as a follow-up that also removes
If a response is pickled, then we want to pickle it in the same state in which it was currently in, but the response should always be restored in a closed state. |
Beta Was this translation helpful? Give feedback.
-
It would be nice if
Response
could be made picklable. This would make it play nicer with the multiprocessing module. I noticed this in celery using the prefork pool when a unhandledhttpx.HTTPStatusError
is raised in a task. This results inThe issue here is that
httpx.HTTPStatusError
takes aResponse
instance in__init__
and this makes it unpicklable.Trying to pickle a response directly fails like this:
I found a similar discussion on psf/requests#1367
Beta Was this translation helpful? Give feedback.
All reactions