2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp()

This commit is contained in:
Zdenek Dohnal 2023-07-17 18:43:31 +02:00
parent 0426012736
commit eb5e881525
2 changed files with 33 additions and 0 deletions

26
hplip-no-readfp.patch Normal file
View File

@ -0,0 +1,26 @@
diff --git a/base/g.py b/base/g.py
index 0aa0e2e..96b3131 100644
--- a/base/g.py
+++ b/base/g.py
@@ -128,7 +128,7 @@ class ConfigBase(object):
try:
fp = open(self.filename, "r")
try:
- self.conf.readfp(fp)
+ self.conf.read_file(fp, self.filename)
except configparser.MissingSectionHeaderError:
print("")
log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename)
diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
index 3110a0f..3761f89 100644
--- a/ui5/devmgr5.py
+++ b/ui5/devmgr5.py
@@ -1072,7 +1072,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
hplip_conf = configparser.ConfigParser()
fp = open("/etc/hp/hplip.conf", "r")
- hplip_conf.readfp(fp)
+ hplip_conf.read_file(fp, "/etc/hp/hplip.conf")
fp.close()
try:

View File

@ -229,6 +229,9 @@ Patch67: hplip-fix-parsing-lpstat.patch
# Remove this once internal openstack handles IPv6 better - test by pinging IPv6 in OpenStack, # Remove this once internal openstack handles IPv6 better - test by pinging IPv6 in OpenStack,
# it should not hang. # it should not hang.
Patch68: hplip-plugin-curl.patch Patch68: hplip-plugin-curl.patch
# 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp()
# Upstream https://bugs.launchpad.net/hplip/+bug/2028001
Patch69: hplip-no-readfp.patch
%if 0%{?fedora} || 0%{?rhel} <= 8 %if 0%{?fedora} || 0%{?rhel} <= 8
# mention hplip-gui if you want to have GUI # mention hplip-gui if you want to have GUI
@ -574,6 +577,9 @@ done
# switch to curl by downstream patch from wget to workaround openstack dropping IPv6 # switch to curl by downstream patch from wget to workaround openstack dropping IPv6
# which causes great delays... # which causes great delays...
%patch -P 68 -p1 -b .curl-switch %patch -P 68 -p1 -b .curl-switch
# 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp()
# Upstream https://bugs.launchpad.net/hplip/+bug/2028001
%patch -P 69 -p1 -b .no-readfp
# Fedora specific patches now, don't put a generic patches under it # Fedora specific patches now, don't put a generic patches under it
%if 0%{?fedora} || 0%{?rhel} <= 8 %if 0%{?fedora} || 0%{?rhel} <= 8
@ -948,6 +954,7 @@ find doc/images -type f -exec chmod 644 {} \;
* Mon Jul 17 2023 Zdenek Dohnal <zdohnal@redhat.com> - 3.23.5-3 * Mon Jul 17 2023 Zdenek Dohnal <zdohnal@redhat.com> - 3.23.5-3
- 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed - 2192131 - parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed
- switch to curl when downloading plugin - switch to curl when downloading plugin
- 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp()
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.23.5-2 * Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.23.5-2
- Rebuilt for Python 3.12 - Rebuilt for Python 3.12