Skip to content

Commit 54c85fe

Browse files
necusjzjepetty
authored andcommitted
{HCPCache} Remove __import__('pkg_resources').declare_namespace(__name__) (Azure#9590)
* ci: fix * ci: fix * ci: fix * Revert "ci: fix" This reverts commit 5ebabcd.
1 parent 2024f8c commit 54c85fe

6 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/hpc-cache/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
0.1.6
7+
++++++
8+
* Remove `__import__('pkg_resources').declare_namespace(__name__)` to fix the namespace package issue.
9+
610
0.1.5
711
++++++
812
* Migrate to track2 SDK

src/hpc-cache/azext_hpc_cache/_params.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from azure.cli.core.commands.parameters import (
1010
tags_type,
11-
resource_group_name_type,
1211
get_location_type
1312
)
1413
from ._validators import process_container_resource, JunctionAddAction, validate_storage_account_name_or_id

src/hpc-cache/azext_hpc_cache/_validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from knack.util import CLIError
77

88

9-
def process_container_resource(cmd, namespace):
9+
def process_container_resource(cmd, namespace): # pylint: disable=unused-argument
1010
"""Processes the resource group parameter from the storage account and container name"""
1111
if not namespace.storage_account or not namespace.container_name:
1212
raise ValueError('usage error: Please specify --storage-account and --container-name for blob-storage-target')

src/hpc-cache/azext_hpc_cache/tests/latest/test_hpc_cache_scenario.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
from unittest import mock
88

99
from azure.cli.testsdk.scenario_tests import AllowLargeResponse
10-
from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer
10+
from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer, live_only
1111

1212

1313
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
1414

1515

1616
class StorageCacheScenarioTest(ScenarioTest):
1717

18+
@live_only()
1819
@AllowLargeResponse()
1920
@ResourceGroupPreparer(name_prefix='cli_test_hpc_cache')
2021
def test_hpc_cache(self, resource_group):
@@ -104,6 +105,7 @@ def test_hpc_cache(self, resource_group):
104105
self.cmd('az hpc-cache list --query "[?name==\'{cache_name}\']" ',
105106
checks=[self.check('length(@)', 0)])
106107

108+
@live_only()
107109
@AllowLargeResponse()
108110
@ResourceGroupPreparer(name_prefix='cli_hpc_storage_target')
109111
def test_hpc_storage_target(self, resource_group):

src/hpc-cache/azext_hpc_cache/vendored_sdks/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
5-
6-
__import__('pkg_resources').declare_namespace(__name__)

src/hpc-cache/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# TODO: Confirm this is the right version number you want and it matches your
1818
# HISTORY.rst entry.
19-
VERSION = '0.1.5'
19+
VERSION = '0.1.6'
2020

2121
# The full list of classifiers is available at
2222
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
@@ -41,7 +41,7 @@
4141
HISTORY = f.read()
4242

4343
setup(
44-
name='hpc_cache',
44+
name='hpc-cache',
4545
version=VERSION,
4646
description='Microsoft Azure Command-Line Tools StorageCache Extension',
4747
# TODO: Update author and email, if applicable

0 commit comments

Comments
 (0)