Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Python 3 upgrade forces removal of hplip & friends  (Read 3131 times)

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.431
    • Land of the Buckeye
[EN] Python 3 upgrade forces removal of hplip & friends
« on: 2025/01/18, 13:46:30 »
For some days now the apt --solver 3.0 has allowed me to leave libreoffice and some others un-upgraded, so I could keep hplip, hplip-gui, and hplip-data. This morning, the upgrade to python3 (3.13.1-2) will force removal of hplip. I'm sure this situation will be fixed, but I'm not sure when that day will come, and my only printer is an HP Laserjet.

Be careful, friends!   :-\
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline eriefisher

  • User
  • Posts: 334
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #1 on: 2025/01/18, 14:44:08 »
It was actually a mismatch between python parts. It also wanted to remove some uno stuff thus the issue with libreoffice. It may have been pythonenv, I forget.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.431
    • Land of the Buckeye
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #2 on: 2025/01/18, 18:11:06 »
Being sid, I don't want to let my main productivity system to go very many days with no upgrade. Happily, I have a Win10 VM that makes a dandy printer driver, when necessary. 
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline eriefisher

  • User
  • Posts: 334
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #3 on: 2025/01/18, 18:16:33 »
I'm not sure about your printer but many will run driverless these days.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.431
    • Land of the Buckeye
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #4 on: 2025/01/18, 18:53:47 »
It's an antique LOL -- LaserJet p1606dn. But it's been a good printer for a long time, and works flawlessly.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline GoinEasy9

  • User
  • Posts: 567
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #5 on: 2025/01/19, 14:11:33 »
Thanks Dibl, this is why I always check the upgrade warnings before doing an update.

Tom
Linux Counter number 348347

Offline tranquil

  • User
  • Posts: 118
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #6 on: 2025/01/19, 19:52:49 »
Being sid, I don't want to let my main productivity system to go very many days with no upgrade. Happily, I have a Win10 VM that makes a dandy printer driver, when necessary.

I ran apt upgrade today and that doesn't want to remove hplip.
Dual-booting Debian Stable and Unstable with Openbox window manager and Tint2 panel.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.431
    • Land of the Buckeye
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #7 on: 2025/01/19, 20:03:23 »
I ran apt upgrade today and that doesn't want to remove hplip.

I see that  -- I can confirm. Thanks for the good news!
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline seasons

  • User
  • Posts: 282
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #8 on: 2025/01/21, 16:06:10 »
I uninstalled it and now I can't reinstall it. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1093486
The hplip package needs a new version (3.24.4) anyway: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076032

It looks like the maintainer has been "out to lunch" for a while.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.431
    • Land of the Buckeye
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #9 on: 2025/01/21, 19:14:27 »
Aha -- thanks for this update, confirming what I've seen here. I didn't upgrade again today, when I saw that hplip was to be removed. So I'm still printing .....

However, as said by Giacomo Mulas in his bug report:

Quote
Of course, stalling the transition will, on the long run, end in dependency hell, hence the "important" tag.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline Teriarch

  • User
  • Posts: 88
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #10 on: 2025/01/21, 22:17:48 »
In the meantime you may replace the shebangs
#!/usr/bin/python3
wherever they occur in the hplip and hplip-data packages by
#!/usr/bin/python3.12.

I modified the respective packages accordingly, so if someone
is interested, let me know and I can send you a download link.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.431
    • Land of the Buckeye
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #11 on: 2025/01/22, 21:57:38 »
@Teriarch, thanks for doing that.

Yes, I'd like to try your fixed packages. You can provide the link in a message to me on this forum.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline Teriarch

  • User
  • Posts: 88
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #12 on: 2025/01/22, 23:31:06 »
@dibl

I'm glad someone is willing to test it. I didn't find any issues, but you never know...

You have to install python3.12 though (if not already done so). hplip is restricted
to python 3.12 and when sid went to 3.13 they changed the symbolic link python3
from python3.12 to python3.13. Since hplip uses #!/usr/bin/python3 to mean python3.12
in their python executables, the system would break after the move. To prevent this from happening
they included a  python3 (<< 3.13) dependency in the hplip package. This caused the remove
after the upgrade. So I adapted the headers to #!/usr/bin/python3.12, corrected the dependency
to python3 (<< 3.14) and updated hplip's  version from 3.22.10+dfsg0-5.1 to 3.22.10+dfsg0-5.1b
(in order to account for subsequent official upgrades).

Please be aware that this is not an official version, but rather a proof of concept. For copyright
reasons and since I am not the author of hplip I would rather abstain from making the link public.
Can you provide me with an e-mail address where I can send the link to? If you consider the changes
useful we may contact the original authors and ask for permission.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.431
    • Land of the Buckeye
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #13 on: 2025/01/23, 15:51:19 »
OK, my target system is fully updated and has python3.13.1-2 installed. I see that python3.12.8-1 is available in the testing repo. Do I understand from your post that I need to use apt to remove "python3", then with the testing repo enabled, install "python3=3.12.8-1"?

I simulated removal of python3, and it is quite an impressive screen full of removed packages. I wonder -- is this at least semi-safe to do?

Thanks!
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline Teriarch

  • User
  • Posts: 88
Re: Python 3 upgrade forces removal of hplip & friends
« Reply #14 on: 2025/01/23, 16:12:16 »
You should be able to install python3.12 w/o any removal. Both versions coexist just fine:

$ dpkg -l|grep python3.12
ii  idle-python3.12                                          3.12.8-5                                 all          IDE for Python (v3.12) using Tkinter
ii  libpython3.12-dev:amd64                                  3.12.8-5                                 amd64        Header files and a static library for Python (v3.12)
ii  libpython3.12-minimal:amd64                              3.12.8-5                                 amd64        Minimal subset of the Python language (version 3.12)
ii  libpython3.12-stdlib:amd64                               3.12.8-5                                 amd64        Interactive high-level object-oriented language (standard library, version 3.12)
ii  libpython3.12-testsuite                                  3.12.8-5                                 all          Testsuite for the Python standard library (v3.12)
ii  libpython3.12t64:amd64                                   3.12.8-5                                 amd64        Shared Python runtime library (version 3.12)
ii  python3.12                                               3.12.8-5                                 amd64        Interactive high-level object-oriented language (version 3.12)
ii  python3.12-dev                                           3.12.8-5                                 amd64        Header files and a static library for Python (v3.12)
ii  python3.12-full                                          3.12.8-5                                 amd64        Python Interpreter with complete class library (version 3.12)
ii  python3.12-gdbm                                          3.12.8-5                                 amd64        GNU dbm database support for Python (v3.12)
ii  python3.12-minimal                                       3.12.8-5                                 amd64        Minimal subset of the Python language (version 3.12)
ii  python3.12-tk                                            3.12.8-5                                 amd64        Tkinter - Writing Tk applications with Python (v3.12)
ii  python3.12-venv                                          3.12.8-5                                 amd64        Interactive high-level object-oriented language (pyvenv binary, version 3.12)

$ dpkg -l|grep python3.13
ii  idle-python3.13                                          3.13.1-3                                 all          IDE for Python (v3.13) using Tkinter
ii  libpython3.13:amd64                                      3.13.1-3                                 amd64        Shared Python runtime library (version 3.13)
ii  libpython3.13-dev:amd64                                  3.13.1-3                                 amd64        Header files and a static library for Python (v3.13)
ii  libpython3.13-minimal:amd64                              3.13.1-3                                 amd64        Minimal subset of the Python language (version 3.13)
ii  libpython3.13-stdlib:amd64                               3.13.1-3                                 amd64        Interactive high-level object-oriented language (standard library, version 3.13)
ii  libpython3.13-testsuite                                  3.13.1-3                                 all          Testsuite for the Python standard library (v3.13)
ii  python3.13                                               3.13.1-3                                 amd64        Interactive high-level object-oriented language (version 3.13)
ii  python3.13-dev                                           3.13.1-3                                 amd64        Header files and a static library for Python (v3.13)
ii  python3.13-full                                          3.13.1-3                                 amd64        Python Interpreter with complete class library (version 3.13)
ii  python3.13-gdbm                                          3.13.1-3                                 amd64        GNU dbm database support for Python (v3.13)
ii  python3.13-minimal                                       3.13.1-3                                 amd64        Minimal subset of the Python language (version 3.13)
ii  python3.13-tk                                            3.13.1-3                                 amd64        Tkinter - Writing Tk applications with Python (v3.13)
ii  python3.13-venv                                          3.13.1-3                                 amd64        Interactive high-level object-oriented language (pyvenv binary, version 3.13)
 
Can you post the output of
$ sudo apt-get -s install python3.12