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

Commit

Permalink
fix: add support for python3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
sileht committed Nov 4, 2023
1 parent 8188113 commit fbd9834
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
target: "py310"
- python-version: "3.11"
target: "py311"
- python-version: "3.12"
target: "py312"
- python-version: "3.11"
target: "pep8"
steps:
Expand Down
3 changes: 2 additions & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ shared:
- check-success=tox (3.9, py39)
- check-success=tox (3.10, py310)
- check-success=tox (3.11, py311)
- check-success=tox (3.11, pep8)
- check-success=tox (3.12, py312)
- check-success=tox (3.12, pep8)

queue_rules:
- name: default
Expand Down
8 changes: 6 additions & 2 deletions git_pull_request/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import argparse
import distutils.util
import glob
import itertools
import logging
Expand Down Expand Up @@ -144,7 +143,12 @@ def git_config_add_argument(parser, option, *args, **kwargs):
default = False
default = git_get_config(option[2:], default)
if isboolean and isinstance(default, str):
default = distutils.util.strtobool(default)
if default in ("y", "yes", "t", "true", "on", "1"):
default = True
elif default in ("n", "no", "f", "false", "off", "0"):
default = False
else:
raise ValueError("{default} is not a valid boolean value")
kwargs["default"] = default
return parser.add_argument(option, *args, **kwargs)

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ classifier =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12

[options]
packages = find:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py35,py36,py37,py38,pep8
envlist = py38,py39,py310,py311,py312,pep8

[testenv]
usedevelop = True
Expand Down

0 comments on commit fbd9834

Please sign in to comment.