Skip to content

Commit

Permalink
Remove python 2.7 support (#978)
Browse files Browse the repository at this point in the history
* Remove python 2.7 support

* Help text fix for private repo import

* Mac agent version update from 10.13 to 10.15 in all our pipelines

* Fix pylint errors

* style fix
  • Loading branch information
ishitam8 committed Mar 31, 2020
1 parent b1fba1f commit b8fd994
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- job: 'Run_Test'
dependsOn : Build_Publish_Azure_CLI_Test_SDK
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- template: templates/run-tests.yml
Expand Down
14 changes: 6 additions & 8 deletions .azure-pipelines/azure-pipelines-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ jobs:
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
Python27:
python.version: '2.x'
Python36:
python.version: '3.6.x'
Python37:
Expand All @@ -91,7 +89,7 @@ jobs:
- job: 'Run_Test_Mac'
dependsOn: ['Build_Publish_Azure_CLI_Test_SDK','Build_Publish_Azure_DevOps_CLI_Extension']
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- template: templates/run-tests.yml
Expand All @@ -101,7 +99,7 @@ jobs:
- job: 'Run_Test_Mac_Azure_CLI_Released_Version'
dependsOn : Build_Publish_Azure_CLI_Test_SDK
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- template: templates/run-tests.yml
Expand All @@ -112,7 +110,7 @@ jobs:
- job: 'Code_Coverage'
dependsOn: 'Build_Publish_Azure_CLI_Test_SDK'
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -149,7 +147,7 @@ jobs:

- job: 'Run_Style_Check'
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- task: UsePythonVersion@0
Expand All @@ -174,7 +172,7 @@ jobs:
- job: 'Run_HelpText_Check'
dependsOn: 'Build_Publish_Azure_CLI_Test_SDK'
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- task: UsePythonVersion@0
Expand All @@ -201,7 +199,7 @@ jobs:
- job: 'Run_Test_From_Old_Release'
dependsOn : Build_Publish_Azure_CLI_Test_SDK
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- script: git checkout release-0.17.0
Expand Down
14 changes: 6 additions & 8 deletions .azure-pipelines/azure-pipelines-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ jobs:
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
Python27:
python.version: '2.x'
Python36:
python.version: '3.6.x'
Python37:
Expand All @@ -62,7 +60,7 @@ jobs:
- job: 'Run_Test_Mac'
dependsOn : Build_Publish_Azure_CLI_Test_SDK
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- template: templates/run-tests.yml
Expand All @@ -72,7 +70,7 @@ jobs:
- job: 'Run_Test_Mac_Azure_CLI_Released_Version'
dependsOn : Build_Publish_Azure_CLI_Test_SDK
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- template: templates/run-tests.yml
Expand All @@ -98,7 +96,7 @@ jobs:
- job: 'Code_Coverage'
dependsOn: 'Build_Publish_Azure_CLI_Test_SDK'
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -135,7 +133,7 @@ jobs:

- job: 'Run_Style_Check'
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- task: UsePythonVersion@0
Expand All @@ -160,7 +158,7 @@ jobs:
- job: 'Run_HelpText_Check'
dependsOn: 'Build_Publish_Azure_CLI_Test_SDK'
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- task: UsePythonVersion@0
Expand All @@ -187,7 +185,7 @@ jobs:
- job: 'Run_Test_From_Old_Release'
dependsOn : Build_Publish_Azure_CLI_Test_SDK
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'

steps:
- script: git checkout release-0.17.0
Expand Down
5 changes: 3 additions & 2 deletions azure-devops/azext_devops/dev/common/artifacttool_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ def _update_artifacttool(uri, release_id):
logger.debug("Trying to remove old release %s", item)
shutil.rmtree(path, ignore_errors=True) # Failing cleanup is not fatal

with humanfriendly.Spinner(label="Downloading Universal Packages tooling ({})"
.format(release_id), total=100, stream=sys.stderr) as spinner:
with humanfriendly.Spinner( # pylint: disable=no-member
label="Downloading Universal Packages tooling ({})"
.format(release_id), total=100, stream=sys.stderr) as spinner:
spinner.step()
logger.debug("Downloading ArtifactTool from %s", uri)

Expand Down
3 changes: 2 additions & 1 deletion azure-devops/azext_devops/dev/common/external_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class ProgressReportingExternalToolInvoker(ExternalToolInvoker):
_spinner = None

def run(self, command_args, env, initial_progress_text, stderr_handler):
with humanfriendly.Spinner(label=initial_progress_text, total=100, stream=sys.stderr) as self._spinner:
with humanfriendly.Spinner( # pylint: disable=no-member
label=initial_progress_text, total=100, stream=sys.stderr) as self._spinner:
self._spinner.step()
# Start the process, process stderr for progress reporting, check the process result
self.start(command_args, env)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def poll_connection_ready(organization, project, connection_id):
colorama.init()
import humanfriendly
import time
with humanfriendly.Spinner(label="Checking resource readiness") as spinner:
with humanfriendly.Spinner(label="Checking resource readiness") as spinner: # pylint: disable=no-member
se_client = get_service_endpoint_client(organization)
while True:
spinner.step()
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/azext_devops/dev/repos/import_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def create_import_request(git_source_url, project=None, repository=None,
user_name=None,
git_service_endpoint_id=None,
organization=None, detect=None):
"""Create a git import request (currently only supports import from public git source)
"""Create a git import request
:param repository: Name or ID of the repository to create the import request in.
:type repository: str
:param git_source_url: Url of the source git repository.
Expand Down
2 changes: 0 additions & 2 deletions azure-devops/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,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.4',
'Programming Language :: Python :: 3.5',
Expand Down
2 changes: 1 addition & 1 deletion doc/dev_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Install pre-reqs

1. Install Python 2.7 or 3.5 or later from python.org, apt-get, or some other installer.
1. Install Python 3.5 or later from python.org, apt-get, or some other installer.

1. Install Virtual Python Environment (virtualenv):

Expand Down
2 changes: 1 addition & 1 deletion doc/samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:
- job:
displayName: 'macOS'
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.15'
steps:
- template: azure-pipelines-steps-mac.yml

Expand Down

0 comments on commit b8fd994

Please sign in to comment.