From 5a7a632b81a3980e61916d6ffcc22a105fc67524 Mon Sep 17 00:00:00 2001 From: Fred van Dijk Date: Sun, 14 Apr 2024 15:44:56 +0200 Subject: [PATCH] Replace configparser.readfp with readfile for Python 3.12 compatibility --- docs/155.bugfix | 1 + src/collective/taxonomy/exportimport.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 docs/155.bugfix diff --git a/docs/155.bugfix b/docs/155.bugfix new file mode 100644 index 00000000..f80359b8 --- /dev/null +++ b/docs/155.bugfix @@ -0,0 +1 @@ +Replace configparser.readfp with readfile for Python 3.12 compatibility [@fredvd] diff --git a/src/collective/taxonomy/exportimport.py b/src/collective/taxonomy/exportimport.py index e0b98a35..4e19312d 100644 --- a/src/collective/taxonomy/exportimport.py +++ b/src/collective/taxonomy/exportimport.py @@ -17,7 +17,7 @@ def parseConfigFile(data): except Exception as exception: raise exception - config.readfp(StringIO(data.decode("utf-8"))) + config.read_file(StringIO(data.decode("utf-8"))) return config