Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

add code to copy read stream data into a SpooledTemporaryFile#8101

Closed
thrau wants to merge 1 commit into
masterfrom
asgi-stream-copy
Closed

add code to copy read stream data into a SpooledTemporaryFile#8101
thrau wants to merge 1 commit into
masterfrom
asgi-stream-copy

Conversation

@thrau
Copy link
Copy Markdown
Member

@thrau thrau commented Apr 9, 2023

🚧 Work in progress

This PR adds a copying behavior to the underlying stream we plug into the werkzeug request object. This allows us to later restore the payload without having to call the procedure in restore_payload.

Requires

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage: 81.995% (-0.02%) from 82.02% when pulling df60326 on asgi-stream-copy into ed7e02f on master.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2023

LocalStack integration with Pro

1 894 tests  ±0   1 697 ✔️ ±0   1h 42m 47s ⏱️ + 5m 45s
       1 suites ±0      197 💤 ±0 
       1 files   ±0          0 ±0 

Results for commit df60326. ± Comparison against base commit ed7e02f.

@thrau thrau added this to the Playground milestone Jul 13, 2023
@thrau
Copy link
Copy Markdown
Member Author

thrau commented Feb 24, 2024

i'm abandoning this stream of work because i couldn't make it work properly, also, the code now sits in rolo.
reading from the socket and writing into another would have been the efficient proxying behavior we were looking for, but there were some issues with asyncio i couldn't get to the bottom of. basically, piping data this way didn't work because it was blocking the eventloop.

i think we should instead invest some time to get rid of asyncio all together by exploring alternatives like twisted #9834.

@thrau thrau closed this Feb 24, 2024
@alexrashed alexrashed deleted the asgi-stream-copy branch October 30, 2024 10:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants