Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.58k stars 2.8k forks source link

Parts of deprecated msrestazure aren't ported to any other library #29023

Open gabuniag opened 1 year ago

gabuniag commented 1 year ago

Issue:

The msrestazure package has been deprecated for quite some time: This package is deprecated and no longer receives updates The authentication part of this package has been moved to [azure-identity](https://pypi.org/project/azure-identity/) The other parts of this library are covered by [azure-mgmt-core](https://pypi.org/project/azure-mgmt-core/) https://github.com/Azure/msrestazure-for-python

This package contains a "Cloud" class, which is necessary to work with various government clouds: https://github.com/Azure/msrestazure-for-python/blob/8e3def8c9927a349596e575de93df76de7a3a2b6/msrestazure/azure_cloud.py#L113 and its instances that have various URL-s hardcoded: https://github.com/Azure/msrestazure-for-python/blob/8e3def8c9927a349596e575de93df76de7a3a2b6/msrestazure/azure_cloud.py#L169

Per learning.microsoft.com, those class instances are used to connect to a government cloud: https://learn.microsoft.com/en-us/azure/developer/python/sdk/azure-sdk-sovereign-domain

Such a class, that would provide similar constants is not implemented elsewhere in the Azure ecosystem.

Suggested Solution

Code found in https://github.com/Azure/msrestazure-for-python/blob/master/msrestazure/azure_cloud.py should be ported to azure-identity. This will allow developers to completely deprecate msrestazure from their codebase.

Why this is important

Since there is no alternative authoritative source of the constants found in AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_GERMAN_CLOUD, various azure-related projects need to either: Depend on a deprecated project or: Implement "Cloud" class and its instances locally, thus having to maintain it locally. Both solutions seem bad.

kristapratico commented 1 year ago

Thanks for your issue @gabuniag, we'll get back to you asap.

lmazuel commented 1 year ago

This is a duplicate of https://github.com/Azure/azure-sdk-for-python/issues/5561 in the intent, we didn't finish the design of this indeed.

CC @johanste

tbennett0 commented 1 year ago

Hi @kristapratico @lmazuel @johanste, is resolution of this issue still in the plans? Thanks!

lmazuel commented 1 year ago

@tbennett0 , @xiangyan99 is working on this as we speak

JimacoMS4 commented 10 months ago

Has there been any progress here? Please see the documentation issue in which it's mentioned above. Thanks!

JimacoMS4 commented 10 months ago

@lmazuel -- are there any updates here? Thanks!

lmazuel commented 10 months ago

We got sidetracked, but @xiangyan99 is still working on this as available.

karpikpl commented 8 months ago

hate to ask again but this has been worked on since August? is there a planned release date?