• Bug#1109729: painintheapt relies on deprecated slixmpp 'process' API th

    From Gerald Turner@21:1/5 to All on Tue Jul 22 17:50:01 2025
    Package: painintheapt
    Version: 0.20220226-3
    Severity: important

    Dear Maintainer,

    Running painintheapt on trixie (or bookworm-backports) fails with the
    following error:

    # painintheapt -t
    Using slower stringprep, consider using cargo to build the faster version in rust.
    'JabberBot' object has no attribute 'process'

    Upon investigation, the JabberBot object is a slixmpp.ClientXMPP from
    the python3-slixmpp package.

    Within the source package for slixmpp, the following documentation is
    found in docs/howto/remove_process.rst:

    Starting from slixmpp 1.8.0, running ``process()`` on an XMLStream/ClientXMPP/ComponentXMPP instance is deprecated, and
    starting from 1.9.0, it will be removed.

    At the end of this document are a few examples of how to migrate the
    code. I'll give them a try a hopefully submit a patch.


    -- System Information:
    Debian Release: 13.0
    APT prefers testing-security
    APT policy: (700, 'testing-security'), (700, 'testing')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.12.35+deb13-cloud-amd64 (SMP w/2 CPU threads; PREEMPT)
    Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages painintheapt depends on:
    ii python3 3.13.5-1
    ii python3-apt 3.0.0
    ii python3-prettytable 3.15.1-1
    ii python3-slixmpp 1.10.0-1

    painintheapt recommends no packages.

    Versions of packages painintheapt suggests:
    ii cron [cron-daemon] 3.0pl1-197
    ii systemd 257.7-1

    -- Configuration Files:
    /etc/painintheapt.conf [Errno 13] Permission denied: '/etc/painintheapt.conf'

    -- no debconf information

    --
    Gerald Turner <[email protected]> Encrypted mail preferred!
    OpenPGP: 4096R / CA89 B27A 30FA 66C5 1B80 3858 EC94 2276 FDB8 716D

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQKTBAEBCgB9FiEEJIXNbSMPbqfSloTGvKAfB3Gpb80FAmh/sNNfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDI0 ODVDRDZEMjMwRjZFQTdEMjk2ODRDNkJDQTAxRjA3NzFBOTZGQ0QACgkQvKAfB3Gp b816GA/+Pqdx55/Sl653s0eIuSknAcIWtl0SBHplaWenWxQhr65JCI5Pdg9TJrkv 2+iBztjfcG9ozkJ74DStKdgeLDcxxWGb0KnQi37On5NcviIvMFpoOOgGVkhj46Ys RUSwQOcdRFeJDRPhE8M2CjSu+zJeAh0KYk7/6R4hI292BXgYhcYuljcH0Og2pNRW weehQc+jL3dqX4pvFO6YZjIu5KkzSMxGS/C3Qi+Iw4WlILxw+EuW8mnpOYiJDyUB Oimr3RIqoDQs5o8Z0KTJDDyEq/o4iS+9Hpo5f9+pygMrmzQMcfS2RAyFTCx2OgUT a6fX0fh7IhOTO7I1Uozqt0Ugv21Rvxqgfj2nvF+lxupKdJiTXh+h+eLdCRXvZglX iN/L8bTdQRN4V7xynTZmAnOuE68RMxuZ/j9UR08ZBaAbcW3u89JEQIYyrEgaslcv iVAYgFCpLEy0ys6TyGHs4FXQTQqQN+YWlSu9/bKEe/AOOSaua8n9cKGpZ1cSZKKe GkE0nJ5iA5XoH10oUoWALz9Ftn/yv9/q3c/OLBOhew2eKzQ//
  • From Gerald Turner@21:1/5 to All on Tue Jul 22 22:20:01 2025
    --=-=-=
    Content-Type: text/plain
    Content-Transfer-Encoding: quoted-printable

    Control: tags -1 + patch

    Attached patch gets the command working again (verified XMPP messages
    are received), however it outputs some noise. Maybe it needs a task
    queue with a sleep.

    # painintheapt -t
    Using slower stringprep, consider using cargo to build the faster version in rust.
    Task was destroyed but it is pending!
    task: <Task pending name='Task-1' coro=<XMLStream.run_filters() done, defined at /usr/lib/python3/dist-packages/slixmpp/xmlstream/xmlstream.py:1265> wait_for=<Future cancelled>>

    --
    Gerald Turner <[email protected]> Encrypted mail preferred!
    OpenPGP: 4096R / CA89 B27A 30FA 66C5 1B80 3858 EC94 2276 FDB8 716D

    --=-=-Content-Type: text/x-diff
    Content-Disposition: inline; filename=remove_process
    Content-Transfer-Encoding: quoted-printable

    Description: Remove obsolete slixmpp 'process' usage
    The slixmpp library has removed 'process' method since 1.9.0.
    Author: Gerald Turner <[email protected]>
    Bug-Debian: https://bugs.debian.org/1109729
    Last-Update: 2025-07-22

    --- painintheapt-0.20220226.orig/painintheapt
    +++ painintheapt-0.20220226/painintheapt
    @@ -5,6 +5,7 @@

    # Python standard modules
    import argparse
    +import asyncio
    import collections
    import configparser
    import email.mime.text
    @@ -251,7 +252,7 @@ def sendxmpp(config, config_dir, table,
    xmpp.register_plugin("xep_0199") # XMPP ping

    xmpp.connect()
    - xmpp.process(forever=False)
    + asyncio.get_event_loop().run_until_complete(xmpp.disconnected)


    def sendsmtp(config, con
  • From Gerald Turner@21:1/5 to Gerald Turner on Wed Jul 23 05:00:01 2025
    --=-=-=
    Content-Type: text/plain
    Content-Transfer-Encoding: quoted-printable

    On Tue, Jul 22 2025, Gerald Turner wrote:
    Attached patch gets the command working again (verified XMPP messages
    are received), however it outputs some noise. Maybe it needs a task
    queue with a sleep.

    Another patch fixing the aforementioned warnings. My guess is that
    slixmpp has a task queue of filters, activated due to painintheapt's
    enablement of pubsub and other XEP's.

    Tested on both bookworm-backports and trixie.

    --
    Gerald Turner <[email protected]> Encrypted mail preferred!
    OpenPGP: 4096R / CA89 B27A 30FA 66C5 1B80 3858 EC94 2276 FDB8 716D

    --=-=-Content-Type: text/x-diff
    Content-Disposition: inline; filename=remove_process_v2 Content-Transfer-Encoding: quoted-printable

    Description: Drain event loop
    The slixmpp library has removed 'process' method since 1.9.0.
    This is a second patch which drains the event loop in clean up warning
    messages.
    Author: Gerald Turner <[email protected]>
    Bug-Debian: https://bugs.debian.org/1109729
    Last-Update: 2025-07-22

    --- painintheapt-0.20220226.orig/painintheapt
    +++ painintheapt-0.20220226/painintheapt
    @@ -252,7 +252,11 @@ def sendxmpp(config, config_dir, table,
    xmpp.register_plugin("xep_0199") # XMPP ping

    xmpp.connect()
    - asyncio.get_event_loop().run_until_complete(xmpp.disconnected)
    +
    + xmpp.loop.run_until_complete(xmpp.disconnected)
    +
    + for task in asyncio.all_tasks(loop=xmpp.loop):
    + task.cancel()


    def se
  • From Martin@21:1/5 to All on Wed Jul 23 10:30:01 2025
    Control: severity -1 grave

    Justification: "makes the package in question unusable by most users"

    Dear Gerald,

    many thanks for your patches!
    I'll try to get the fix into trixie.

    Cheers

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)