Bug 32802

Summary: hplip: incompatible with python 3.12
Product: Mageia Reporter: Hans Micheelsen <micheelsen>
Component: RPM PackagesAssignee: Jani Välimaa <jani.valimaa>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
URL: https://developers.hp.com/hp-linux-imaging-and-printing
Whiteboard:
Source RPM: hplip-3.23.12-1.mga10.src.rpm CVE:
Status comment:

Description Hans Micheelsen 2024-02-03 11:47:28 CET
Description of problem: 
All programs in the hplib are broken apparently due to an error in the python code. Here is an example of call to /usr/bin/hp-query:

Traceback (most recent call last):
  File "/usr/bin/hp-query", line 32, 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'?



Version-Release number of selected component (if applicable):
 hplib-3.23.12

How reproducible:
Always

Steps to Reproduce:
1. Call any command in hplib, e.g. hp-query
2.
3.
Comment 1 Jani Välimaa 2024-02-04 14:27:13 CET
Please test with hplip-3.23.12-2.mga10 building in BS at the moment.

Summary: Python error in package. All programs in package broken => hplip: incompatible with python 3.12

Comment 2 Lewis Smith 2024-02-04 20:45:02 CET
Jani, since you are already dealing with this, please excuse me assigning the bug to you. Re-assign it if you wish.

Assignee: bugsquad => jani.valimaa

Comment 3 Hans Micheelsen 2024-02-04 21:03:38 CET
I installed hplip-3.23.12-2.mga10. Now it displays:

Traceback (most recent call last):
  File "/usr/bin/hp-check", line 34, in <module>
    from base.sixext import PY3, to_string_utf8
ModuleNotFoundError: No module named 'base'
Comment 4 Hans Micheelsen 2024-02-05 01:12:31 CET
Ok, works with hplip-3.23.12-3.mga10.
What should be tested before closing this bug-report?
Comment 5 Jani Välimaa 2024-02-05 16:11:31 CET
(In reply to Hans Micheelsen from comment #4)
> Ok, works with hplip-3.23.12-3.mga10.
> What should be tested before closing this bug-report?

You can close this bug if you don't see any other python breakages.
Comment 6 Hans Micheelsen 2024-02-06 20:05:24 CET
I don't see any problems. I'll close.

Status: NEW => RESOLVED
Resolution: (none) => FIXED