-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Add a python 3.11 storage app for App Engine Flex. #9251
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
Conversation
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
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.
LGTM. See comments, but they are just advice.
operating_system: "ubuntu22" | ||
# We also support 3.8, 3.9 and 3.10. | ||
# See https://cloud.google.com/appengine/docs/flexible/python/runtime#interpreter for more info. | ||
runtime_version: "3.11" |
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.
I'd put this above the comment, since otherwise it looks like the comment is talking about ubuntu versions, not python ones.
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.
I rearranged them. The operating_system could go after.
# We also support 3.8, 3.9 and 3.10.
# See https://cloud.google.com/appengine/docs/flexible/python/runtime#interpreter for more info.
runtime_version: "3.11"
operating_system: "ubuntu22"
|
||
#[START gae_flex_storage_yaml] | ||
env_variables: | ||
CLOUD_STORAGE_BUCKET: your-bucket-name |
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.
Perhaps [your-bucket-name] instead, as shown in the README for running locally. It draws attention to the need to edit the value.
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.
Done.
@@ -0,0 +1,2 @@ | |||
pytest==7.0.1 | |||
google-cloud-storage==2.1.0; python_version > '3.6' |
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.
Since you aren't allowing versions less than 3.7 anyway, the "; python_version > '3.6." isn't really needed. There's no alternate requirement for lower Python version.
from google.cloud import storage | ||
import pytest | ||
import requests | ||
from six import BytesIO |
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.
Why not just use io.BytesIO? There's no need to support older Python versions here.
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.
Good catch. I'm changing it to io.BytesIO.
* Add a python 3.11 storage app for App Engine Flex. * This is a python 3.11 sample app. Remove references to other versions. * Update header. * Update the tag and copyright header. * Address PR comments. Remove references and usage of older python versions. * Fix an import issue. * Fix lint. --------- Co-authored-by: Maciej Strzelczyk <strzelczyk@google.com>
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
nox -s py-3.9
(see Test Environment Setup)nox -s lint
(see Test Environment Setup)