diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index d56cb1380630..72feb31a500b 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -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) diff --git a/alloydb/notebooks/noxfile_config.py b/alloydb/notebooks/noxfile_config.py index b12448e7fbe2..f5bc1ea9e2f0 100644 --- a/alloydb/notebooks/noxfile_config.py +++ b/alloydb/notebooks/noxfile_config.py @@ -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, diff --git a/appengine/flexible/django_cloudsql/noxfile_config.py b/appengine/flexible/django_cloudsql/noxfile_config.py index a3234e2e0aab..8bf4a236ee53 100644 --- a/appengine/flexible/django_cloudsql/noxfile_config.py +++ b/appengine/flexible/django_cloudsql/noxfile_config.py @@ -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 diff --git a/appengine/flexible/django_cloudsql/requirements.txt b/appengine/flexible/django_cloudsql/requirements.txt index 93f3930eda82..52318f17ab34 100644 --- a/appengine/flexible/django_cloudsql/requirements.txt +++ b/appengine/flexible/django_cloudsql/requirements.txt @@ -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 diff --git a/appengine/flexible/hello_world_django/requirements.txt b/appengine/flexible/hello_world_django/requirements.txt index 7f041f9278d2..5bf2d53f4656 100644 --- a/appengine/flexible/hello_world_django/requirements.txt +++ b/appengine/flexible/hello_world_django/requirements.txt @@ -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 diff --git a/appengine/flexible/numpy/noxfile_config.py b/appengine/flexible/numpy/noxfile_config.py index 157877897134..21d912ad459a 100644 --- a/appengine/flexible/numpy/noxfile_config.py +++ b/appengine/flexible/numpy/noxfile_config.py @@ -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, diff --git a/appengine/flexible/scipy/noxfile_config.py b/appengine/flexible/scipy/noxfile_config.py index c5139a5493ca..fa718fc163c7 100644 --- a/appengine/flexible/scipy/noxfile_config.py +++ b/appengine/flexible/scipy/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/analytics/noxfile_config.py b/appengine/flexible_python37_and_earlier/analytics/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/analytics/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/analytics/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/datastore/noxfile_config.py b/appengine/flexible_python37_and_earlier/datastore/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/datastore/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/datastore/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/disk/noxfile_config.py b/appengine/flexible_python37_and_earlier/disk/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/disk/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/disk/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/django_cloudsql/noxfile_config.py b/appengine/flexible_python37_and_earlier/django_cloudsql/noxfile_config.py index 393aa3f69329..a51f3680ad61 100644 --- a/appengine/flexible_python37_and_earlier/django_cloudsql/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/django_cloudsql/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/django_cloudsql/requirements.txt b/appengine/flexible_python37_and_earlier/django_cloudsql/requirements.txt index bbe8c3404a93..5c73ea543de6 100644 --- a/appengine/flexible_python37_and_earlier/django_cloudsql/requirements.txt +++ b/appengine/flexible_python37_and_earlier/django_cloudsql/requirements.txt @@ -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 diff --git a/appengine/flexible_python37_and_earlier/extending_runtime/noxfile_config.py b/appengine/flexible_python37_and_earlier/extending_runtime/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/extending_runtime/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/extending_runtime/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/hello_world/noxfile_config.py b/appengine/flexible_python37_and_earlier/hello_world/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/hello_world/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/hello_world/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/hello_world_django/noxfile_config.py b/appengine/flexible_python37_and_earlier/hello_world_django/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/hello_world_django/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/hello_world_django/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/hello_world_django/requirements.txt b/appengine/flexible_python37_and_earlier/hello_world_django/requirements.txt index 7f041f9278d2..5bf2d53f4656 100644 --- a/appengine/flexible_python37_and_earlier/hello_world_django/requirements.txt +++ b/appengine/flexible_python37_and_earlier/hello_world_django/requirements.txt @@ -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 diff --git a/appengine/flexible_python37_and_earlier/metadata/noxfile_config.py b/appengine/flexible_python37_and_earlier/metadata/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/metadata/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/metadata/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/multiple_services/noxfile_config.py b/appengine/flexible_python37_and_earlier/multiple_services/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/multiple_services/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/multiple_services/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/numpy/noxfile_config.py b/appengine/flexible_python37_and_earlier/numpy/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/numpy/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/numpy/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/pubsub/noxfile_config.py b/appengine/flexible_python37_and_earlier/pubsub/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/pubsub/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/pubsub/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/scipy/noxfile_config.py b/appengine/flexible_python37_and_earlier/scipy/noxfile_config.py index 9dbc4dd20c86..887244766fdf 100644 --- a/appengine/flexible_python37_and_earlier/scipy/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/scipy/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/static_files/noxfile_config.py b/appengine/flexible_python37_and_earlier/static_files/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/static_files/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/static_files/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/storage/noxfile_config.py b/appengine/flexible_python37_and_earlier/storage/noxfile_config.py index 85dce2f0ae0a..6c2c81fa22b9 100644 --- a/appengine/flexible_python37_and_earlier/storage/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/storage/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/tasks/noxfile_config.py b/appengine/flexible_python37_and_earlier/tasks/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/tasks/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/tasks/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/twilio/noxfile_config.py b/appengine/flexible_python37_and_earlier/twilio/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/twilio/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/twilio/noxfile_config.py @@ -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, diff --git a/appengine/flexible_python37_and_earlier/websockets/noxfile_config.py b/appengine/flexible_python37_and_earlier/websockets/noxfile_config.py index 40a88b65ca40..1665dd736f8b 100644 --- a/appengine/flexible_python37_and_earlier/websockets/noxfile_config.py +++ b/appengine/flexible_python37_and_earlier/websockets/noxfile_config.py @@ -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, diff --git a/appengine/standard/images/guestbook/main.py b/appengine/standard/images/guestbook/main.py index 5abe23c3264e..f5ef2f1c6f86 100644 --- a/appengine/standard/images/guestbook/main.py +++ b/appengine/standard/images/guestbook/main.py @@ -18,22 +18,21 @@ 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.""" @@ -41,9 +40,7 @@ class Greeting(ndb.Model): 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): @@ -67,16 +64,16 @@ def get(self): self.response.out.write("%s 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( '
%s