Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

Commit ba57443

Browse files
authored
fix: add support for python3.12 (#162)
1 parent 8188113 commit ba57443

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

.github/workflows/ci.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
target: "py310"
2020
- python-version: "3.11"
2121
target: "py311"
22+
- python-version: "3.12"
23+
target: "py312"
2224
- python-version: "3.11"
2325
target: "pep8"
2426
steps:

.mergify.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ shared:
1414
- check-success=tox (3.9, py39)
1515
- check-success=tox (3.10, py310)
1616
- check-success=tox (3.11, py311)
17-
- check-success=tox (3.11, pep8)
17+
- check-success=tox (3.12, py312)
18+
- check-success=tox (3.12, pep8)
1819

1920
queue_rules:
2021
- name: default

git_pull_request/__init__.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
import argparse
16-
import distutils.util
1716
import glob
1817
import itertools
1918
import logging
@@ -144,7 +143,12 @@ def git_config_add_argument(parser, option, *args, **kwargs):
144143
default = False
145144
default = git_get_config(option[2:], default)
146145
if isboolean and isinstance(default, str):
147-
default = distutils.util.strtobool(default)
146+
if default in ("y", "yes", "t", "true", "on", "1"):
147+
default = True
148+
elif default in ("n", "no", "f", "false", "off", "0"):
149+
default = False
150+
else:
151+
raise ValueError("{default} is not a valid boolean value")
148152
kwargs["default"] = default
149153
return parser.add_argument(option, *args, **kwargs)
150154

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ classifier =
1515
Programming Language :: Python :: 3.8
1616
Programming Language :: Python :: 3.9
1717
Programming Language :: Python :: 3.10
18+
Programming Language :: Python :: 3.11
19+
Programming Language :: Python :: 3.12
1820

1921
[options]
2022
packages = find:

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py35,py36,py37,py38,pep8
2+
envlist = py38,py39,py310,py311,py312,pep8
33

44
[testenv]
55
usedevelop = True

0 commit comments

Comments
 (0)