-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Customer UsageService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Milestone
Description
Describe the bug
The latest release of azure-cli v2.69.0 depends on a pre-release version of azure-batch
azure-cli/src/azure-cli/setup.py
Line 55 in cf83ff0
| 'azure-batch~=15.0.0b1', |
The class signature has changed significantly from BatchServiceClient to BatchClient
Related command
Using the python SDK:
- Install latest version of azure-batch from PyPI (https://pypi.org/project/azure-batch/)
- Install latest version of azure-cli from PyPI (https://pypi.org/project/azure-cli/)
from azure.batch import BatchServiceClient
Errors
ImportError: cannot import name 'BatchServiceClient' from 'azure.batch'...
Issue script & Debug output
ImportError while importing test module '/home/vsts/work/1/s/Pipelines/RestartPools/tests/test_restart_pools.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
Pipelines/RestartPools/tests/test_restart_pools.py:11: in <module>
import restart_pools as p
Pipelines/RestartPools/activities/python/restart_pools.py:35: in <module>
import common.batch.pool as p
common/common/batch/pool.py:6: in <module>
from azure.batch import BatchServiceClient
E ImportError: cannot import name 'BatchServiceClient' from 'azure.batch' (/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/site-packages/azure/batch/__init__.py)
Expected behavior
No discrepancy between latest stable versions of azure-batch and azure-cli
Environment Summary
azure-cli: 2.69.0
azure-batch: 14.2.0
Python: 3.10.16
OS: Ubuntu-22.04
Additional context
Related issue: Azure/azure-sdk-for-python#39676
Metadata
Metadata
Assignees
Labels
Customer UsageService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.