Skip to content

Commit 3fb44dc

Browse files
committed
pkg_resources was deprecated in Python 3.12, switch to packaging instead
1 parent b2e0c6f commit 3fb44dc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

release.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
from subprocess import CalledProcessError
66

7-
from pkg_resources import parse_version
7+
from packaging.version import parse
88

99
from async_subprocess import (
1010
call,
@@ -235,7 +235,7 @@ async def release(
235235
working_dir=working_dir,
236236
readonly=False,
237237
)
238-
if parse_version(old_version) >= parse_version(new_version):
238+
if parse(old_version) >= parse(new_version):
239239
raise ReleaseException(
240240
f"old version is {old_version} but the new version {new_version} is not newer"
241241
)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ requests
44
sentry-sdk
55
tornado
66
virtualenv
7+
packaging

0 commit comments

Comments
 (0)