Bug 2264526 - git.cola fails to open because it want to use internal polib
Summary: git.cola fails to open because it want to use internal polib
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: git-cola
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: david08741
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-02-16 10:50 UTC by José Matos
Modified: 2024-02-28 02:09 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-02-16 22:27:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Adapted patch for polib (1.05 KB, patch)
2024-02-16 11:30 UTC, José Matos
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.