Skip to content

Commit 14e3af2

Browse files
authored
Merge branch 'main' into langchain-vertexai
2 parents ddc7136 + e86eb76 commit 14e3af2

File tree

74 files changed

+644
-186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+644
-186
lines changed

.kokoro/docker/cloudbuild.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ steps:
2222
args: ['tag', 'gcr.io/$PROJECT_ID/python-samples-testing-docker', 'gcr.io/$PROJECT_ID/python-samples-testing-docker:$SHORT_SHA']
2323
images:
2424
- 'gcr.io/$PROJECT_ID/python-samples-testing-docker'
25+
26+
options:
27+
logging: CLOUD_LOGGING_ONLY

appengine/flexible/scipy/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ numpy==1.26.4; python_version == '3.9'
77
numpy==1.24.4; python_version == '3.8'
88
pillow==10.3.0
99
scipy==1.10.1; python_version <= '3.9'
10-
scipy==1.14.0; python_version > '3.9'
10+
scipy==1.14.1; python_version > '3.9'

appengine/flexible_python37_and_earlier/scipy/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ numpy==1.26.4; python_version == '3.9'
77
numpy==1.24.4; python_version == '3.8'
88
numpy==1.21.6; python_version == '3.7'
99
pillow==10.3.0
10-
scipy==1.14.0
10+
scipy==1.14.1
1111
Werkzeug==3.0.3

appengine/standard/images/api/blobstore.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
For more information, see README.md.
1919
"""
2020

21-
# [START all]
22-
# [START thumbnailer]
21+
# [START gae_images_api_blobstore]
22+
# [START gae_images_api_blobstore_thumbnailer]
2323
from google.appengine.api import images
2424
from google.appengine.ext import blobstore
2525

@@ -47,7 +47,7 @@ def get(self):
4747
self.error(404)
4848

4949

50-
# [END thumbnailer]
50+
# [END gae_images_api_blobstore_thumbnailer]
5151

5252

5353
class ServingUrlRedirect(webapp2.RequestHandler):
@@ -73,4 +73,4 @@ def get(self):
7373
app = webapp2.WSGIApplication(
7474
[("/img", Thumbnailer), ("/redirect", ServingUrlRedirect)], debug=True
7575
)
76-
# [END all]
76+
# [END gae_images_api_blobstore]

appengine/standard/images/api/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
For more information, see README.md.
1919
"""
2020

21-
# [START all]
22-
# [START thumbnailer]
21+
# [START gae_images_api_ndb]
22+
# [START gae_images_api_ndb_thumbnailer]
2323
from google.appengine.api import images
2424
from google.appengine.ext import ndb
2525

@@ -51,8 +51,8 @@ def get(self):
5151
self.error(404)
5252

5353

54-
# [END thumbnailer]
54+
# [END gae_images_api_ndb_thumbnailer]
5555

5656

5757
app = webapp2.WSGIApplication([("/img", Thumbnailer)], debug=True)
58-
# [END all]
58+
# [END gae_images_api_ndb]

appengine/standard/mail/app.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ runtime: python27
1616
api_version: 1
1717
threadsafe: yes
1818

19-
# [START mail_service]
19+
# [START gae_mail_service_yaml_python]
2020
inbound_services:
2121
- mail
2222
- mail_bounce # Handle bounced mail notifications
23-
# [END mail_service]
23+
# [END gae_mail_service_yaml_python]
2424

2525
handlers:
2626
- url: /user/.+
@@ -29,12 +29,12 @@ handlers:
2929
script: send_mail.app
3030
- url: /send_message
3131
script: send_message.app
32-
# [START handle_incoming_email]
32+
# [START gae_handle_incoming_email_yaml_python]
3333
- url: /_ah/mail/.+
3434
script: handle_incoming_email.app
3535
login: admin
36-
# [END handle_incoming_email]
37-
# [START handle_all_email]
36+
# [END gae_handle_incoming_email_yaml_python]
37+
# [START gae_handle_all_email_yaml_python]
3838
- url: /_ah/mail/owner@.*your_app_id\.appspotmail\.com
3939
script: handle_owner.app
4040
login: admin
@@ -44,12 +44,12 @@ handlers:
4444
- url: /_ah/mail/.+
4545
script: handle_catchall.app
4646
login: admin
47-
# [END handle_all_email]
48-
# [START handle_bounced_email]
47+
# [END gae_handle_all_email_yaml_python]
48+
# [START gae_handle_bounced_email_yaml_python]
4949
- url: /_ah/bounce
5050
script: handle_bounced_email.app
5151
login: admin
52-
# [END handle_bounced_email]
52+
# [END gae_handle_bounced_email_yaml_python]
5353
- url: /attachment
5454
script: attachment.app
5555
- url: /header

appengine/standard/migration/ndb/redis_cache/README.md

Lines changed: 2 additions & 8 deletions

appengine/standard/migration/ndb/redis_cache/main.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START all]
15+
# [START gae_ndb_redis_cache]
1616
import logging
1717

1818
from flask import Flask, redirect, render_template, request
@@ -33,15 +33,15 @@
3333
global_cache = None
3434

3535

36-
# [START greeting]
36+
# [START gae_ndb_redis_cache_greeting]
3737
class Greeting(ndb.Model):
3838
"""Models an individual Guestbook entry with content and date."""
3939

4040
content = ndb.StringProperty()
4141
date = ndb.DateTimeProperty(auto_now_add=True)
42-
# [END greeting]
42+
# [END gae_ndb_redis_cache_greeting]
4343

44-
# [START query]
44+
# [START gae_ndb_redis_cache_query]
4545
with client.context(global_cache=global_cache):
4646

4747
@classmethod
@@ -56,7 +56,7 @@ def display_guestbook():
5656
with client.context(global_cache=global_cache):
5757
ancestor_key = ndb.Key("Book", guestbook_name or "*notitle*")
5858
greetings = Greeting.query_book(ancestor_key).fetch(20)
59-
# [END query]
59+
# [END gae_ndb_redis_cache_query]
6060

6161
greeting_blockquotes = [greeting.content for greeting in greetings]
6262
return render_template(
@@ -66,7 +66,7 @@ def display_guestbook():
6666
)
6767

6868

69-
# [START submit]
69+
# [START gae_ndb_redis_cache_submit]
7070
@app.route("/sign", methods=["POST"])
7171
def update_guestbook():
7272
# We set the parent key on each 'Greeting' to ensure each guestbook's
@@ -81,12 +81,12 @@ def update_guestbook():
8181
content=request.form.get("content", None),
8282
)
8383
greeting.put()
84-
# [END submit]
84+
# [END gae_ndb_redis_cache_submit]
8585

8686
return redirect("/?" + urlencode({"guestbook_name": guestbook_name}))
8787

8888

8989
if __name__ == "__main__":
9090
# This is used when running locally.
9191
app.run(host="127.0.0.1", port=8080, debug=True)
92-
# [END all]
92+
# [END gae_ndb_redis_cache]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# pin pytest to 4.6.11 for Python2.
22
pytest==4.6.11; python_version < '3.0'
3+
4+
# 2025-01-14 Adds support for Python3.
5+
pytest==8.3.2; python_version >= '3.0'
6+
WebTest==3.0.1; python_version >= '3.0'
7+
six==1.16.0

appengine/standard/multitenancy/datastore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
For more information, see README.md.
2020
"""
2121

22-
# [START all]
22+
# [START gae_multitenancy_datastore]
2323
from google.appengine.api import namespace_manager
2424
from google.appengine.ext import ndb
2525
import webapp2
@@ -73,4 +73,4 @@ def get(self, namespace="default"):
7373
],
7474
debug=True,
7575
)
76-
# [END all]
76+
# [END gae_multitenancy_datastore]

0 commit comments

Comments
 (0)