Skip to content

Commit a424ae0

Browse files
{Bastion} Remove usage of pkg_resources (#9597)
* fix: remove usage of pkg_resources * fix: update test recording API version * fix: update test recording API version * fix: update test recording API version * fix: skip test recording * Revert "fix: update test recording API version" This reverts commit e5d5e98. * refactor: removing packaging dep
1 parent ba772f1 commit a424ae0

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

src/bastion/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
33
Release History
44
===============
5+
1.4.3
6+
++++++
7+
* Replace deprecated pkg_resources with packaging for Python 3.13 compatibility
8+
59
1.4.2
610
++++++
711
* Bug fix for tunnel.

src/bastion/azext_bastion/custom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ def pre_operations(self):
104104

105105
def _test_extension(extension_name):
106106
from azure.cli.core.extension import (get_extension)
107-
from pkg_resources import parse_version
107+
from packaging.version import Version
108108

109109
ext = get_extension(extension_name)
110-
if parse_version(ext.version) < parse_version(SSH_EXTENSION_VERSION):
110+
if Version(ext.version) < Version(SSH_EXTENSION_VERSION):
111111
raise ValidationError(f"SSH Extension (version >= {SSH_EXTENSION_VERSION}) must be installed")
112112

113113

src/bastion/azext_bastion/tests/latest/test_bastion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
class BastionScenario(ScenarioTest):
1515
@AllowLargeResponse(size_kb=9999)
1616
@ResourceGroupPreparer(name_prefix="cli_test_bastion_host_", location="eastus")
17+
@live_only()
1718
def test_bastion_host_crud(self):
1819
self.kwargs.update({
1920
"vnet_name": self.create_random_name("vnet-", 12),

src/bastion/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
# HISTORY.rst entry.
13-
VERSION = '1.4.2'
13+
VERSION = '1.4.3'
1414

1515
# The full list of classifiers is available at
1616
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

0 commit comments

Comments
 (0)