GeezerVison is showing github.com — Adding Python 3.12 support (#10946) · muralidhar9e/python-docs-samples@0f0def7
File treeExpand file treeCollapse file tree Open diff view settings bigquery-connection/snippets bigquery-datatransfer/snippets bigquery-migration/snippets blog/introduction_to_data_models_in_cloud_datastore cloud-media-livestream/keypublisher blog/gcp-tech-blog/data-orchestration-with-composer
contact-center-insights/snippets media-translation/snippets recaptcha_enterprise/snippets retail/interactive-tutorials translate/samples/snippets vmwareengine/cloud-client
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/sync-repo-settings.yaml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,7 +45,7 @@ branchProtectionRules: | 45 | 45 | - "Kokoro CI - Lint" | 46 | 46 | - "Kokoro CI - Python 2.7 (App Engine Standard Only)" | 47 | 47 | - "Kokoro CI - Python 3.8" | 48 | | - - "Kokoro CI - Python 3.11" | | 48 | + - "Kokoro CI - Python 3.12" | 49 | 49 | - "cla/google" | 50 | 50 | - "snippet-bot check" | 51 | 51 | # List of explicit permissions to add (additive only) | |
Collapse file Copy file name to clipboard +61Lines changed: 61 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Copyright 2023 Google LLC | | 2 | +# | | 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); | | 4 | +# you may not use this file except in compliance with the License. | | 5 | +# You may obtain a copy of the License at | | 6 | +# | | 7 | +# http://www.apache.org/licenses/LICENSE-2.0 | | 8 | +# | | 9 | +# Unless required by applicable law or agreed to in writing, software | | 10 | +# distributed under the License is distributed on an "AS IS" BASIS, | | 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | | 12 | +# See the License for the specific language governing permissions and | | 13 | +# limitations under the License. | | 14 | + | | 15 | +# Format: //devtools/kokoro/config/proto/build.proto | | 16 | + | | 17 | +timeout_mins: 300 | | 18 | + | | 19 | +# Configure the docker image for kokoro-trampoline. | | 20 | +env_vars: { | | 21 | + key: "TRAMPOLINE_IMAGE" | | 22 | + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" | | 23 | +} | | 24 | + | | 25 | +# Download trampoline resources. | | 26 | +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | | 27 | + | | 28 | +# Use the trampoline script to run in docker. | | 29 | +build_file: "python-docs-samples/.kokoro/trampoline_v2.sh" | | 30 | + | | 31 | +# Download secrets from Cloud Storage. | | 32 | +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" | | 33 | + | | 34 | +# Access btlr binaries used in the tests | | 35 | +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/btlr" | | 36 | + | | 37 | +# Copy results for Resultstore | | 38 | +action { | | 39 | + define_artifacts { | | 40 | + regex: "**/*sponge_log.xml" | | 41 | + } | | 42 | +} | | 43 | + | | 44 | +# Specify which tests to run | | 45 | +env_vars: { | | 46 | + key: "RUN_TESTS_SESSION" | | 47 | + value: "py-3.12" | | 48 | +} | | 49 | + | | 50 | +# Declare build specific Cloud project. It still uses the common one, | | 51 | +# but we'll update the value once we have more Cloud projects. | | 52 | +env_vars: { | | 53 | + key: "BUILD_SPECIFIC_GCLOUD_PROJECT" | | 54 | + value: "python-docs-samples-tests-312" | | 55 | +} | | 56 | + | | 57 | +# Number of test workers. | | 58 | +env_vars: { | | 59 | + key: "NUM_TEST_WORKERS" | | 60 | + value: "10" | | 61 | +} |
Collapse file Copy file name to clipboard +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Copyright 2023 Google LLC | | 2 | +# | | 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); | | 4 | +# you may not use this file except in compliance with the License. | | 5 | +# You may obtain a copy of the License at | | 6 | +# | | 7 | +# http://www.apache.org/licenses/LICENSE-2.0 | | 8 | +# | | 9 | +# Unless required by applicable law or agreed to in writing, software | | 10 | +# distributed under the License is distributed on an "AS IS" BASIS, | | 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | | 12 | +# See the License for the specific language governing permissions and | | 13 | +# limitations under the License. | | 14 | + | | 15 | +# Format: //devtools/kokoro/config/proto/build.proto | | 16 | + | | 17 | +# Tell the trampoline which build file to use. | | 18 | +env_vars: { | | 19 | + key: "TRAMPOLINE_BUILD_FILE" | | 20 | + value: ".kokoro/tests/run_tests_diff_head.sh" | | 21 | +} |
Collapse file Copy file name to clipboard +32Lines changed: 32 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Copyright 2023 Google LLC | | 2 | +# | | 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); | | 4 | +# you may not use this file except in compliance with the License. | | 5 | +# You may obtain a copy of the License at | | 6 | +# | | 7 | +# http://www.apache.org/licenses/LICENSE-2.0 | | 8 | +# | | 9 | +# Unless required by applicable law or agreed to in writing, software | | 10 | +# distributed under the License is distributed on an "AS IS" BASIS, | | 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | | 12 | +# See the License for the specific language governing permissions and | | 13 | +# limitations under the License. | | 14 | + | | 15 | +# Format: //devtools/kokoro/config/proto/build.proto | | 16 | + | | 17 | +# Tell the trampoline which build file to use. | | 18 | +env_vars: { | | 19 | + key: "TRAMPOLINE_BUILD_FILE" | | 20 | + value: ".kokoro/tests/run_tests.sh" | | 21 | +} | | 22 | + | | 23 | +env_vars: { | | 24 | + key: "REPORT_TO_BUILD_COP_BOT" | | 25 | + value: "true" | | 26 | +} | | 27 | + | | 28 | +# Tell Trampoline to upload the Docker image after successfull build. | | 29 | +env_vars: { | | 30 | + key: "TRAMPOLINE_IMAGE_UPLOAD" | | 31 | + value: "true" | | 32 | +} |
Collapse file Copy file name to clipboard +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Copyright 2023 Google LLC | | 2 | +# | | 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); | | 4 | +# you may not use this file except in compliance with the License. | | 5 | +# You may obtain a copy of the License at | | 6 | +# | | 7 | +# http://www.apache.org/licenses/LICENSE-2.0 | | 8 | +# | | 9 | +# Unless required by applicable law or agreed to in writing, software | | 10 | +# distributed under the License is distributed on an "AS IS" BASIS, | | 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | | 12 | +# See the License for the specific language governing permissions and | | 13 | +# limitations under the License. | | 14 | + | | 15 | +# Format: //devtools/kokoro/config/proto/build.proto | | 16 | + | | 17 | +# Tell the trampoline which build file to use. | | 18 | +env_vars: { | | 19 | + key: "TRAMPOLINE_BUILD_FILE" | | 20 | + value: ".kokoro/tests/run_tests_diff_main.sh" | | 21 | +} |
Collapse file Copy file name to clipboardExpand all lines: AUTHORING_GUIDE.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -923,7 +923,7 @@ Add the new environment variables to the `envs` dictionary. | 923 | 923 | ```py | 924 | 924 | TEST_CONFIG_OVERRIDE = { | 925 | 925 | # You can opt out from the test for specific Python versions. | 926 | | - "ignored_versions": ["2.7", "3.7", "3.9", "3.10"], | | 926 | + "ignored_versions": ["2.7", "3.7", "3.9", "3.10", "3.11"], | 927 | 927 | # Old samples are opted out of enforcing Python type hints | 928 | 928 | # All new samples should feature them | 929 | 929 | "enforce_type_hints": True, | |
Collapse file Copy file name to clipboardExpand all lines: appengine/flexible/django_cloudsql/noxfile_config.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 22 | 22 |
| 23 | 23 | TEST_CONFIG_OVERRIDE = { | 24 | 24 | # You can opt out from the test for specific Python versions. | 25 | | - "ignored_versions": ["2.7", "3.7", "3.9", "3.10"], | | 25 | + "ignored_versions": ["2.7", "3.7", "3.9", "3.10", "3.12"], | 26 | 26 | # An envvar key for determining the project id to use. Change it | 27 | 27 | # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a | 28 | 28 | # build specific Cloud project. You can also use your own string | |
Collapse file Copy file name to clipboardExpand all lines: appengine/standard/noxfile-template.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 37 | 37 |
| 38 | 38 | TEST_CONFIG = { | 39 | 39 | # You can opt out from the test for specific Python versions. | 40 | | - "ignored_versions": ["2.7", "3.7", "3.9", "3.10"], | | 40 | + "ignored_versions": ["2.7", "3.7", "3.9", "3.10", "3.12"], | 41 | 41 | # An envvar key for determining the project id to use. Change it | 42 | 42 | # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a | 43 | 43 | # build specific Cloud project. You can also use your own string | @@ -79,10 +79,10 @@ def get_pytest_env_vars(): | 79 | 79 |
| 80 | 80 | # DO NOT EDIT - automatically generated. | 81 | 81 | # All versions used to tested samples. | 82 | | -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] | | 82 | +ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | 83 | 83 |
| 84 | 84 | # Any default versions that should be ignored. | 85 | | -IGNORED_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] | | 85 | +IGNORED_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | 86 | 86 |
| 87 | 87 | TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) | 88 | 88 |
| |
Collapse file Copy file name to clipboardExpand all lines: appengine/standard_python3/bundled-services/blobstore/django/noxfile_config.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 22 | 22 |
| 23 | 23 | TEST_CONFIG_OVERRIDE = { | 24 | 24 | # You can opt out from the test for specific Python versions. | 25 | | - "ignored_versions": ["2.7", "3.7", "3.9", "3.10"], | | 25 | + "ignored_versions": ["2.7", "3.7", "3.9", "3.10", "3.12"], | 26 | 26 | # Old samples are opted out of enforcing Python type hints | 27 | 27 | # All new samples should feature them | 28 | 28 | "enforce_type_hints": False, | |
Collapse file Copy file name to clipboardExpand all lines: appengine/standard_python3/bundled-services/blobstore/flask/noxfile_config.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 22 | 22 |
| 23 | 23 | TEST_CONFIG_OVERRIDE = { | 24 | 24 | # You can opt out from the test for specific Python versions. | 25 | | - "ignored_versions": ["2.7", "3.7", "3.9", "3.10"], | | 25 | + "ignored_versions": ["2.7", "3.7", "3.9", "3.10", "3.12"], | 26 | 26 | # Old samples are opted out of enforcing Python type hints | 27 | 27 | # All new samples should feature them | 28 | 28 | "enforce_type_hints": False, | |
|