Skip to content

Add send_file from Flask#1850

Merged
davidism merged 1 commit intopallets:masterfrom
MLH-Fellowship:kx-chen/265-send-file
Jul 12, 2020
Merged

Add send_file from Flask#1850
davidism merged 1 commit intopallets:masterfrom
MLH-Fellowship:kx-chen/265-send-file

Conversation

@kx-chen
Copy link
Copy Markdown
Contributor

@kx-chen kx-chen commented Jun 16, 2020

Closes #265

@kx-chen kx-chen changed the title Port send_file from Flask Add send_file from Flask Jun 16, 2020
@kx-chen kx-chen force-pushed the kx-chen/265-send-file branch from a60cc5f to 3dfcf0b Compare June 17, 2020 00:04
@kx-chen
Copy link
Copy Markdown
Contributor Author

kx-chen commented Jun 17, 2020

Should be easier to review now. 03f3fa5 is the function directly from flask, and 3dfcf0b shows most of the changes that were made to it.

@kx-chen kx-chen marked this pull request as ready for review June 17, 2020 23:47
Comment thread src/werkzeug/wsgi.py Outdated
@kx-chen kx-chen force-pushed the kx-chen/265-send-file branch from be408be to 30138ad Compare June 18, 2020 00:08
Comment thread src/werkzeug/wsgi.py Outdated
Comment thread src/werkzeug/wsgi.py Outdated
Comment thread src/werkzeug/wsgi.py Outdated
@kx-chen kx-chen force-pushed the kx-chen/265-send-file branch 2 times, most recently from 897118e to 368b5d3 Compare June 18, 2020 18:36
@davidism davidism force-pushed the kx-chen/265-send-file branch from 368b5d3 to cf9a24b Compare June 29, 2020 14:30
@kx-chen
Copy link
Copy Markdown
Contributor Author

kx-chen commented Jul 2, 2020

Apologies for the lack of progress on this. Will be taking a look and fixing it up more tomorrow.

@davidism
Copy link
Copy Markdown
Member

davidism commented Jul 2, 2020

No worries, I'm actually preparing this for merge right now, I don't think there's anything else you need to do.

@davidism davidism force-pushed the kx-chen/265-send-file branch from cf9a24b to fc6950e Compare July 3, 2020 02:58
* copy send_file from Flask
* move Flask-specific config into parameters
* copy tests
* update docs

Co-authored-by: Rodrigo Medina <rodrigo.medina.neri@gmail.com>
@davidism davidism force-pushed the kx-chen/265-send-file branch from fc6950e to 80d173d Compare July 12, 2020 23:50
@davidism
Copy link
Copy Markdown
Member

After some more thought, I realized this didn't belong in wsgi.py, moved it to utils.py for now. Might make a dedicated response_helpers module later. Removed the root_path code, applied some minor cleanup, reorganized the tests in their own file, added a changelog, and completely rewrote the docs. There's other cleanup I want to do to take advantage of having a new start here, but I'll save that for other PRs.

@davidism davidism added this to the 2.0.0 milestone Jul 12, 2020
@davidism davidism merged commit 11f0a8a into pallets:master Jul 12, 2020
@davidism davidism deleted the kx-chen/265-send-file branch July 12, 2020 23:54
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2020
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.

Add something like Flask's send_file to Werkzeug

2 participants