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
Latest version of Werkzeug raises ImportError #1266
Conversation
The latest version of Werkzeug (0.13) released on December 7th raises an ImportError when Flask is imported on app engine. ```ImportError: cannot import name SpooledTemporaryFile``` App engine standard does not support SpooledTemporaryFile, so we should explicitly instruct users to install Werkzeug==0.12.2 (last working version).
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
The latest version of Werkzeug (0.13) released on December 7th raises an ImportError when Flask is imported on app engine. ```ImportError: cannot import name SpooledTemporaryFile``` App engine standard does not support SpooledTemporaryFile, so we should explicitly instruct users to install Werkzeug==0.12.2 (last working version).
CLAs look good, thanks! |
@@ -1 +1,2 @@ | |||
Werkzeug==0.12.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To prevent our auto-updating script from messing with this, can you change it to a range? (& also add a note as to why we pin it)
Werkzeug<=0.13
Do you mind filing a bug on Werkzeug for this? |
Thanks, @awonak! |
There is an issue over in Werkzeug. If they do revert back to |
Is there a reason |
I read https://cloud.google.com/appengine/docs/standard/python/runtime#customized-libraries-in-python-version-27. Is there a way for GCP to more comprehensively monkeypatch the |
@davidism thanks for jumping in. :)
App Engine Standard is heavily sandboxed and currently blocks all access to the filesystem. It's technically possible that we can emulate that with an in-memory file, but doing such changes is really difficult for us at the moment. We're working on some under-the-covers changes to our runtime environment that will make it easier for us to get closer to a unforked experience and those will hopefully land early in the new year, so, if you want to say "no", that's perfectly acceptable.
The rest of GCP (App Engine flex, GCE, GKE) is fine it's just the sandboxed standard environment. I helped set up testing against GAE standard for urllib3 and I'm happy to do the same with Werkzeug if you want- but this is another case where it might be better to just wait for our changes that fix some of the deviation from the standard library (ideally, if it passes generic Python 2.7 it should work in GAE standard). |
The latest version of Werkzeug (0.13) released on December 7th raises an ImportError when Flask is imported on app engine.
ImportError: cannot import name SpooledTemporaryFile
App engine standard does not support SpooledTemporaryFile, so we should explicitly instruct users to install Werkzeug==0.12.2 (last working version).