Bug 2292651

Summary: Meld is broken after python update
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: meldAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 41CC: dmaphy, epel-packagers-sig, jaxiel.kaise, lkundrak, mhroncok, michel, mtasaka, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: meld-3.22.2-5.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-09-13 20:44:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2244836    

Description Mikhail 2024-06-17 12:49:44 UTC
Meld is broken after python update

> meld
Traceback (most recent call last):
  File "/usr/bin/meld", line 462, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/bin/meld", line 458, in main
    return run_application()
  File "/usr/bin/meld", line 438, in run_application
    from meld.meldapp import MeldApp
  File "/usr/lib/python3.13/site-packages/meld/meldapp.py", line 27, in <module>
    from meld.filediff import FileDiff
  File "/usr/lib/python3.13/site-packages/meld/filediff.py", line 46, in <module>
    from meld.melddoc import ComparisonState, MeldDoc, open_files_external
  File "/usr/lib/python3.13/site-packages/meld/melddoc.py", line 20, in <module>
    import pipes
ModuleNotFoundError: No module named 'pipes'


Reproducible: Always

Comment 1 bonin' o'brien 2024-08-01 22:36:00 UTC
https://gitlab.gnome.org/GNOME/meld.git

commit aa817dce6bb0667fc6ef38163c213803dc8b37b3
Author: FeRD (Frank Dana) <ferdnyc>
Date:   Fri Sep 29 04:23:22 2023 -0400

    Don't use deprecated pipes module
    
    Only `pipes.quote()` was being used in Meld, and that symbol in
    pipes is just an import of `shlex.quote()` anyway. Switch to calling
    `shlex.quote()` directly, since pipes will be removed in Python 3.13.

diff --git a/meld/melddoc.py b/meld/melddoc.py
index 8dd1a337..27192f43 100644
--- a/meld/melddoc.py
+++ b/meld/melddoc.py
@@ -17,7 +17,6 @@
 import enum
 import logging
 import os
-import pipes
 import shlex
 import string
 import subprocess
@@ -45,7 +44,7 @@ def make_custom_editor_command(path: str, line: int = 0) -> Sequence[str]:
         log.error("Unsupported fields found")
         return [custom_command, path]
     else:
-        cmd = custom_command.format(file=pipes.quote(path), line=line)
+        cmd = custom_command.format(file=shlex.quote(path), line=line)
     return shlex.split(cmd)

Comment 2 Dominic Hopf 2024-08-03 14:16:28 UTC
I'd need more information about the versions of Fedora, Meld and Python you use. Thanks very much in advance.

Comment 3 Vít Ondruch 2024-08-06 09:50:11 UTC
I can reproduce this on Fedora Rawhide:

~~~
$ rpm -q meld
meld-3.22.2-3.fc41.noarch

$ rpm -q python3
python3-3.13.0~b4-3.fc41.x86_64
~~~

Comment 4 Mamoru TASAKA 2024-08-17 01:27:17 UTC
$ rpm -q meld python3
meld-3.22.2-3.fc41.noarch
python3-3.13.0~rc1-2.fc41.x86_64


PR is submitted (by other people) to fix this issue:
https://src.fedoraproject.org/rpms/meld/pull-request/8

Comment 5 Fedora Update System 2024-08-28 10:48:18 UTC
FEDORA-2024-74f0b1e0cb (meld-3.22.2-5.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-74f0b1e0cb

Comment 6 Fedora Update System 2024-08-29 01:59:00 UTC
FEDORA-2024-74f0b1e0cb has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-74f0b1e0cb`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-74f0b1e0cb

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-09-13 20:44:52 UTC
FEDORA-2024-74f0b1e0cb (meld-3.22.2-5.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.