Skip to content

compatibility issues between azure-core and azure-cli: cannot import name 'case_insensitive_dict' from 'azure.core.utils' #23267

@harneetvirk

Description

@harneetvirk

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

Describe the bug
We are noticing compatibility issues between azure-core and azure-cli: cannot import name 'case_insensitive_dict' from 'azure.core.utils'.
Until cli 2.37.0, AZ CLI had the dependency azure-core==1.21.1
Starting 2.38.0, AZ CLI is having dependency azure-core==1.24.0

In case, we install a package that has a direct or indirect dependency on the lower azure-core==1.21.1, the AZ CLI encounters the compatibility issues between azure-core and azure-cli and emits the error: cannot import name 'case_insensitive_dict' from 'azure.core.utils'

To Reproduce
Two ways of reproducing the issue:

  1. Install latest az cli
  2. Install any package that depends on lower older version of azure-core

image

or

  1. Install az cli (2.37.0 or lower)
  2. Install cli ML extension 2.5.0. (ML Extension brings in the latest azure-storage-blob package that depends on latest azure-core=1.24.0).
    az extension add --name ml --version 2.5.0

Expected behavior
CLI should not fail.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions