Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions azure-pipelines-full-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -46,6 +48,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -66,6 +70,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -86,6 +92,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand Down
19 changes: 19 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,11 @@ jobs:
--rm -v $PYPI_FILES:/mnt/pypi python:3.9 \
/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 3.10 =="
docker run \
--rm -v $PYPI_FILES:/mnt/pypi python:3.10 \
/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: TestCore
Expand All @@ -395,6 +400,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -414,6 +421,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -436,6 +445,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
Expand All @@ -459,6 +470,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -478,6 +491,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -497,6 +512,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -516,6 +533,8 @@ jobs:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand Down
7 changes: 2 additions & 5 deletions src/azure-cli-core/azure/cli/core/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _print_header(self, cli_name, help_file):
def _print_detailed_help(self, cli_name, help_file):
CLIPrintMixin._print_extensions_msg(help_file)
super(CLIPrintMixin, self)._print_detailed_help(cli_name, help_file)
self._print_az_find_message(help_file.command, self.cli_ctx.enable_color)
self._print_az_find_message(help_file.command)

@staticmethod
def _get_choices_defaults_sources_str(p):
Expand All @@ -88,12 +88,9 @@ def _print_examples(help_file):
print('')

@staticmethod
def _print_az_find_message(command, enable_color):
from colorama import Style
def _print_az_find_message(command):
indent = 0
message = 'To search AI knowledge base for examples, use: az find "az {}"'.format(command)
if enable_color:
message = Style.BRIGHT + message + Style.RESET_ALL
Comment on lines -95 to -96
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We remove the color here as it outshines whole original help messages and examples.

_print_indent(message + '\n', indent)

@staticmethod
Expand Down
3 changes: 2 additions & 1 deletion src/azure-cli-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: MIT License',
]

Expand All @@ -49,7 +50,7 @@
'cryptography',
'humanfriendly>=4.7,<10.0',
'jmespath',
'knack~=0.8.2',
'knack~=0.8.3',
'msal-extensions>=0.3.0,<0.4',
'msal>=1.15.0,<2.0.0',
'paramiko>=2.0.8,<3.0.0',
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli-telemetry/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: MIT License',
]

Expand Down
1 change: 1 addition & 0 deletions src/azure-cli-testsdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: MIT License',
]

Expand Down
6 changes: 3 additions & 3 deletions src/azure-cli/requirements.py3.Darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bcrypt==3.2.0
certifi==2019.6.16
cffi==1.14.4
chardet==3.0.4
colorama==0.4.1
colorama==0.4.4
ConfigArgParse==0.14.0
cryptography==3.3.2
fabric==2.4.0
Expand All @@ -108,7 +108,7 @@ javaproperties==0.5.1
Jinja2==2.11.3
jmespath==0.9.5
jsondiff==1.3.0
knack==0.8.2
knack==0.8.3
MarkupSafe==1.1.1
msal-extensions==0.3.0
msal==1.15.0
Expand All @@ -132,7 +132,7 @@ scp==0.13.2
semver==2.13.0
six==1.14.0
sshtunnel==0.1.5
tabulate==0.8.3
tabulate==0.8.9
Copy link
Member Author

@jiasli jiasli Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old tabulate uses string to compare version, resulting in "10" < "3", which is certainly wrong.

    if python_version_tuple() >= ("3", "3", "0"):
        from collections.abc import Iterable
    else:
>       from collections import Iterable
E       ImportError: cannot import name 'Iterable' from 'collections' (/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/collections/__init__.py)

env/lib/python3.10/site-packages/tabulate.py:16: ImportError

This is fixed by astanin/python-tabulate#105.

urllib3==1.26.5
vsts==0.1.25
wcwidth==0.1.7
Expand Down
6 changes: 3 additions & 3 deletions src/azure-cli/requirements.py3.Linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bcrypt==3.2.0
certifi==2019.6.16
cffi==1.14.4
chardet==3.0.4
colorama==0.4.1
colorama==0.4.4
ConfigArgParse==0.14.0
cryptography==3.3.2
distro==1.6.0
Expand All @@ -109,7 +109,7 @@ javaproperties==0.5.1
Jinja2==2.11.3
jmespath==0.9.5
jsondiff==1.3.0
knack==0.8.2
knack==0.8.3
MarkupSafe==1.1.1
msal-extensions==0.3.0
msal==1.15.0
Expand All @@ -133,7 +133,7 @@ scp==0.13.2
semver==2.13.0
six==1.14.0
sshtunnel==0.1.5
tabulate==0.8.3
tabulate==0.8.9
urllib3==1.26.5
vsts==0.1.25
wcwidth==0.1.7
Expand Down
6 changes: 3 additions & 3 deletions src/azure-cli/requirements.py3.windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bcrypt==3.2.0
certifi==2019.6.16
cffi==1.14.4
chardet==3.0.4
colorama==0.4.1
colorama==0.4.4
cryptography==3.3.2
fabric==2.4.0
humanfriendly==9.1
Expand All @@ -107,7 +107,7 @@ javaproperties==0.5.1
Jinja2==2.11.3
jmespath==0.9.5
jsondiff==1.3.0
knack==0.8.2
knack==0.8.3
MarkupSafe==1.1.1
msal-extensions==0.3.0
msal==1.15.0
Expand All @@ -133,7 +133,7 @@ scp==0.13.2
semver==2.13.0
six==1.14.0
sshtunnel==0.1.5
tabulate==0.8.3
tabulate==0.8.9
urllib3==1.26.5
vsts==0.1.25
wcwidth==0.1.7
Expand Down
2 changes: 2 additions & 0 deletions src/azure-cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: MIT License',
]

Expand Down Expand Up @@ -136,6 +137,7 @@
'azure-synapse-managedprivateendpoints~=0.3.0',
'azure-synapse-spark~=0.2.0',
'chardet~=3.0.4',
'colorama~=0.4.4',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colorama was removed from Knack for non-Windows systems (microsoft/knack#249), but azure-cli still needs it.

'fabric~=2.4',
'javaproperties~=0.5.1',
'jsondiff~=1.3.0',
Expand Down