Debian Codegraph @

debian/patches/0012-support-for-python-3.12-1019.patch

raw
1 From: Neil Hanlon <[email protected]>
2 Date: Fri, 8 Dec 2023 14:55:24 -0500
3 Subject: support for python 3.12 (#1019)
4
5 * add support for python 3.12
6
7 python3.12 removed `readfp()`, recommended to use `read_file()` instead
8
9 * Add versions 3.10 through 3.12 to test matrix
10
11 * CI: fix
12
13 - avoid decimal rounding
14 - pull back 3.11 and 3.12 since we still have some issues to work
15 through
16
17 ---------
18
19 Co-authored-by: ryneeverett <[email protected]>
20 ---
21 bugwarrior/config.py | 3 ++-
22 1 file changed, 2 insertions(+), 1 deletion(-)
23
24 diff --git a/bugwarrior/config.py b/bugwarrior/config.py
25 index c36b9a3..759d233 100644
26 --- a/bugwarrior/config.py
27 +++ b/bugwarrior/config.py
28 @@ -227,7 +227,8 @@ def fix_logging_path(config, main_section):
29 def load_config(main_section, interactive=False):
30 config = BugwarriorConfigParser({'log.level': "INFO", 'log.file': None}, allow_no_value=True)
31 path = get_config_path()
32 - config.readfp(codecs.open(path, "r", "utf-8",))
33 + with codecs.open(path, "r", "utf-8",) as buff:
34 + config.read_file(buff)
35 config.interactive = interactive
36 config.data = BugwarriorData(get_data_path(config, main_section))
37 config.set(main_section, 'log.file', fix_logging_path(config, main_section))