Skip to content

Usages of urllib.request.urlopen should be replaced by requests #26008

@jiasli

Description

@jiasli

When verifying HTTPS connection, urlopen and requests by default use different CA bundles:

Such inconsistency frequently causes issues. It is also difficult to handle such inconsistency correctly:

According to the documentation of urllib.request:

https://docs.python.org/3/library/urllib.request.html

The Requests package is recommended for a higher-level HTTP client interface.

All Azure Python SDKs use requests to make HTTPS request, so does azure.cli.core.util.send_raw_request, so all usages of urllib.request.urlopen should be replaced by requests.

Metadata

Metadata

Assignees

Labels

Azure CLI TeamThe command of the issue is owned by Azure CLI teamCoreCLI core infrastructureact-platform-engineering-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions