Bug 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp()
Summary: [python3.12] hplip tools/binaries crash due depending on removed configparser...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:a6a22bec60c78ef9b6f9a5b85fb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-07 21:18 UTC by Mikhail
Modified: 2023-07-20 14:20 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-07-20 14:20:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (770 bytes, text/plain)
2023-07-07 21:18 UTC, Mikhail
no flags Details
File: environ (904 bytes, text/plain)
2023-07-07 21:18 UTC, Mikhail
no flags Details
File: mountinfo (3.31 KB, text/plain)
2023-07-07 21:18 UTC, Mikhail
no flags Details
File: open_fds (759 bytes, text/plain)
2023-07-07 21:18 UTC, Mikhail
no flags Details
File: namespaces (171 bytes, text/plain)
2023-07-07 21:18 UTC, Mikhail
no flags Details
File: backtrace (900 bytes, text/plain)
2023-07-07 21:18 UTC, Mikhail
no flags Details
File: cpuinfo (2.92 KB, text/plain)
2023-07-07 21:18 UTC, Mikhail
no flags Details
Proposed patch (551 bytes, patch)
2023-07-13 16:00 UTC, Zdenek Dohnal
no flags Details | Diff

Description Mikhail 2023-07-07 21:18:02 UTC
Version-Release number of selected component:
hplip-3.23.5-2.fc39

Additional info:
reporter:       libreport-2.17.11
kernel:         6.5.0-0.rc0.20230706gitc17414a273b8.12.fc39.x86_64+debug
cmdline:        /usr/bin/python3 -B /usr/lib/cups/backend/hpfax
cgroup:         0::/system.slice/cups.service
uid:            0
reason:         g.py:131:read:AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?
executable:     /usr/lib/cups/backend/hpfax
type:           Python3
package:        hplip-3.23.5-2.fc39
runlevel:       unknown
exception_type: AttributeError
crash_function: read
interpreter:    python3-3.12.0~b3-2.fc39.x86_64

Truncated backtrace:
g.py:131:read:AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

Traceback (most recent call last):
  File "/usr/lib/cups/backend/hpfax", line 86, in <module>
    from base.g import *
  File "/usr/share/hplip/base/g.py", line 240, in <module>
    sys_conf = SysConfig()
               ^^^^^^^^^^^
  File "/usr/share/hplip/base/g.py", line 185, in __init__
    ConfigBase.__init__(self, '/etc/hp/hplip.conf')
  File "/usr/share/hplip/base/g.py", line 90, in __init__
    self.read()
  File "/usr/share/hplip/base/g.py", line 131, in read
    self.conf.readfp(fp)
    ^^^^^^^^^^^^^^^^
AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

Local variables in innermost frame:
self: <base.g.SysConfig object at 0x7f25b4057cb0>
filename: '/etc/hp/hplip.conf'
fp: <_io.TextIOWrapper name='/etc/hp/hplip.conf' mode='r' encoding='UTF-8'>

Comment 1 Mikhail 2023-07-07 21:18:06 UTC
Created attachment 1974583 [details]
File: os_info

Comment 2 Mikhail 2023-07-07 21:18:07 UTC
Created attachment 1974584 [details]
File: environ

Comment 3 Mikhail 2023-07-07 21:18:09 UTC
Created attachment 1974585 [details]
File: mountinfo

Comment 4 Mikhail 2023-07-07 21:18:11 UTC
Created attachment 1974586 [details]
File: open_fds

Comment 5 Mikhail 2023-07-07 21:18:13 UTC
Created attachment 1974587 [details]
File: namespaces

Comment 6 Mikhail 2023-07-07 21:18:14 UTC
Created attachment 1974588 [details]
File: backtrace

Comment 7 Mikhail 2023-07-07 21:18:16 UTC
Created attachment 1974589 [details]
File: cpuinfo

Comment 8 Zdenek Dohnal 2023-07-13 16:00:43 UTC
Created attachment 1975628 [details]
Proposed patch

The readfp is removed from configparser module, so we need to use 'read_file'.

Comment 9 Zdenek Dohnal 2023-07-20 14:20:03 UTC
Fixed in rawhide https://bodhi.fedoraproject.org/updates/FEDORA-2023-077b459bc2 .


Note You need to log in before you can comment on or make changes to this bug.