Bug 2264526

Summary: git.cola fails to open because it want to use internal polib
Product: [Fedora] Fedora Reporter: José Matos <jamatos>
Component: git-colaAssignee: david08741
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 40CC: david08741, davvid, fedora, jamatos, moceap, oliver
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-02-16 22:27:31 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:
Attachments:
Description Flags
Adapted patch for polib none

Description José Matos 2024-02-16 10:50:33 UTC
Hi,
  in the last update
https://src.fedoraproject.org/rpms/git-cola/c/79346ba19f355a9f23296914d58faaed5e36a8a8?branch=rawhide

it was removed a patch to use the external polib, assuming that the patch had already by applied upstream.

Yet, when calling git-cola in F40 I get:
$ git cola
Traceback (most recent call last):
  File "/usr/bin/git-cola", line 5, in <module>
    from cola.main import main
  File "/usr/lib/python3.12/site-packages/cola/main.py", line 5, in <module>
    from . import app
  File "/usr/lib/python3.12/site-packages/cola/app.py", line 43, in <module>
    from .i18n import N_
  File "/usr/lib/python3.12/site-packages/cola/i18n.py", line 7, in <module>
    from . import polib
ImportError: cannot import name 'polib' from 'cola' (/usr/lib/python3.12/site-packages/cola/__init__.py)

Reproducible: Always

Steps to Reproduce:
Calling git-cola in F40.

Comment 1 José Matos 2024-02-16 11:30:04 UTC
Created attachment 2017177 [details]
Adapted patch for polib

I have adapted the previous patch because it does not apply cleanly anymore.

With this patch, the package builds cleanly and it works. :-)

Comment 2 david08741 2024-02-16 22:27:31 UTC
Thanks for the report and the patch!

Update for f40:
https://bodhi.fedoraproject.org/updates/FEDORA-2024-fa44bbba92

Update for rawhide:
https://bodhi.fedoraproject.org/updates/FEDORA-2024-cee0ec75d4

Comment 3 David Aguilar 2024-02-28 02:09:22 UTC
Thanks for the heads-up. FYI I've integrated this patch upstream. The soon-to-be-tagged v4.6.0 release will now prefer a system-provided `polib` when available.

That means that you can omit the vendored `cola.polib` module and things will work as-is without patching the source code.

https://git-cola.readthedocs.io/en/latest/relnotes.html#v4-6-0 See the "Packaging" section.