Skip to content

Commit

Permalink
chore: Merge branch 'main' into fix-cloud-sql-env-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon committed Jan 22, 2025
2 parents 1d53d17 + 72190ce commit 95a6d8a
Show file tree
Hide file tree
Showing 128 changed files with 262 additions and 275 deletions.
2 changes: 1 addition & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ branchProtectionRules:
- "Kokoro CI - Lint"
- "Kokoro CI - Python 2.7 (App Engine Standard Only)"
- "Kokoro CI - Python 3.8"
- "Kokoro CI - Python 3.12"
- "Kokoro CI - Python 3.13"
- "cla/google"
- "snippet-bot check"
# List of explicit permissions to add (additive only)
Expand Down
2 changes: 1 addition & 1 deletion alloydb/notebooks/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
"ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": True,
Expand Down
2 changes: 1 addition & 1 deletion appengine/flexible/django_cloudsql/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
"ignored_versions": ["2.7", "3.7", "3.9", "3.10", "3.12"],
"ignored_versions": ["2.7", "3.7", "3.9", "3.10", "3.12", "3.13"],
# An envvar key for determining the project id to use. Change it
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
# build specific Cloud project. You can also use your own string
Expand Down
4 changes: 2 additions & 2 deletions appengine/flexible/django_cloudsql/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Django==5.1.4; python_version >= "3.10"
Django==4.2.17; python_version >= "3.8" and python_version < "3.10"
Django==5.1.5; python_version >= "3.10"
Django==5.1.5; python_version >= "3.8" and python_version < "3.10"
gunicorn==22.0.0
psycopg2-binary==2.9.10
django-environ==0.11.2
Expand Down
6 changes: 3 additions & 3 deletions appengine/flexible/hello_world_django/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django==5.1.4; python_version >= "3.10"
Django==4.2.17; python_version >= "3.8" and python_version < "3.10"
Django==3.2.25; python_version < "3.8"
Django==5.1.5; python_version >= "3.10"
Django==5.1.5; python_version >= "3.8" and python_version < "3.10"
Django==5.1.5; python_version < "3.8"
gunicorn==22.0.0
2 changes: 1 addition & 1 deletion appengine/flexible/numpy/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.7", "3.12"],
"ignored_versions": ["2.7", "3.7", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
2 changes: 1 addition & 1 deletion appengine/flexible/scipy/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
"ignored_versions": ["2.7", "3.7", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.7", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Django==5.1.4; python_version >= "3.10"
Django==4.2.17; python_version >= "3.8" and python_version < "3.10"
Django==3.2.25; python_version < "3.8"
Django==5.1.5; python_version >= "3.10"
Django==5.1.5; python_version >= "3.8" and python_version < "3.10"
Django==5.1.5; python_version < "3.8"
gunicorn==22.0.0
psycopg2-binary==2.9.10
django-environ==0.11.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django==5.1.4; python_version >= "3.10"
Django==4.2.17; python_version >= "3.8" and python_version < "3.10"
Django==3.2.25; python_version < "3.8"
Django==5.1.5; python_version >= "3.10"
Django==5.1.5; python_version >= "3.8" and python_version < "3.10"
Django==5.1.5; python_version < "3.8"
gunicorn==22.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
# Skipping for Python 3.9 due to pyarrow compilation failure.
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
43 changes: 16 additions & 27 deletions appengine/standard/images/guestbook/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,29 @@
For more information, see README.md.
"""

# [START all]

# [START gae_images_guestbook_all]
import cgi
import urllib

# [START import_images]
# [START gae_images_guestbook_import_images]
from google.appengine.api import images
# [END gae_images_guestbook_import_images]

# [END import_images]
from google.appengine.api import users
from google.appengine.ext import ndb

import webapp2


# [START model]
# [START gae_images_guestbook_model]
class Greeting(ndb.Model):
"""Models a Guestbook entry with an author, content, avatar, and date."""

author = ndb.StringProperty()
content = ndb.TextProperty()
avatar = ndb.BlobProperty()
date = ndb.DateTimeProperty(auto_now_add=True)


# [END model]
# [END gae_images_guestbook_model]


def guestbook_key(guestbook_name=None):
Expand All @@ -67,16 +64,16 @@ def get(self):
self.response.out.write("<b>%s</b> wrote:" % greeting.author)
else:
self.response.out.write("An anonymous person wrote:")
# [START display_image]
# [START gae_images_guestbook_display_image]
self.response.out.write(
'<div><img src="/img?img_id=%s"></img>' % greeting.key.urlsafe()
)
self.response.out.write(
"<blockquote>%s</blockquote></div>" % cgi.escape(greeting.content)
)
# [END display_image]
# [END gae_images_guestbook_display_image]

# [START form]
# [START gae_images_guestbook_form]
self.response.out.write(
"""
<form action="/sign?%s"
Expand All @@ -99,10 +96,10 @@ def get(self):
cgi.escape(guestbook_name),
)
)
# [END form]
# [END gae_images_guestbook_form]


# [START image_handler]
# [START gae_images_guestbook_image_handler]
class Image(webapp2.RequestHandler):
def get(self):
greeting_key = ndb.Key(urlsafe=self.request.get("img_id"))
Expand All @@ -112,12 +109,10 @@ def get(self):
self.response.out.write(greeting.avatar)
else:
self.response.out.write("No image")
# [END gae_images_guestbook_image_handler]


# [END image_handler]


# [START sign_handler]
# [START gae_images_guestbook_sign_handler]
class Guestbook(webapp2.RequestHandler):
def post(self):
guestbook_name = self.request.get("guestbook_name")
Expand All @@ -128,24 +123,18 @@ def post(self):

greeting.content = self.request.get("content")

# [START sign_handler_1]
avatar = self.request.get("img")
# [END sign_handler_1]
# [START transform]
# [START gae_images_guestbook_transform]
avatar = images.resize(avatar, 32, 32)
# [END transform]
# [START sign_handler_2]
# [END gae_images_guestbook_transform]
greeting.avatar = avatar
greeting.put()
# [END sign_handler_2]

self.redirect("/?" + urllib.urlencode({"guestbook_name": guestbook_name}))


# [END sign_handler]
# [END gae_images_guestbook_sign_handler]


app = webapp2.WSGIApplication(
[("/", MainPage), ("/img", Image), ("/sign", Guestbook)], debug=True
)
# [END all]
# [END gae_images_guestbook_all]
5 changes: 5 additions & 0 deletions appengine/standard/mailjet/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# pin pytest to 4.6.11 for Python2.
pytest==4.6.11; python_version < '3.0'

responses==0.17.0; python_version < '3.7'
responses==0.23.1; python_version > '3.6'

# pytest==8.3.4 and six==1.17.0 for Python3.
pytest==8.3.4; python_version >= '3.0'
six==1.17.0
2 changes: 0 additions & 2 deletions appengine/standard/mailjet/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
<title>Mailjet on Google App Engine</title>
</head>
<body>
<!-- [START form] -->
<form method="post" action="/send/email">
<input type="text" name="to" placeholder="Enter recipient email">
<input type="submit" name="submit" value="Send email">
</form>
<!-- [END form] -->
</body>
</html>
Loading

0 comments on commit 95a6d8a

Please sign in to comment.