Skip to content

Commit

Permalink
support for python 3.12 (#1019)
Browse files Browse the repository at this point in the history
* add support for python 3.12

python3.12 removed `readfp()`, recommended to use `read_file()` instead

* Add versions 3.10 through 3.12 to test matrix

* CI: fix

- avoid decimal rounding
- pull back 3.11 and 3.12 since we still have some issues to work
  through

---------

Co-authored-by: ryneeverett <ryneeverett@gmail.com>
  • Loading branch information
NeilHanlon and ryneeverett authored Dec 8, 2023
1 parent eb19a70 commit 0a6c9ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bugwarrior.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
jira-version: [1.0.10, 2.0.0]
steps:
- name: Checkout code
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
jira-version: [1.0.10, 2.0.0]
architecture: [aarch64, ppc64le]

Expand Down
3 changes: 2 additions & 1 deletion bugwarrior/config/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def parse_file(configpath: str) -> dict:
config = tomllib.load(f)
else:
rawconfig = BugwarriorConfigParser()
rawconfig.readfp(codecs.open(configpath, "r", "utf-8",))
with codecs.open(configpath, "r", "utf-8",) as buff:
rawconfig.read_file(buff)
config = {}
for section in rawconfig.sections():
if section in ['hooks', 'notifications']:
Expand Down

0 comments on commit 0a6c9ad

Please sign in to comment.