diff --git a/.travis.yml b/.travis.yml index c424105f009..9a9ccaf2883 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,18 +23,10 @@ jobs: python: 3.6 env: TOXENV=py36 script: ./scripts/ci/unittest.sh - - stage: unittest - python: 2.7 - env: TOXENV=py27 - script: ./scripts/ci/unittest.sh - stage: verify script: ./scripts/ci/test_profile_integration.sh env: PURPOSE='Integration for profiles' python: 3.6 - - stage: verify - script: ./scripts/ci/test_profile_integration.sh - env: PURPOSE='Integration for profiles' - python: 2.7 - stage: verify script: ./scripts/ci/test_ref_doc.sh env: PURPOSE='RefDocVerify' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c5292ac632f..0a1c53e85de 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -88,14 +88,6 @@ jobs: - bash: ./scripts/ci/dependency_check.sh displayName: 'Verify src/azure-cli/requirements.py3.Linux.txt' - - task: UsePythonVersion@0 - displayName: 'Use Python 2' - inputs: - versionSpec: 2.x - - - bash: ./scripts/ci/dependency_check.sh - displayName: 'Verify src/azure-cli/requirements.py2.Linux.txt' - - job: VerifyDarwinRequirements displayName: 'Verify src/azure-cli/requirements.*.Darwin.txt' condition: succeeded() @@ -111,14 +103,6 @@ jobs: - bash: ./scripts/ci/dependency_check.sh displayName: 'Verify src/azure-cli/requirements.py3.Darwin.txt' - - task: UsePythonVersion@0 - displayName: 'Use Python 2' - inputs: - versionSpec: 2.x - - - bash: ./scripts/ci/dependency_check.sh - displayName: 'Verify src/azure-cli/requirements.py2.Darwin.txt' - - job: VerifyWindowsRequirements displayName: 'Verify src/azure-cli/requirements.*.Windows.txt' condition: succeeded() @@ -136,16 +120,6 @@ jobs: filename: ./scripts/ci/dependency_check.bat displayName: 'Verify src/azure-cli/requirements.py3.Windows.txt' - - task: UsePythonVersion@0 - displayName: 'Use Python 2' - inputs: - versionSpec: 2.x - - - task: BatchScript@1 - inputs: - filename: ./scripts/ci/dependency_check.bat - displayName: 'Verify src/azure-cli/requirements.py2.Windows.txt' - - job: VerifyVersions displayName: Verify Command Module Versions condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/release'), eq(variables['System.PullRequest.TargetBranch'], 'release'))) @@ -372,11 +346,6 @@ jobs: --rm -v $PYPI_FILES:/mnt/pypi python:3.8 \ /bin/bash -c "ls /mnt/pypi && pip install -f /mnt/pypi -q azure-cli==$CLI_VERSION && az self-test && az --version && sleep 5" - echo "== Testing pip install on Python 2.7 ==" - docker run \ - --rm -v $PYPI_FILES:/mnt/pypi python:2.7 \ - /bin/bash -c "ls /mnt/pypi && pip install -f /mnt/pypi -q azure-cli==$CLI_VERSION && az self-test && az --version && sleep 5" - displayName: 'Test pip Install' - job: UnitTest @@ -387,9 +356,6 @@ jobs: vmImage: 'ubuntu-16.04' strategy: matrix: - Python27: - python.version: '2.7' - tox_env: 'py27' Python36: python.version: '3.6' tox_env: 'py36' @@ -432,31 +398,6 @@ jobs: - bash: ./scripts/ci/test_profile_integration.sh displayName: 'Run Integration Test against Profiles' -- job: RunAutomationFullPython2 - displayName: Run Automation, Python 2 - dependsOn: BuildPythonWheel - timeoutInMinutes: 90 - - pool: - vmImage: 'ubuntu-16.04' - steps: - - task: UsePythonVersion@0 - displayName: 'Use Python 2.7' - inputs: - versionSpec: 2.7 - - task: DownloadPipelineArtifact@1 - displayName: 'Download Python Wheels' - inputs: - TargetPath: '$(Build.ArtifactStagingDirectory)/pypi' - artifactName: pypi - - bash: | - pip install --force-reinstall wheel - - task: Bash@3 - displayName: 'Run Test Automation' - inputs: - targetType: 'filePath' - filePath: ./scripts/ci/test_automation.sh - - job: RunAutomationReducedPython3_6 displayName: Run Automation Reduced Python 3.6 dependsOn: BuildPythonWheel diff --git a/src/azure-cli/requirements.py2.Darwin.txt b/src/azure-cli/requirements.py2.Darwin.txt deleted file mode 100644 index 53b780bb5df..00000000000 --- a/src/azure-cli/requirements.py2.Darwin.txt +++ /dev/null @@ -1,144 +0,0 @@ -adal==1.2.1 -antlr4-python2-runtime==4.7.2 -applicationinsights==0.11.9 -argcomplete==1.11.1 -asn1crypto==0.24.0 -azure-batch==8.0.0 -azure-cli==2.0.81 -azure-cli-command-modules-nspkg==2.0.3 -azure-cli-core==2.0.81 -azure-cli-nspkg==3.0.4 -azure-cli-telemetry==1.0.4 -azure-common==1.1.22 -azure-cosmos==3.1.0 -azure-datalake-store==0.0.48 -azure-devtools==1.0.0 -azure-functions-devops-build==0.0.22 -azure-graphrbac==0.60.0 -azure-keyvault==1.1.0 -azure-mgmt-advisor==2.0.1 -azure-mgmt-apimanagement==0.1.0 -azure-mgmt-appconfiguration==0.3.0 -azure-mgmt-applicationinsights==0.1.1 -azure-mgmt-authorization==0.52.0 -azure-mgmt-batch==7.0.0 -azure-mgmt-batchai==2.0.0 -azure-mgmt-billing==0.2.0 -azure-mgmt-botservice==0.2.0 -azure-mgmt-cdn==4.0.0 -azure-mgmt-cognitiveservices==5.0.0 -azure-mgmt-compute==10.0.0 -azure-mgmt-consumption==2.0.0 -azure-mgmt-containerinstance==1.5.0 -azure-mgmt-containerregistry==3.0.0rc8 -azure-mgmt-containerservice==8.1.0 -azure-mgmt-cosmosdb==0.11.0 -azure-mgmt-datalake-analytics==0.2.1 -azure-mgmt-datalake-nspkg==3.0.1 -azure-mgmt-datalake-store==0.5.0 -azure-mgmt-datamigration==0.1.0 -azure-mgmt-deploymentmanager==0.2.0 -azure-mgmt-devtestlabs==2.2.0 -azure-mgmt-dns==2.1.0 -azure-mgmt-eventgrid==2.2.0 -azure-mgmt-eventhub==3.0.0 -azure-mgmt-hdinsight==1.3.0 -azure-mgmt-imagebuilder==0.2.1 -azure-mgmt-iotcentral==2.0.0 -azure-mgmt-iothub==0.8.2 -azure-mgmt-iothubprovisioningservices==0.2.0 -azure-mgmt-keyvault==2.1.1 -azure-mgmt-kusto==0.3.0 -azure-mgmt-loganalytics==0.2.0 -azure-mgmt-managementgroups==0.2.0 -azure-mgmt-maps==0.1.0 -azure-mgmt-marketplaceordering==0.2.1 -azure-mgmt-media==1.1.1 -azure-mgmt-monitor==0.7.0 -azure-mgmt-msi==0.2.0 -azure-mgmt-netapp==0.7.0 -azure-mgmt-network==9.0.0 -azure-mgmt-nspkg==3.0.2 -azure-mgmt-policyinsights==0.4.0 -azure-mgmt-privatedns==0.1.0 -azure-mgmt-rdbms==1.9.0 -azure-mgmt-recoveryservices==0.4.0 -azure-mgmt-recoveryservicesbackup==0.5.0 -azure-mgmt-redis==7.0.0rc1 -azure-mgmt-relay==0.1.0 -azure-mgmt-reservations==0.6.0 -azure-mgmt-resource==8.0.1 -azure-mgmt-search==2.1.0 -azure-mgmt-security==0.1.0 -azure-mgmt-servicebus==0.6.0 -azure-mgmt-servicefabric==0.4.0 -azure-mgmt-signalr==0.3.0 -azure-mgmt-sql==0.15.0 -azure-mgmt-sqlvirtualmachine==0.5.0 -azure-mgmt-storage==7.2.0 -azure-mgmt-trafficmanager==0.51.0 -azure-mgmt-web==0.44.0 -azure-multiapi-storage==0.2.4 -azure-nspkg==3.0.2 -azure-loganalytics==0.1.0 -azure-storage-blob==1.5.0 -azure-storage-common==1.4.2 -azure-storage-nspkg==3.1.0 -bcrypt==3.1.7 -certifi==2019.6.16 -cffi==1.12.3 -chardet==3.0.4 -colorama==0.4.1 -ConfigArgParse==0.14.0 -contextlib2==0.5.5 -cryptography==2.8 -enum34==1.1.6 -fabric==2.4.0 -funcsigs==1.0.2 -futures==3.2.0 -humanfriendly==4.18 -idna==2.8 -invoke==1.2.0 -ipaddress==1.0.22 -isodate==0.6.0 -Jinja2==2.10.1 -jmespath==0.9.4 -jsmin==2.2.2 -knack==0.6.3 -MarkupSafe==1.1.1 -mock==2.0.0 -monotonic==1.5 -msrest==0.6.9 -msrestazure==0.6.2 -ndg-httpsclient==0.5.1 -oauthlib==3.0.1 -paramiko==2.6.0 -pathlib2==2.3.3 -pbr==5.3.1 -portalocker==1.4.0 -psutil==5.6.3 -pyasn1==0.4.5 -pycparser==2.19 -Pygments==2.4.2 -PyJWT==1.7.1 -PyNaCl==1.3.0 -pyOpenSSL==19.0.0 -python-dateutil==2.8.0 -pytz==2019.1 -PyYAML==5.1.1 -requests==2.22.0 -requests-oauthlib==1.2.0 -scandir==1.10.0 -scp==0.13.2 -six==1.12.0 -sshtunnel==0.1.5 -tabulate==0.8.3 -typing==3.7.4 -urllib3==1.25.3 -vcrpy==2.0.1 -vsts==0.1.25 -vsts-cd-manager==1.0.2 -wcwidth==0.1.7 -websocket-client==0.56.0 -wrapt==1.11.2 -xmltodict==0.12.0 diff --git a/src/azure-cli/requirements.py2.Linux.txt b/src/azure-cli/requirements.py2.Linux.txt deleted file mode 100644 index 53b780bb5df..00000000000 --- a/src/azure-cli/requirements.py2.Linux.txt +++ /dev/null @@ -1,144 +0,0 @@ -adal==1.2.1 -antlr4-python2-runtime==4.7.2 -applicationinsights==0.11.9 -argcomplete==1.11.1 -asn1crypto==0.24.0 -azure-batch==8.0.0 -azure-cli==2.0.81 -azure-cli-command-modules-nspkg==2.0.3 -azure-cli-core==2.0.81 -azure-cli-nspkg==3.0.4 -azure-cli-telemetry==1.0.4 -azure-common==1.1.22 -azure-cosmos==3.1.0 -azure-datalake-store==0.0.48 -azure-devtools==1.0.0 -azure-functions-devops-build==0.0.22 -azure-graphrbac==0.60.0 -azure-keyvault==1.1.0 -azure-mgmt-advisor==2.0.1 -azure-mgmt-apimanagement==0.1.0 -azure-mgmt-appconfiguration==0.3.0 -azure-mgmt-applicationinsights==0.1.1 -azure-mgmt-authorization==0.52.0 -azure-mgmt-batch==7.0.0 -azure-mgmt-batchai==2.0.0 -azure-mgmt-billing==0.2.0 -azure-mgmt-botservice==0.2.0 -azure-mgmt-cdn==4.0.0 -azure-mgmt-cognitiveservices==5.0.0 -azure-mgmt-compute==10.0.0 -azure-mgmt-consumption==2.0.0 -azure-mgmt-containerinstance==1.5.0 -azure-mgmt-containerregistry==3.0.0rc8 -azure-mgmt-containerservice==8.1.0 -azure-mgmt-cosmosdb==0.11.0 -azure-mgmt-datalake-analytics==0.2.1 -azure-mgmt-datalake-nspkg==3.0.1 -azure-mgmt-datalake-store==0.5.0 -azure-mgmt-datamigration==0.1.0 -azure-mgmt-deploymentmanager==0.2.0 -azure-mgmt-devtestlabs==2.2.0 -azure-mgmt-dns==2.1.0 -azure-mgmt-eventgrid==2.2.0 -azure-mgmt-eventhub==3.0.0 -azure-mgmt-hdinsight==1.3.0 -azure-mgmt-imagebuilder==0.2.1 -azure-mgmt-iotcentral==2.0.0 -azure-mgmt-iothub==0.8.2 -azure-mgmt-iothubprovisioningservices==0.2.0 -azure-mgmt-keyvault==2.1.1 -azure-mgmt-kusto==0.3.0 -azure-mgmt-loganalytics==0.2.0 -azure-mgmt-managementgroups==0.2.0 -azure-mgmt-maps==0.1.0 -azure-mgmt-marketplaceordering==0.2.1 -azure-mgmt-media==1.1.1 -azure-mgmt-monitor==0.7.0 -azure-mgmt-msi==0.2.0 -azure-mgmt-netapp==0.7.0 -azure-mgmt-network==9.0.0 -azure-mgmt-nspkg==3.0.2 -azure-mgmt-policyinsights==0.4.0 -azure-mgmt-privatedns==0.1.0 -azure-mgmt-rdbms==1.9.0 -azure-mgmt-recoveryservices==0.4.0 -azure-mgmt-recoveryservicesbackup==0.5.0 -azure-mgmt-redis==7.0.0rc1 -azure-mgmt-relay==0.1.0 -azure-mgmt-reservations==0.6.0 -azure-mgmt-resource==8.0.1 -azure-mgmt-search==2.1.0 -azure-mgmt-security==0.1.0 -azure-mgmt-servicebus==0.6.0 -azure-mgmt-servicefabric==0.4.0 -azure-mgmt-signalr==0.3.0 -azure-mgmt-sql==0.15.0 -azure-mgmt-sqlvirtualmachine==0.5.0 -azure-mgmt-storage==7.2.0 -azure-mgmt-trafficmanager==0.51.0 -azure-mgmt-web==0.44.0 -azure-multiapi-storage==0.2.4 -azure-nspkg==3.0.2 -azure-loganalytics==0.1.0 -azure-storage-blob==1.5.0 -azure-storage-common==1.4.2 -azure-storage-nspkg==3.1.0 -bcrypt==3.1.7 -certifi==2019.6.16 -cffi==1.12.3 -chardet==3.0.4 -colorama==0.4.1 -ConfigArgParse==0.14.0 -contextlib2==0.5.5 -cryptography==2.8 -enum34==1.1.6 -fabric==2.4.0 -funcsigs==1.0.2 -futures==3.2.0 -humanfriendly==4.18 -idna==2.8 -invoke==1.2.0 -ipaddress==1.0.22 -isodate==0.6.0 -Jinja2==2.10.1 -jmespath==0.9.4 -jsmin==2.2.2 -knack==0.6.3 -MarkupSafe==1.1.1 -mock==2.0.0 -monotonic==1.5 -msrest==0.6.9 -msrestazure==0.6.2 -ndg-httpsclient==0.5.1 -oauthlib==3.0.1 -paramiko==2.6.0 -pathlib2==2.3.3 -pbr==5.3.1 -portalocker==1.4.0 -psutil==5.6.3 -pyasn1==0.4.5 -pycparser==2.19 -Pygments==2.4.2 -PyJWT==1.7.1 -PyNaCl==1.3.0 -pyOpenSSL==19.0.0 -python-dateutil==2.8.0 -pytz==2019.1 -PyYAML==5.1.1 -requests==2.22.0 -requests-oauthlib==1.2.0 -scandir==1.10.0 -scp==0.13.2 -six==1.12.0 -sshtunnel==0.1.5 -tabulate==0.8.3 -typing==3.7.4 -urllib3==1.25.3 -vcrpy==2.0.1 -vsts==0.1.25 -vsts-cd-manager==1.0.2 -wcwidth==0.1.7 -websocket-client==0.56.0 -wrapt==1.11.2 -xmltodict==0.12.0 diff --git a/src/azure-cli/requirements.py2.windows.txt b/src/azure-cli/requirements.py2.windows.txt deleted file mode 100644 index 297c6cfa67c..00000000000 --- a/src/azure-cli/requirements.py2.windows.txt +++ /dev/null @@ -1,142 +0,0 @@ -adal==1.2.1 -antlr4-python2-runtime==4.7.2 -applicationinsights==0.11.7 -argcomplete==1.11.1 -asn1crypto==0.24.0 -azure-batch==8.0.0 -azure-cli==2.0.81 -azure-cli-command-modules-nspkg==2.0.3 -azure-cli-core==2.0.81 -azure-cli-nspkg==3.0.4 -azure-cli-telemetry==1.0.4 -azure-common==1.1.22 -azure-cosmos==3.1.0 -azure-datalake-store==0.0.48 -azure-functions-devops-build==0.0.22 -azure-graphrbac==0.60.0 -azure-keyvault==1.1.0 -azure-mgmt-advisor==2.0.1 -azure-mgmt-apimanagement==0.1.0 -azure-mgmt-appconfiguration==0.3.0 -azure-mgmt-applicationinsights==0.1.1 -azure-mgmt-authorization==0.52.0 -azure-mgmt-batch==7.0.0 -azure-mgmt-batchai==2.0.0 -azure-mgmt-billing==0.2.0 -azure-mgmt-botservice==0.2.0 -azure-mgmt-cdn==4.0.0 -azure-mgmt-cognitiveservices==5.0.0 -azure-mgmt-compute==10.0.0 -azure-mgmt-consumption==2.0.0 -azure-mgmt-containerinstance==1.5.0 -azure-mgmt-containerregistry==3.0.0rc8 -azure-mgmt-containerservice==8.1.0 -azure-mgmt-cosmosdb==0.11.0 -azure-mgmt-datalake-analytics==0.2.1 -azure-mgmt-datalake-nspkg==3.0.1 -azure-mgmt-datalake-store==0.5.0 -azure-mgmt-datamigration==0.1.0 -azure-mgmt-deploymentmanager==0.2.0 -azure-mgmt-devtestlabs==2.2.0 -azure-mgmt-dns==2.1.0 -azure-mgmt-eventgrid==2.2.0 -azure-mgmt-eventhub==3.0.0 -azure-mgmt-hdinsight==1.3.0 -azure-mgmt-imagebuilder==0.2.1 -azure-mgmt-iotcentral==2.0.0 -azure-mgmt-iothub==0.8.2 -azure-mgmt-iothubprovisioningservices==0.2.0 -azure-mgmt-keyvault==2.1.1 -azure-mgmt-kusto==0.3.0 -azure-mgmt-loganalytics==0.2.0 -azure-mgmt-managementgroups==0.2.0 -azure-mgmt-maps==0.1.0 -azure-mgmt-marketplaceordering==0.2.1 -azure-mgmt-media==1.1.1 -azure-mgmt-monitor==0.7.0 -azure-mgmt-msi==0.2.0 -azure-mgmt-netapp==0.7.0 -azure-mgmt-network==9.0.0 -azure-mgmt-nspkg==3.0.2 -azure-mgmt-policyinsights==0.4.0 -azure-mgmt-privatedns==0.1.0 -azure-mgmt-rdbms==1.9.0 -azure-mgmt-recoveryservices==0.4.0 -azure-mgmt-recoveryservicesbackup==0.5.0 -azure-mgmt-redis==7.0.0rc1 -azure-mgmt-relay==0.1.0 -azure-mgmt-reservations==0.6.0 -azure-mgmt-resource==8.0.1 -azure-mgmt-search==2.1.0 -azure-mgmt-security==0.1.0 -azure-mgmt-servicebus==0.6.0 -azure-mgmt-servicefabric==0.4.0 -azure-mgmt-signalr==0.3.0 -azure-mgmt-sql==0.15.0 -azure-mgmt-sqlvirtualmachine==0.5.0 -azure-mgmt-storage==7.2.0 -azure-mgmt-trafficmanager==0.51.0 -azure-mgmt-web==0.44.0 -azure-multiapi-storage==0.2.4 -azure-nspkg==3.0.2 -azure-loganalytics==0.1.0 -azure-storage-blob==1.5.0 -azure-storage-common==1.4.2 -azure-storage-nspkg==3.1.0 -bcrypt==3.1.7 -certifi==2019.6.16 -cffi==1.12.3 -chardet==3.0.4 -colorama==0.4.1 -cryptography==2.8 -enum34==1.1.6 -fabric==2.4.0 -funcsigs==1.0.2 -futures==3.2.0 -humanfriendly==4.18 -idna==2.8 -invoke==1.2.0 -ipaddress==1.0.22 -isodate==0.6.0 -Jinja2==2.10.1 -jmespath==0.9.4 -jsmin==2.2.2 -knack==0.6.3 -MarkupSafe==1.1.1 -mock==2.0.0 -monotonic==1.5 -msrest==0.6.9 -msrestazure==0.6.2 -ndg-httpsclient==0.5.1 -oauthlib==3.0.1 -paramiko==2.6.0 -pathlib2==2.3.3 -pbr==5.3.1 -portalocker==1.2.1 -psutil==5.6.3 -pyasn1==0.4.5 -pycparser==2.19 -Pygments==2.4.2 -PyJWT==1.7.1 -PyNaCl==1.3.0 -pyOpenSSL==19.0.0 -pypiwin32==223 -pyreadline==2.1 -python-dateutil==2.8.0 -pytz==2019.1 -pywin32==225 -PyYAML==5.1.1 -requests==2.22.0 -requests-oauthlib==1.2.0 -scandir==1.10.0 -scp==0.13.2 -six==1.12.0 -sshtunnel==0.1.5 -tabulate==0.8.3 -typing==3.7.4 -urllib3==1.25.3 -vsts==0.1.25 -vsts-cd-manager==1.0.2 -wcwidth==0.1.7 -websocket-client==0.56.0 -xmltodict==0.12.0 diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 0f7be2fe2cc..a37f625b5a5 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -8,6 +8,7 @@ from __future__ import print_function from codecs import open from setuptools import setup, find_packages +import sys try: from azure_bdist_wheel import cmdclass @@ -27,7 +28,6 @@ pass else: import re - import sys m = re.search(r'__version__\s*=\s*[\'"](.+?)[\'"]', content) if not m: @@ -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', @@ -157,6 +155,9 @@ with open('HISTORY.rst', 'r', encoding='utf-8') as f: HISTORY = f.read() +if sys.version_info < (3, 4): + raise ImportError("azure-cli requires Python 3.4 or later.") + setup( name='azure-cli', version=VERSION, diff --git a/tools/setup.py b/tools/setup.py index 8f4e041a4b4..950f7e6d980 100644 --- a/tools/setup.py +++ b/tools/setup.py @@ -4,6 +4,7 @@ # -------------------------------------------------------------------------------------------- from setuptools import setup +import sys VERSION = "0.1.1" @@ -12,8 +13,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', @@ -37,6 +36,9 @@ 'colorama>=0.3.7' ] +if sys.version_info < (3, 4): + raise ImportError("azure-cli requires Python 3.4 or later.") + setup( name='azure-cli-dev-tools', version=VERSION,