Skip to content
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

Add send_file from Flask #1850

Merged
merged 1 commit into from
Jul 12, 2020

Conversation

kx-chen
Copy link
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
Copy link
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
src/werkzeug/wsgi.py Outdated Show resolved Hide resolved
src/werkzeug/wsgi.py Outdated Show resolved Hide resolved
src/werkzeug/wsgi.py Outdated Show resolved Hide resolved
src/werkzeug/wsgi.py Outdated Show resolved Hide resolved
@kx-chen
Copy link
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
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.

* 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
Copy link
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