Skip to content

Commit 5c47a41

Browse files
authored
Use looseversion instead of deprecated distutils in make_release.py (#1391)
* Address Python 3.12+ unrecognized escape sequences syntax warnings * Remove Python 3.12 maximum version restriction
1 parent c4072a3 commit 5c47a41

File tree

3 files changed

+431
-223
lines changed

3 files changed

+431
-223
lines changed

etc/make_release.py

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

4040
import textwrap
4141
import re
42-
from distutils.version import LooseVersion
42+
from looseversion import LooseVersion
4343
import os
4444
import glob
4545
import subprocess
@@ -621,7 +621,7 @@ def read_github_creds(github_token_file):
621621
Read the GitHub token from the specified file and return it as a string.
622622
"""
623623

624-
token_re = re.compile('^(?:Token - )?(?P<tok>\w{40}).*$')
624+
token_re = re.compile(r'^(?:Token - )?(?P<tok>\w{40}).*$')
625625
github_token = None
626626

627627
with open(github_token_file, 'rb') as token_stream:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "mongo-cxx-driver"
33
version = "0.1.0"
44
description = "For development only."
5-
requires-python = ">=3.10,<3.12"
5+
requires-python = ">=3.10"
66
dependencies = []
77

88
[dependency-groups]
@@ -35,7 +35,7 @@ config_generator = [
3535
]
3636

3737
make_release = [
38-
# etc/make_release.py (requires python<3.12)
38+
# etc/make_release.py
3939
"click>=6.0",
4040
"gitpython>=3.1",
4141
"jira>=3.1",

0 commit comments

Comments
 (0)