From 40ad4a973217c9054e449289c23a8c6e202486cf Mon Sep 17 00:00:00 2001 From: sgoral-splunk <138458044+sgoral-splunk@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:24:54 +0100 Subject: [PATCH] feat: replace deprecated readfp method in config parser lib (#401) This PR contains changes suggested by Yevhen Chypachenko. This is the original PR - #400. --- .github/workflows/build-test-release.yml | 2 ++ solnlib/splunkenv.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 4f967c79..23a1f423 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -76,6 +76,8 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" + - "3.13" steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/solnlib/splunkenv.py b/solnlib/splunkenv.py index 20484072..0f29cbce 100644 --- a/solnlib/splunkenv.py +++ b/solnlib/splunkenv.py @@ -309,7 +309,7 @@ def get_conf_stanzas(conf_name: str) -> dict: parser = ConfigParser(**{"strict": False}) parser.optionxform = str - parser.readfp(StringIO(out)) + parser.read_file(StringIO(out)) out = {} for section in parser.sections():