Stay organized with collections Save and categorize content based on your preferences.
Starting on January 1, 2020, the Python community will no longer update, fix bugs, or patch security issues for Python 2.7. We recommend that you make sure that your Deployment Manager templates are compatible with Python 3 as soon as possible.
For an overview of the products affected by this change, including information about using the Google Cloud Python client libraries, see Python support on Google Cloud.
Migrating your Deployment Manager templatesThe syntax for Deployment Manager does not use any features specific to Python 3. In most cases, your templates should work with Python 3 without requiring code changes.
If you use template modules such as helper scripts, you must make sure that the scripts are compatible with Python 3.
For information on porting Python 2 code to Python 3, see the Python.org porting guide. If you want to test whether your template is compatible with Python 3, try a test deployment with the template. If the deployment succeeds without any warnings, your template is compatible, and doesn't need changes.
If your templates have features that are incompatible with Python 3, your deployments will continue to work until June 2020. You might see one of these warnings:
The template is incompatible with Python 3: The template runs using Python 2, but fails with Python 3. The warning shows the Python 3 error message, so that you can debug your code.
The template produced different results with Python 3 and Python 2: This could be because your deployment is non-deterministic (for example, it relies on the current time or random numbers), or a template might be using a feature incompatible with Python 3. If your template is non-deterministic by design, you don't need to change it.
If your template uses a feature that is incompatible with Python 3, use the guidelines in the Python 3 porting guide to update the template.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Python 2.7 will no longer receive updates, bug fixes, or security patches from the Python community after January 1, 2020, so ensuring Deployment Manager templates are compatible with Python 3 is advised."],["Deployment Manager templates generally do not require code changes to be compatible with Python 3, unless template modules or helper scripts are used."],["Testing templates for Python 3 compatibility can be done by attempting a test deployment, which, if successful without warnings, indicates compatibility."],["Templates incompatible with Python 3 will continue to function until June 2020, but may produce warnings indicating incompatibility or different results compared to Python 2."],["The Python.org porting guide can help users with migration of incompatible features to Python 3 if needed."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4