From 4b2631e20e73a6530ad3be814f19f44149c4b94e Mon Sep 17 00:00:00 2001 From: "Paulius M." Date: Tue, 12 Dec 2023 22:20:41 +0100 Subject: [PATCH] Fix: Do not use readfp() --- CHANGES | 4 ++++ devtools/python-hpilo.spec | 2 +- docs/conf.py | 4 ++-- hpilo.py | 4 ++-- hpilo_fw.py | 2 +- setup.py | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 10e4adb..b6ee4a1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +Version 4.4.4, 2023-12-12 + +* Fixes configparser `readfp()` depreciation + Version 4.4.3, 2021-01-16 * Fixes compatibility with OpenSSL v1.1.0+ diff --git a/devtools/python-hpilo.spec b/devtools/python-hpilo.spec index 0bbd60a..d317b34 100644 --- a/devtools/python-hpilo.spec +++ b/devtools/python-hpilo.spec @@ -1,6 +1,6 @@ Summary: Accessing HP iLO interfaces from python Name: python-hpilo -Version: 4.4.3 +Version: 4.4.4 Release: 1%{?dist} Source0: http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz License: GPL/APL diff --git a/docs/conf.py b/docs/conf.py index d5d8012..46286de 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,9 +50,9 @@ # built documents. # # The short X.Y version. -version = '4.4.3' +version = '4.4.4' # The full version, including alpha/beta/rc tags. -release = '4.4.3' +release = '4.4.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/hpilo.py b/hpilo.py index 78c5b31..36737d4 100644 --- a/hpilo.py +++ b/hpilo.py @@ -1,7 +1,7 @@ # (c) 2011-2021 Dennis Kaarsemaker # see COPYING for license details -__version__ = "4.4.3" +__version__ = "4.4.4" import codecs import io @@ -562,7 +562,7 @@ def _attempt_to_fix_broken_xml(self, data): # Remove binary 01 in xml output. This bug was seen on a faulty PSU. if '\x01' in data: data = data.replace('\x01', '') - + # Quite a few unescaped quotation mark bugs keep appearing. Let's try # to fix up the XML by replacing the last occurrence of a quotation mark # *before* the position of the error. diff --git a/hpilo_fw.py b/hpilo_fw.py index c7df6fd..4a8df07 100644 --- a/hpilo_fw.py +++ b/hpilo_fw.py @@ -29,7 +29,7 @@ def config(mirror=None): conf = _download('https://seveas.github.io/python-hpilo/firmware.conf') conf = conf.decode('ascii') parser = ConfigParser.ConfigParser() - parser.readfp(io.StringIO(conf)) + parser.read_file(io.StringIO(conf)) _config = {} for section in parser.sections(): _config[section] = {} diff --git a/setup.py b/setup.py index eb2e9ba..d753ebe 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup(name = "python-hpilo", - version = "4.4.3", + version = "4.4.4", author = "Dennis Kaarsemaker", author_email = "dennis@kaarsemaker.net", url = "http://github.com/seveas/python-hpilo",