Description:

New Python versions are released to address security vulnerabilities, improve performance, and add new features. Web Apps should use the latest stable Python version to ensure they receive the latest security patches, performance improvements, and functionality updates.


Rationale:

Using the latest Python version ensures that any known security vulnerabilities are patched, reducing the risk of exploitation. It also improves the overall stability and reliability of the web application. Newer versions provide performance enhancements and updated features that support modern development needs. Keeping runtimes current helps prevent issues associated with outdated or unsupported software.


Impact:

If the web app uses an outdated Python version, it may be exposed to unpatched security vulnerabilities, increasing the risk of compromise. The application may also experience reduced performance, instability, or unexpected failures. Certain libraries and services may stop working correctly due to compatibility issues. Overall, running an unsupported Python version can lead to security, operational, and reliability problems.


Default Value:

By default, Azure Web Apps do not automatically use the latest Python version; the Python runtime must be manually selected during configuration. If not configured, the Web App may run on an older or previously supported Python version based on the App Service stack.


Pre-requisites:

  • Access to the Azure Portal and the target Web App.

  • Required RBAC permissions such as Contributor or App Service Contributor.

  • The Web App must be running on a Linux-based App Service Plan to support Python.

  • Knowledge of the latest Python versions supported by Azure App Service.


Test Plan:

  1. Sign in to the Azure portal at https://portal.azure.com.

  2. In the portal, search for App Services and select the target Web App.

  3. Under Settings, go to Configuration.

  4. Under Stack settings, in stack selection, confirm that the Stack is set to Python.

  5. Check the Python Version dropdown and compare it with the latest stable version available.

  6. Verify that the Web App is set to the latest stable Python version.

  7. If it is using an outdated or deprecated version, follow the implementation steps.

Implementation Steps:

  1. Log in to the Azure Portal at https://portal.azure.com.

  2. In the portal, search for App Services and select the target Web App.

  1. Under Settings, go to Configuration.

                                   

  1. In Stack Settings, in the stack selection set Stack to Python.

  2. From the Python Version dropdown, select the latest stable version available.

  1. Click Save to apply the changes.

Backout Plan:

  1. Sign in to the Azure portal at https://portal.azure.com.

  2. In the portal, search for App Services and select the target Web App.

  3. Go to Configuration under settings.

  4. Under Stack Settings, in stack selection, confirm the Stack is set to Python.

  5. Select the old Python version from the Python Version dropdown.

  6. Click Save to apply the changes.


References: