Skip to content

Commit f20fcb6

Browse files
fix: remove usage of pkg_resources
1 parent d4d2bdd commit f20fcb6

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/ai-examples/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.2.6
7+
++++++
8+
* Replace deprecated pkg_resources with packaging for Python 3.13 compatibility
9+
610
0.2.5
711
++++++
812
* Send appropriate User ID hash

src/ai-examples/azext_ai_examples/custom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import json
99
import re
1010
import requests
11-
from pkg_resources import parse_version
11+
from packaging.version import Version
1212

1313
from azure.cli.core import telemetry as telemetry_core
1414
from azure.cli.core import __version__ as core_version
@@ -85,7 +85,7 @@ def ping_aladdin_service():
8585

8686

8787
def call_aladdin_service(query):
88-
version = str(parse_version(core_version))
88+
version = str(Version(core_version))
8989
correlation_id = telemetry_core._session.correlation_id # pylint: disable=protected-access
9090
subscription_id = telemetry_core._get_azure_subscription_id() # pylint: disable=protected-access
9191

src/ai-examples/setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
logger.warn("Wheel is not available, disabling bdist_wheel hook")
1616

1717
# HISTORY.rst entry.
18-
VERSION = '0.2.5'
18+
VERSION = '0.2.6'
1919

2020
# The full list of classifiers is available at
2121
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
@@ -34,7 +34,9 @@
3434
'License :: OSI Approved :: MIT License',
3535
]
3636

37-
DEPENDENCIES = []
37+
DEPENDENCIES = [
38+
'packaging',
39+
]
3840

3941
with open('README.md', 'r', encoding='utf-8') as f:
4042
README = f.read()

0 commit comments

Comments
 (0)