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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice if
Responsecould 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.HTTPStatusErroris raised in a task. This results inThe issue here is that
httpx.HTTPStatusErrortakes aResponseinstance 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