-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fallback for platform who don't have SpooledTemporaryFile #1220
Conversation
Confirmed this fixes my particular case in GoogleCloudPlatform/python-docs-samples#1266
|
Closed in favor of #1222 which correctly handles chunked requests. |
@mitsuhiko I don't understand why open a new PR which has pretty much the same code instead of commenting on this PR. |
Not sure what would have been the value of commenting on the PR and waiting for feedback instead of just fixing the bug. |
@mitsuhiko I would image that the open source movement will look totally different if every external contribution PR will be just taken for source value and pasted by the maintainer instead of guiding. And on a different note: I think this PR need to enter into a 0.13.1 state, currently every flask AppEngine Standard is broken upon updating the packages and freezing flask won't help. Everyone is going to discover this issue the hard way (read in production). |
I'm sorry I really don't understand what I did wrong here. There won't be a 0.13 but I will push out a 0.14 today or tomorrow most likely. |
IMO fixing a small thing you notice in a PR is much faster than pinging the original author of a PR - especially if you already know the fix. When having the PR's author fix it, you either need to mention exactly how it should be fixed (and then it's faster to just write it yourself) or you just mention the problem with the current code (then it may take much longer in the end for the PR to be correct). The only thing I would have done differently is adding another commit to the PR's branch in @erlichmen's fork (I believe "allow maintainers to push" is enabled by default for PRs nowadays) instead of creating a completely new PR. Like this the original credit of the change remains. FWIW, for a small change like this I'd probably just amend the original commit and not even bother adding another commit, but I think that's mostly a matter of opinion (I guess some people might not like their commits being amended by others). |
I did not even know that is a thing. |
To be clear I also think that it’s better to fix than to wait on the OP to
do the change, but doing a second commit is the way to go as it give credit
to all parties involved.
…On Thu, 28 Dec 2017 at 22:47 Armin Ronacher ***@***.***> wrote:
The only thing I would have done differently is adding another commit to
the PR's branch
I did not even know that is a thing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1220 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAqObwPXCWsL-W9Z2jD6hbaNcKASkqCeks5tE_5UgaJpZM4RNXRX>
.
|
@mitsuhiko for future reference, you can either push to PR branches now, or if you needed to create a separate PR you can still base it off the commits from this one. @erlichmen sorry for the confusion, we still really appreciate your contribution! 👍 |
@@ -11,7 +11,14 @@ | |||
""" | |||
import re | |||
import codecs | |||
from tempfile import SpooledTemporaryFile | |||
try: | |||
from tempfile import SpooledTemporaryFile |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Dev server is not 100% same as GAE production, this fix indeed triggers
only under production.
…On Mon, 12 Mar 2018 at 16:09 Justin Krause ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In werkzeug/formparser.py
<#1220 (comment)>:
> @@ -11,7 +11,14 @@
"""
import re
import codecs
-from tempfile import SpooledTemporaryFile
+try:
+ from tempfile import SpooledTemporaryFile
but—huge thanks to whoever did this work to ensure compatibility with GAE.
you're a lifesaver.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1220 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAqObwqKqKe5loW-UP3w3Y0jQzR2XKiZks5tdwAfgaJpZM4RNXRX>
.
|
On AppEngine SpooledTemporaryFile is not supported, this PR will fallback to the old code when SpooledTemporaryFile is not supported on the platform (As discussed on #1210)