diff --git a/doc/command_guidelines.md b/doc/command_guidelines.md index 82800e1cc2a..e840ffa1274 100644 --- a/doc/command_guidelines.md +++ b/doc/command_guidelines.md @@ -420,8 +420,7 @@ Virtual Network Rule Arguments ## Coding Practices -- All code must support Python 2 & 3. -The CLI supports 2.7, 3.5, 3.6, 3.7 and 3.8 +- All code must support Python 3.5, 3.6, 3.7 and 3.8 - PRs to Azure/azure-cli and Azure/azure-cli-extensions must pass CI - Code must pass style checks with pylint and pep8 - (*) All commands should have tests diff --git a/doc/debug/debug_in_vs_code.md b/doc/debug/debug_in_vs_code.md index 35e2c2179fb..6f3b19ef4a2 100644 --- a/doc/debug/debug_in_vs_code.md +++ b/doc/debug/debug_in_vs_code.md @@ -4,7 +4,7 @@ * Visual Studio Code [Link](http://code.visualstudio.com/) * Visual Studio Code Python Extension [Link](https://marketplace.visualstudio.com/items?itemName=donjayamanne.python) -* Python 2.7 or 3.5 +* Python 3.5+ * Set up development environment [Link](https://github.com/Azure/azure-cli/blob/master/doc/configuring_your_machine.md) ## Quick start diff --git a/doc/extensions/authoring.md b/doc/extensions/authoring.md index fd1ef3bd8b5..7ee63ca8f8a 100644 --- a/doc/extensions/authoring.md +++ b/doc/extensions/authoring.md @@ -119,11 +119,11 @@ See [Extension Metadata](metadata.md) for more information. - When you run `az --version` it will list your normal extensions directory as well as any directories being used to find developer extensions. Developer extensions will appear in the output with a path next to the version number. -### Test your extension on both Python 2 & 3 +### Test your extension on Python 3 -- The CLI supports both Python 2 & 3 so verify that your extension does the same. -- You can create both a Python 2 and 3 virtual environment and run your extension in both. -- e.g. `virtualenv env27` and `virtualenv -p /usr/local/bin/python3 env`. +- The CLI supports Python 3.5, 3.6, 3.7, 3.8 so verify that your extension does the same. +- You can create virtual environments for different versions and run your extension in them. +- e.g. `python3.6 -m venv env36` and `python3.8 -m venv env38`. :zap: IMPORTANT :zap: diff --git a/doc/install_linux_prerequisites.md b/doc/install_linux_prerequisites.md index c2095a12715..46e3a65dccf 100644 --- a/doc/install_linux_prerequisites.md +++ b/doc/install_linux_prerequisites.md @@ -5,6 +5,8 @@ Some native Linux packages are required when installing the CLI with: - Interactive install script - ``pip`` +Current supported Python versions are Python 3.5, 3.6, 3.7, 3.8. Azure CLI packages prior to version 2.1.0 support both Python 2.7 and Python 3. + The commands to run to install the dependencies for some common distributions are listed below. * Ubuntu @@ -12,6 +14,7 @@ The commands to run to install the dependencies for some common distributions ar * [14.04 LTS](#ubuntu-1404-lts-and-bash-on-windows-build-14362) * [15.10](#ubuntu-1510) * [16.04 LTS](#ubuntu-1604-lts) + * [18.04 LTS](#ubuntu-1804-lts) * Debian * [7](#debian-7) * [8](#debian-8) @@ -25,63 +28,67 @@ The commands to run to install the dependencies for some common distributions ar * [CoreOS](#coreos-stable-899150--beta-101010--alpha-101010) ### Ubuntu 12.04 LTS -Python 2.7.3 should be already on the machine. +Python 2.7.3 should be already on the machine. Install Python 3.5+ if needed. ``` sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev ``` ### Ubuntu 14.04 LTS and BASH on Windows (Build 14362+) -Python 2.7.6 should be already on the machine. +Python 2.7.6 should be already on the machine. Install Python 3.5+ if needed. ``` sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev ``` ### Ubuntu 15.10 -Python 2.7.10 should be already on the machine. +Python 2.7.10 should be already on the machine. Install Python 3.5+ if needed. ``` sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential ``` ### Ubuntu 16.04 LTS -Python 2.7.11 should be already on the machine. +``` +sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential +``` + +### Ubuntu 18.04 LTS ``` sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential ``` ### Debian 7 -Python 2.7.3 should be already on the machine. +Python 2.7.3 should be already on the machine. Install Python 3.5+ if needed. ``` sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev ``` ### Debian 8 -Python 2.7.9 should be already on the machine. +Python 2.7.9 should be already on the machine. Install Python 3.5+ if needed. ``` sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential ``` ### CentOS 6.5 / 6.6 / 6.7 -Not supported with the default version of Python (2.6.6) on the machine. +Not supported with the default version of Python (2.6.6) on the machine. Install Python 3.5+ if needed. ### CentOS 7.1 / 7.2 -Python 2.7.5 should be already on the machine. +Python 2.7.5 should be already on the machine. Install Python 3.5+ if needed. ``` sudo yum check-update; sudo yum install -y gcc libffi-devel python-devel openssl-devel ``` ### RedHat RHEL 6.7 -Not supported with the default version of Python (2.6.6) on the machine. +Not supported with the default version of Python (2.6.6) on the machine. Install Python 3.5+ if needed. ### RedHat RHEL 7.2 -Python 2.7.5 should be already on the machine. +Python 2.7.5 should be already on the machine. Install Python 3.5+ if needed. ``` sudo yum check-update; sudo yum install -y gcc libffi-devel python-devel openssl-devel ``` ### SUSE OpenSUSE 13.2 -Python 2.7.8 should be already on the machine. +Python 2.7.8 should be already on the machine. Install Python 3.5+ if needed. ``` sudo zypper refresh && sudo zypper --non-interactive install gcc libffi-devel python-devel openssl-devel ``` diff --git a/src/azure-cli-core/setup.py b/src/azure-cli-core/setup.py index ef062726ad8..cac905c381d 100644 --- a/src/azure-cli-core/setup.py +++ b/src/azure-cli-core/setup.py @@ -42,8 +42,6 @@ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', diff --git a/src/azure-cli-nspkg/setup.py b/src/azure-cli-nspkg/setup.py index 58944710961..ef9dbb15b98 100644 --- a/src/azure-cli-nspkg/setup.py +++ b/src/azure-cli-nspkg/setup.py @@ -15,8 +15,6 @@ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', diff --git a/src/azure-cli-telemetry/setup.py b/src/azure-cli-telemetry/setup.py index 8b9dee4e3f0..6bca6ba87e8 100755 --- a/src/azure-cli-telemetry/setup.py +++ b/src/azure-cli-telemetry/setup.py @@ -23,8 +23,6 @@ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', diff --git a/src/azure-cli-testsdk/setup.py b/src/azure-cli-testsdk/setup.py index 30f8181a0be..7b55c253259 100644 --- a/src/azure-cli-testsdk/setup.py +++ b/src/azure-cli-testsdk/setup.py @@ -20,8 +20,6 @@ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6',