From: Neil Hanlon Date: Fri, 8 Dec 2023 14:55:24 -0500 Subject: support for python 3.12 (#1019) * 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 --- bugwarrior/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bugwarrior/config.py b/bugwarrior/config.py index c36b9a3..759d233 100644 --- a/bugwarrior/config.py +++ b/bugwarrior/config.py @@ -227,7 +227,8 @@ def fix_logging_path(config, main_section): def load_config(main_section, interactive=False): config = BugwarriorConfigParser({'log.level': "INFO", 'log.file': None}, allow_no_value=True) path = get_config_path() - config.readfp(codecs.open(path, "r", "utf-8",)) + with codecs.open(path, "r", "utf-8",) as buff: + config.read_file(buff) config.interactive = interactive config.data = BugwarriorData(get_data_path(config, main_section)) config.set(main_section, 'log.file', fix_logging_path(config, main_section))