Bug 1737933
Summary: | gimp depends on Python 2 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Lumír Balhar <lbalhar> |
Component: | gimp | Assignee: | Nils Philippsen <nphilipp> |
Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | anton4linux, bugzilla, debarshir, dominik, ferdnyc, jridky, klember, luya_tfz, mhroncok, mironov.ivan, mjg, nphilipp, pgnet.dev, phracek, prabesh432, pviktori, soerenmoeller2001, travneff, zdohnal |
Target Milestone: | --- | Keywords: | FutureFeature, Reopened, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-06-08 14:31:41 UTC | Type: | Bug |
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: | 1739543, 1739544, 1737988 | ||
Bug Blocks: | 1738968, 1751502, 2275263, 1698500 |
Description
Lumír Balhar
2019-08-06 11:42:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'. This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31. Please answer the above questions. If you don't the package can be orphaned: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages If you need any information or help, please let us know. Unfortunately, GIMP upstream don't plan to switch from Python2 to Pyton3 in GIMP-2.10 release cycle and GIMP without Python2 support looses a lot from it's functionality. What are our options for f31? We have gimp-module available, so would it be possible to use Python 2 as module in f31+ releases? What we should do with rpms/gimp fXX branches? Hi, Fedora 31 (and lower) should stay as it is. For Fedora 32, AFAICS best option is to file a FESCo exception for GIMP and its dependencies. We track the dependencies here: https://fedora.portingdb.xyz/grp/gimp/ Currently gimp pulls in 49 packages as transitive dependencies. Many of those could probably be trimmed. Could you take a look at the list and check which ones are essential for Gimp to run? Petr provided the info. From GIMP perspective, the most important are python2-devel, pygobject2, gtk2 and pygtk2. From GIMP upstream, they would like to have the python2 available for GIMP-2.10 as long as possible. They are already working on GIMP 3 with python3 support, but they haven't set any release date for this version yet. The content of python2-devel will be available (in a different package, python27, but we can help with the transition). You should check with pygobject2, gtk2, pygtk2 maintainers what the plans are. I've asked them for info here: pygobject2: https://bugzilla.redhat.com/show_bug.cgi?id=1739544 gtk2: https://bugzilla.redhat.com/show_bug.cgi?id=1737988 pygtk2: https://bugzilla.redhat.com/show_bug.cgi?id=1739543 Some seem to be non-responsive. If you can reach them outside Bugzilla, it would be helpful. What about pycairo, libglade2, python2-numpy? Does gimp need them, or are they (from your point of view) just implementation details of other packages? If maintainers of the dependencies are willing to keep the Python 2 parts in Fedora, the next step is filing an FESCo exception. Here's an example: https://pagure.io/fesco/issue/2208 It would make sense to include the plugin gimp-layer-via-copy-cut in the FESCo exception, as well. See: https://bugzilla.redhat.com/show_bug.cgi?id=1738968 I've tried to rebuild gimp without pycairo-devel and pygobject2-devel BRs. https://koji.fedoraproject.org/koji/taskinfo?taskID=37693721 It works, however pygtk2-devel brings both of them in. I've noticed that gimp is modularized. Can we just build all the Python 2 dependencies in that module and retire the stack in rawhide? I see two ways to go forward: Way 1 - FESCo exception for: - gimp - gimp-layer-via-copy-cut - pygobject2 - pygtk2 - python2-numpy - pycairo (we don't know yet if the maintainers agree to keep the Python 2 subpackages) Way 2 - put the abovementioned packages to the GIMP module and retire nonmodular GIMP. It would really made me much more comfortable if we get this sorted out sooner than later. I don't want to retire GIMP in November. Hi Miro, due we shipping GIMP as module already [1] I am fine with the way #2. Can you help me with necessary steps to make this change as smooth as possible? [1] https://src.fedoraproject.org/modules/gimp/tree/2.10 In addition to rpm GIMP, I care about GIMP flatpak that we are already building and shipping in Fedora. The flatpak builds use MBS, so this can use the same solution as #2. There may be issues building Python 2 with --prefix=/app for flatpak, but if this is the consensus to go forward I'd be happy to submit patches to python2 to help fix that. > Can you help me with necessary steps to make this change as smooth as possible?
I'm not sure, how can I help?
I forgot to mention: The Python Maintanence team can help here with way 1 (requesting the exception). We cannot really help with modularizing stuff. Due we already have gimp module, I need just someone (form modularity team?) to check, if all dependencies (esp. to python2 module) will be set correctly. Do you know anyone, who can help me with it? There is no python2 module. I don't know anyone who can help you. > Can you help me with necessary steps to make [modular Gimp] as smooth as possible?
I can think of tho things that will not be smooth:
1. It's possible that we won't remove all dependencies at once. If we, for example, drop python2-numpy in F31, pycairo in F32, and pygtk2 in F33, these will need to be added to the Gimp module. As far as I know, there is no mechanism to check if they will conflict with any other modules, or (if there's a single Gimp stream for all Fedoras), with non-modular RPMs in older Fedora releases. And if they do conflict, I don't know what will happen and how things will be coordinated.
2. As a user, when I install Gimp, I get the "2.10" module. As far as I can see, it won't upgrade when 3.0 comes out: if I want that, I'll need to watch for Gimp release and switch streams manually (maybe even uninstall, switch streams, and reinstall). If i stay on 2.10, I don't know what will happen when 2.10 stops being supported.
Unfortunately, as far as I know, Modularity has no good answers to these (future) issues. I don't know what to do to solve them.
I'd be willing to treat these as the cost to pay for things being better in the future. But unfortunately, I don't really see any problem that Modularity solves *for Gimp in Fedora*. I am not aware of any benefit we'd get for enduring the annoyances.
I can help with a FESCo exception (that's mostly a way to ensure everything is coordinated, relevant people are notified and the packages are listed), and I can offer some help with maintaining the dependencies for Gimp until it is ported. But I *don't know* how to do things properly in a module.
(In reply to Kalev Lember from comment #14) > In addition to rpm GIMP, I care about GIMP flatpak that we are already > building and shipping in Fedora. The flatpak builds use MBS, so this can use > the same solution as #2. > > There may be issues building Python 2 with --prefix=/app for flatpak, but if > this is the consensus to go forward I'd be happy to submit patches to > python2 to help fix that. I've filed https://src.fedoraproject.org/rpms/python2/pull-request/49 to fix an issue with python2 flatpak builds. To be honest, now I really don't know, which way I should go. But due of possible issues in modularity, which aren't solved yet, I would request FESCo exception for GIMP. It looks like safer way now. What do you think? Do we have some template for exception request? Before we proceed, Kalev, you are the main admin of pycairo. Would you be OK to keep Python 2 bits of pycairo around until GIMP is ported to Python 3? Yes, I would be OK with that. I'm now checking whether we can remove numpy (and setuptools) from the equation: https://src.fedoraproject.org/rpms/pygtk2/pull-request/1 (In reply to Miro Hrončok from comment #24) > I'm now checking whether we can remove numpy (and setuptools) from the > equation: https://src.fedoraproject.org/rpms/pygtk2/pull-request/1 This is blocked by ~recent pango update. I propose the following: We assume numpy si not needed. We only include gimp, gimp-layer-via-copy-cut, pygobject2, pygtk2, and pycairo in the exception request. If we later realize we indeed need to keep numpy, we request additional one for it. Here is the draft: """ Hello, we'd like to request a Python 2 exception for GIMP (gimp + gimp-layer-via-copy-cut packages). It needs the following Python 2 packages to run and build (apart from the interpreter itself): - pygobject2 - pygtk2 - pycairo The maintainers of the 3 packages are ready to keep maintaining the Python 2 parts of their packages as long as GIMP needs them. We consider GIMP important for Fedora users. The gimp-layer-via-copy-cut package only uses Python 2 because of GIMP and has no further Python 2 dependencies. There are other `gimp-*` packages out there, but none of them depends on Python directly (only trough GIMP), to clarify, we want to keep them as well. See the discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1737933 """ WDYT? There is also gimp-resynthesizer. I think it would be good to include it in the exception. See: https://bugzilla.redhat.com/show_bug.cgi?id=1751502 Request posted https://pagure.io/fesco/issue/2238 Thanks for help. Oh, I haven't figured out that gimp-resynthesizer is still a thing, It fails to build for more than a year. Sorry about that. I see it is part of the exception request. (In reply to Miro Hrončok from comment #28) > Oh, I haven't figured out that gimp-resynthesizer is still a thing, It fails > to build for more than a year. Sorry about that. I see it is part of the > exception request. I recently took over gimp-resynthesizer maintenance and updated to the latest upstream release: https://bodhi.fedoraproject.org/updates/FEDORA-2019-205f6d17d6 Blocker added to keep track of this report. (In reply to Kalev Lember from comment #14) > In addition to rpm GIMP, I care about GIMP flatpak that we are already > building and shipping in Fedora. The flatpak builds use MBS, so this can use > the same solution as #2. > > There may be issues building Python 2 with --prefix=/app for flatpak, but if > this is the consensus to go forward I'd be happy to submit patches to > python2 to help fix that. Speaking about gimp, is there a documentation guideline to effectively prepare a flatpak version of addons? I am aware flatpak getdit did before. Wearing my design suite lab maintainer hat, I am aiming to use Fedora Silverblue as a base system. (In reply to Luya Tshimbalanga from comment #30) > Speaking about gimp, is there a documentation guideline to effectively > prepare a flatpak version of addons? As far as I now, fedora flatpak infra does not support app extensions yet. A way to work this around would be to just package the plugins in the same flatpak together with the main app. Is there something specific you need? (In reply to Kalev Lember from comment #31) > (In reply to Luya Tshimbalanga from comment #30) > > Speaking about gimp, is there a documentation guideline to effectively > > prepare a flatpak version of addons? > > As far as I now, fedora flatpak infra does not support app extensions yet. A > way to work this around would be to just package the plugins in the same > flatpak together with the main app. Is there something specific you need? Just a guideline for that workaround. Otherwise I will wait for the Fedora Flatpak infra to enable support of app extensions. This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32. FESCo granted an exception to let GIMP continue using Python 2: https://pagure.io/fesco/issue/2238 Closing as CURRENTRELEASE. It granted the exception, but we still want to get this eventually solved. I used GIMP in Ubuntu 21.04 where there was no Python 2 if I remember it correctly. But here in Fedora 34, trying to uninstall Python 2 means trying to uninstall GIMP. How come? (In reply to Pranav Bhattarai from comment #36) > I used GIMP in Ubuntu 21.04 where there was no Python 2 if I remember it > correctly. > > But here in Fedora 34, trying to uninstall Python 2 means trying to > uninstall GIMP. > > How come? On a fresh (up-to-date) F34 I have: gimp-2:2.10.24-1.fc34 (plus libs and helps) python2.7-2.7.18-11.fc34 python2-cairo-1.18.2-8.fc34 The latter two are pulled in by gimp because gimp 2.10 still requires python 2 for its python plugins. If Ubuntu has a gimp package without python 2 then it has a gimp without python plugins (unless they package gimp 2.99, aka the unstable development version, which I don't think). It's a mixed bag, of course: Basically, the Fedora approach works only for python plugins which do not require additional (py2) modules such as numpy (still in F33, not in F34), scipy etc. That's why there have been alternative attempts via modules (cancelled) and flatpaks which provide a more complete py2 stack without "tainting" the base system. Maybe Ubuntu does something similar with snap. Thanks for the info. Learned a new thing. Still actual for Fedora 36. I don't need python2 and don't need GIMP plugins maybe, but can't erase python2 rpm because GIMP package depends on it. (In reply to Pranav from comment #36) > I used GIMP in Ubuntu 21.04 where there was no Python 2 if I remember it > correctly. I looked into this. Surprisingly enough, it's true: Ubuntu 22.04's apt-installable GIMP is devoid of any Python support whatsoever. No Python2, no Python3. It definitely feels a bit stripped-down, as a result, since entire menus of features are missing due to their being implemented in Python. (The entire Layer Effects menu, for example, is conspicuously absent.) But it is, apparently, possible, albeit with some big caveats. (In reply to Andrew from comment #39) > Still actual for Fedora 36. > I don't need python2 and don't need GIMP plugins maybe, Well, you DO need Python2 if you have GIMP installed, because a complete install of GIMP 2.10 (like the one Fedora's packages provide) includes the /usr/lib64/gimp/2.0/interpreters/pygimp.interp file that defines Python 2 as one of its scripting interpreters. It's not just for external plugins — several of GIMP's bundled features are implemented in Python, and while it's *possible* to strip them out (as Ubuntu have demonstrated), doing so means that you don't get the complete feature set. Hopefully GIMP 3.0 will be along sooner rather than later.... and hopefully it gets packaged for Fedora, and doesn't end up perpetually deferred. (Like the ImageMagick 7 upgrade that's apparently NEVER coming. The first IM7 release was in NOVEMBER 2015!) And over a year later, GIMP 3.0 remains vaporware. But we finally have ImageMagick 7, at least. (Also, I just noticed that one of the roadmap items[1] for GIMP 3.0 is to "complete the GTK+3 port". Just in time!) [1]: https://developer.gimp.org/core/roadmap/ The list of blockers is shrinking, though. Just very slowly: https://gitlab.gnome.org/GNOME/gimp/-/issues?scope=all&state=opened&milestone_title=3.0&label_name[]=Blocker Two days ago, I installed Fedora 40 from the XFCE-Spin (# dnf system-upgrade download --releasever=40) and yesterday I installed gimp-2.10.36-2.fc40.x86_64. After starting GIMP, 12 errors like below emerged: $ gimp Traceback (most recent call last): File "/usr/lib64/gimp/2.0/plug-ins/spyro_plus/spyro_plus.py", line 18, in <module> from gimpshelf import shelf File "/usr/lib64/gimp/2.0/python/gimpshelf.py", line 40, in <module> import gimp ImportError: could not import pygtk gimp: LibGimpBase-WARNING: gimp: gimp_wire_read(): error I quit Gimp and decided to install pygtk2 (# dnf install pygtk2.x86_64): Downloading Packages: (1/3): python2-cairo-1.18.2-16.fc40.x86_64.rpm (2/3): pygobject2-2.28.7-21.fc40.x86_64.rpm (3/3): pygtk2-2.24.0-43.fc40.x86_64.rpm ... and restarted Gimp. All 12 error messages were gone! I quit Gimp again. Next, to reproduce the problem, I de-installed pygtk2 (# dnf erase pygtk2) and removed the directory ~/.config/GIMP/. Then I restarted Gimp and the 12 errors re-appeared. If you have problems with GIMP, please open separate bug report(s). |