Conversation
| 'PyJWT>=2.1.0', | ||
| 'pyopenssl>=17.1.0', # https://github.com/pyca/pyopenssl/pull/612 | ||
| 'requests[socks]~=2.25.1', | ||
| 'six~=1.12', |
There was a problem hiding this comment.
Remove the dependency from azure-cli-core.
| 'pytz==2019.1', | ||
| 'scp~=0.13.2', | ||
| 'semver==2.13.0', | ||
| 'six>=1.10.0', # six is still used by countless extensions |
There was a problem hiding this comment.
Add six to azure-cli as it can be used by extensions.
|
Misc |
| # the urlopen is imported for automation purpose | ||
| from six.moves.urllib.request import urlopen # noqa, pylint: disable=import-error,unused-import,ungrouped-imports | ||
| from urllib.request import urlopen # noqa, pylint: disable=import-error,unused-import,ungrouped-imports |
There was a problem hiding this comment.
urlopen is never used by custom.py but is patched by test
What is exactly "automation purpose"?
@zhoxing-ms, Could you help confirm if we can remove this line?
There was a problem hiding this comment.
This is because in the previous PR #5328, the reference of urlopen in the method load_images_from_aliases_doc() was modified to use requests, but the mock path in test_read_images_from_alias_doc() was not synchronously modified.

code link
Therefore, the import of from six.moves.urllib.request import urlopen can be deleted, and we just need to change the mock path to @mock.patch(azure.cli.command_modules.vm.custom.requests, autospec=True)
There was a problem hiding this comment.
We can do this in a separate PR if time permits.
# Conflicts: # src/azure-cli/setup.py
Description
sixwas previously dropped fromazure-cli-core(#17366). It should be dropped fromazure-clias well.However, as there are countless extensions still using
six, we still need to install it. This PR removes all usages of `six.