Bug 1751496

Summary: offlineimap depends on Python 2
Product: [Fedora] Fedora Reporter: Lumír Balhar <lbalhar>
Component: offlineimapAssignee: Dodji Seketeli <dodji>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: cfergeau, choeger, dan.cermak, dodji, i, jbastian, mhroncok, notting, pbonzini, pviktori, sguelton
Target Milestone: ---Keywords: 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: 2021-03-15 15:14:29 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:    
Bug Blocks: 1698500    

Description Lumír Balhar 2019-09-12 05:39:51 UTC
Python 2.7 will reach end-of-life in January 2020, over 9 years after it was released. This falls within the Fedora 31 lifetime.
Packages that depend on Python 2 are being switched to Python 3 or removed from Fedora: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages
Python 2 will be retired in Fedora 32: https://fedoraproject.org/wiki/Changes/RetirePython2

To help planning, we'd like to know the plans for offlineimap's future. Specifically:


- What is the reason for the Python2 dependency? (Is it software written in Python, or does it just provide Python bindings, or use Python in the build system or test runner?) 

- What are the upstream/community plans/timelines regarding Python 3?

- What is the guidance for porting to Python 3? (Assuming that there is someone who generally knows how to port to Python 3, but doesn't know anything about the particular package, what are the next steps to take?)


This bug is filed semi-automatically, and might not have all the context specific to offlineimap.
If you need anything from us, or something is unclear, please mention it here.

Thank you.

Comment 1 Bill Nottingham 2019-09-12 15:39:48 UTC
1. it's an app, written in python 2
2. hazy. upstream lists it as 'experimental', known broken, and does not appear to be actively working on it
3. churn through it, mostly. Since it's a giant wrapper around an internet protocol, i suspect str/bytes will be the fun part, but I haven't looked yet.

Comment 2 Lumír Balhar 2019-09-20 06:40:55 UTC
And do you have a plan to work on this package? It is a leaf package (nothing depends on it in rawhide) so we can retire it if there is no plan to make it work with Python 3.

Comment 3 Bill Nottingham 2019-09-20 20:38:55 UTC
🤷‍♂️

Either I need to port it, or I need to keep a hacked up build for myself.

Comment 4 Lumír Balhar 2019-09-30 06:19:03 UTC
Thanks for the info. You are right, there are some old issues with Python 3 compatibility and nobody is working on them. Moreover, it seems that this tool will be replaced by imapfw so I don't think that investing our time to Python 3 compatibility is a wise idea.

The current plan is to remove packages with dependency on Python 2 from Fedora 32 in the middle of November 2019. If you want to keep your package in Fedora after that date and you cannot port it to Python 3 yet, you need to request a FESCo exception for the package and all its Python 2 dependencies (even transitive) [1]. If you don't want to maintain it anymore, and nothing in Fedora uses it, you can retire it or just remove the Python 2 part from it (subpackage, module, bindings, etc.).

If you're considering filing the exception request, let us know. We can help (for example, we can help find all the dependencies).

[1] https://fedoraproject.org/wiki/Changes/RetirePython2#FESCo_exceptions

Comment 5 Bill Nottingham 2019-09-30 15:09:08 UTC
imapfw is actually *more* dead upstream. At least, he's not pushed anything in two years.

Comment 6 Dan Čermák 2019-11-10 22:29:31 UTC
Can we get a FESCO exception for this or would it just be delaying the inevitable? I'm using actively using offlineimap and I'd hate it to go away, but I really *don't* have the capacities to port it to python 3.

Comment 7 Lumír Balhar 2019-11-11 05:43:11 UTC
It can definitely get an exception. You can take a look at existing requests for inspiration: https://pagure.io/fesco/issues?status=Closed&tags=python+2+exception

On the other hand, somebody will have to do the work because the exception won't last forever. It seems that offlineimap has experimental support for Python 3 with a few known issues so the porting won't start from scratch. You can also try to package it for rawhide and see whether the known issues affect your usage.

Comment 8 Bill Nottingham 2019-11-11 15:37:02 UTC
Trying to package it for py3 without porting would be a waste of time, the entire IMAP protocol usage has str/bytes confusion.

Ticket filed here: https://pagure.io/fesco/issue/2274

Comment 9 Ben Cotton 2020-02-11 17:46:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 10 Miro Hrončok 2021-01-06 16:00:55 UTC
Checking after a year. Has there been some change in upstream?

Comment 11 serge_sans_paille 2021-01-07 13:42:07 UTC
4 commits in 2020, no chance to have this ported to python3. From a maintenance point of view, I've been bundling more and more python2 packages to keep offlineimap functional.
That being said, the software is pretty mature and functional, I'm using it on a daily basis without any issue (if that matter).

Comment 12 Petr Viktorin (pviktori) 2021-01-07 15:40:36 UTC
That might be too pessimistic.
https://github.com/OfflineIMAP/offlineimap3 has a bunch of recent activity.

Comment 13 serge_sans_paille 2021-01-07 16:07:21 UTC
I wasn't aware of that project, thanks!

Comment 14 Petr Viktorin (pviktori) 2021-01-15 13:11:30 UTC
FWIW:
- it looks like offlineimap3 will be in Debian testing: https://github.com/OfflineIMAP/offlineimap3/issues/10
- this is the last package in Fedora that needs python2-six

Comment 15 serge_sans_paille 2021-03-10 08:43:45 UTC
I'll have a look at offlineimap3 packaging.

Comment 17 serge_sans_paille 2021-03-15 15:14:29 UTC
offlineimap-7.3.3-5.20200310git1e7ef9e7e6952f5d29ef0f5c25fd062798de55f3.fc35 is now a no-arch, Py3 only package.
It's based on the  https://github.com/OfflineIMAP/offlineimap3 project pointed out by Petr Viktorin and a few patches that are still in review upstream (actually the same as the one from the ArchLinux package https://aur.archlinux.org/packages/offlineimap3-git/)