GNU bug report logs - #50282
[PATCH 0/5] gnu: offlineimap: Replace with offlineimap3.

Previous Next

Package: guix-patches;

Reported by: Pierre Langlois <pierre.langlois <at> gmx.com>

Date: Mon, 30 Aug 2021 19:07:01 UTC

Severity: normal

Tags: patch

Done: Pierre Langlois <pierre.langlois <at> gmx.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50282 in the body.
You can then email your comments to 50282 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#50282; Package guix-patches. (Mon, 30 Aug 2021 19:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 30 Aug 2021 19:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3.
Date: Mon, 30 Aug 2021 19:57:36 +0100
[Message part 1 (text/plain, inline)]
Hi Guix!

While looking for a non-python2 alternative, I found that there was an
official python3 port in the works! https://github.com/OfflineIMAP/offlineimap3

I'd suggest we move over it? It works for me (TM), maybe others may want
to test it first?

The patch uses a new name, offlineimap3, so that it's clear it's not
exactly the same code as offlineimap. This seems to be the approach
debian took: https://github.com/OfflineIMAP/offlineimap3/issues/10

Thanks,
Pierre

Pierre Langlois (5):
  gnu: Add python-imaplib2.
  gnu: offlineimap: Replace with offlineimap3.
  gnu: Remove python2-rfc6555.
  gnu: Remove python2-selectors2.
  gnu: Remove python2-pysqlite.

 gnu/packages/databases.scm  |  24 --------
 gnu/packages/mail.scm       | 114 ++++++++++++++++++++++--------------
 gnu/packages/python-xyz.scm |  31 ----------
 3 files changed, 69 insertions(+), 100 deletions(-)

-- 
2.33.0
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#50282; Package guix-patches. (Mon, 30 Aug 2021 19:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 50282 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 50282 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 2/5] gnu: offlineimap: Replace with offlineimap3.
Date: Mon, 30 Aug 2021 20:13:42 +0100
* gnu/packages/mail.scm (offlineimap3): New variable.
(offlineimap): Replace with deprecated package.
---
 gnu/packages/mail.scm | 96 +++++++++++++++++++++++--------------------
 1 file changed, 51 insertions(+), 45 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 8eb6ec73b8..25a0963e00 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -156,6 +156,7 @@
   #:use-module (gnu packages xml)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix deprecation)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix svn-download)
@@ -1044,53 +1045,58 @@ content (body).  The program is able to learn from the user's classifications
 and corrections.  It is based on a Bayesian filter.")
     (license license:gpl3+)))

-(define-public offlineimap
-  (package
-    (name "offlineimap")
-    (version "7.3.3")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/OfflineIMAP/offlineimap")
-                    (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "1gg8ry67i20qapj4z20am9bm67m2q28kixcj7ja75m897vhzarnq"))))
-    (build-system python-build-system)
-    (native-inputs
-     `(("asciidoc" ,asciidoc)))
-    (inputs
-     `(("python2-pysqlite" ,python2-pysqlite)
-       ("python2-rfc6555" ,python2-rfc6555)
-       ("python2-six" ,python2-six)))
-    (arguments
-     ;; The setup.py script expects python-2.
-     `(#:python ,python-2
-      ;; Tests require a modifiable IMAP account.
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'build 'build-documentation
-           (lambda _
-             (substitute* "docs/Makefile"
-               ;; Prevent xmllint and xsltproc from downloading a DTD file.
-               (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
-             (invoke "make" "-C" "docs" "man")))
-         (add-after 'install 'install-documentation
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (man (string-append out "/share/man")))
-               (install-file "docs/offlineimap.1" (string-append man "/man1"))
-               (install-file "docs/offlineimapui.7" (string-append man "/man7"))
-               #t))))))
-    (home-page "https://www.offlineimap.org")
-    (synopsis "Sync emails between two repositories")
-    (description
-     "OfflineImap synchronizes emails between two repositories, so that you
+(define-public offlineimap3
+  ;; The OfflineIMAP3 fork does not yet have a release, but it's likely to be
+  ;; 8.0.0 but the source still reports 7.3.0, see
+  ;; https://github.com/OfflineIMAP/offlineimap3/issues/10.
+  (let ((commit "4ca9c75c6f9a0cc8dc7b69dd6abf073e494cc0e5")
+        (revision "0"))
+    (package
+      (name "offlineimap3")
+      (version (git-version "7.3.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/OfflineIMAP/offlineimap3")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0nzh5dcc559jfw4yy12gc98s17w82b15zxikspc6apd8filmk9xg"))))
+      (build-system python-build-system)
+      (native-inputs
+       `(("asciidoc" ,asciidoc)))
+      (inputs
+       `(("python-distro" ,python-distro)
+         ("python-imaplib2" ,python-imaplib2)
+         ("python-rfc6555" ,python-rfc6555)))
+      (arguments
+       `(;; Tests require a modifiable IMAP account.
+         #:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'build 'build-documentation
+             (lambda _
+               (substitute* "docs/Makefile"
+                 ;; Prevent xmllint and xsltproc from downloading a DTD file.
+                 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
+               (invoke "make" "-C" "docs" "man")))
+           (add-after 'install 'install-documentation
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (man (string-append out "/share/man")))
+                 (install-file "docs/offlineimap.1" (string-append man "/man1"))
+                 (install-file "docs/offlineimapui.7" (string-append man "/man7"))))))))
+      (home-page "https://www.offlineimap.org")
+      (synopsis "Sync emails between two repositories")
+      (description
+       "OfflineImap synchronizes emails between two repositories, so that you
 can read the same mailbox from multiple computers.  It supports IMAP as REMOTE
 repository and Maildir/IMAP as LOCAL repository.")
-    (license license:gpl2+)))
+      (license license:gpl2+))))
+
+(define-public offlineimap
+  (deprecated-package "offlineimap" offlineimap3))

 (define-public emacs-mew
   (package
--
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50282; Package guix-patches. (Mon, 30 Aug 2021 19:15:02 GMT) Full text and rfc822 format available.

Message #11 received at 50282 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 50282 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 5/5] gnu: Remove python2-pysqlite.
Date: Mon, 30 Aug 2021 20:13:45 +0100
* gnu/packages/databases.scm (python2-pysqlite): Remove.
---
 gnu/packages/databases.scm | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 884830262e..7e521bed8f 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -2924,30 +2924,6 @@ on localhost.")
 (define-public python2-ccm
   (package-with-python2 python-ccm))

-(define-public python2-pysqlite
-  (package
-    (name "python2-pysqlite")
-    (version "2.8.3")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (pypi-uri "pysqlite" version))
-      (sha256
-       (base32
-        "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
-    (build-system python-build-system)
-    (inputs
-     `(("sqlite" ,sqlite)))
-    (arguments
-     `(#:python ,python-2 ; incompatible with Python 3
-       #:tests? #f)) ; no test target
-    (home-page "https://github.com/ghaering/pysqlite")
-    (synopsis "SQLite bindings for Python")
-    (description
-     "Pysqlite provides SQLite bindings for Python that comply to the
-Database API 2.0T.")
-    (license license:zlib)))
-
 (define-public python-sqlalchemy
   (package
     (name "python-sqlalchemy")
--
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50282; Package guix-patches. (Mon, 30 Aug 2021 19:15:03 GMT) Full text and rfc822 format available.

Message #14 received at 50282 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 50282 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 4/5] gnu: Remove python2-selectors2.
Date: Mon, 30 Aug 2021 20:13:44 +0100
* gnu/packages/python-xyz.scm (python2-selectors2): Remove.
---
 gnu/packages/python-xyz.scm | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c3aedeae18..9abed190d9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -14318,29 +14318,6 @@ functionality in a modular way, allowing you to extend your panel with your
 own code, responding to click events and updating clock every second.")
     (license license:bsd-3)))

-(define-public python2-selectors2
-  (package
-    (name "python2-selectors2")
-    (version "2.0.1")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "selectors2" version))
-              (sha256
-               (base32
-                "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:python ,python-2))
-    (native-inputs
-     `(("python2-mock" ,python2-mock)
-       ("python2-psutil" ,python2-psutil)))
-    (home-page "https://www.github.com/SethMichaelLarson/selectors2")
-    (synopsis "Backport of the selectors module from Python 3.5+")
-    (description
-     "This package provides a drop-in replacement for the @code{selectors}
-module in Python 3.5 and later.")
-    (license license:expat)))
-
 (define-public python-tblib
   (package
     (name "python-tblib")
--
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50282; Package guix-patches. (Mon, 30 Aug 2021 19:15:03 GMT) Full text and rfc822 format available.

Message #17 received at 50282 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 50282 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 1/5] gnu: Add python-imaplib2.
Date: Mon, 30 Aug 2021 20:13:41 +0100
* gnu/packages/mail.scm (python-imaplib2): New variable.
---
 gnu/packages/mail.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index c2d986effb..8eb6ec73b8 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -4359,6 +4359,24 @@ based on asyncio.")
     (license (list license:asl2.0
                    license:lgpl3))))    ; only for setup_helpers.py

+(define-public python-imaplib2
+  (package
+    (name "python-imaplib2")
+    (version "3.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "imaplib2" version))
+       (sha256
+        (base32
+         "0nqyb274hq30agg1c0zkb5ijmcirgg35sp4dp4n292l665dlijwn"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/jazzband/imaplib2/")
+    (synopsis "Threaded Python IMAP4 client")
+    (description "This package provides a threaded Python IMAP4 client, based
+on RFC 3501 and original @code{imaplib} module.")
+    (license license:expat)))
+
 (define-public rspamd
   (package
     (name "rspamd")
--
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50282; Package guix-patches. (Mon, 30 Aug 2021 19:15:03 GMT) Full text and rfc822 format available.

Message #20 received at 50282 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 50282 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 3/5] gnu: Remove python2-rfc6555.
Date: Mon, 30 Aug 2021 20:13:43 +0100
* gnu/packages/python-xyz.scm (python2-rfc6555): Remove variable.
(python-rfc6555)[properties]: Remove field.
---
 gnu/packages/python-xyz.scm | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 577353e65d..c3aedeae18 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18334,16 +18334,8 @@ validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
        "Python implementation of the Happy Eyeballs Algorithm described in RFC
 6555.  Provided with a single file and dead-simple API to allow easy vendoring
 and integration into other projects.")
-      (properties `((python2-variant . ,(delay python2-rfc6555))))
       (license license:asl2.0))))

-(define-public python2-rfc6555
-  (let ((base (package-with-python2
-               (strip-python2-variant python-rfc6555))))
-    (package/inherit base
-      (propagated-inputs
-       `(("python2-selectors2" ,python2-selectors2))))))
-
 (define-public python-bagit
   (package
     (name "python-bagit")
--
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50282; Package guix-patches. (Tue, 31 Aug 2021 07:04:02 GMT) Full text and rfc822 format available.

Message #23 received at 50282 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 50282 <at> debbugs.gnu.org
Subject: Re: [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with
 offlineimap3.
Date: Tue, 31 Aug 2021 08:56:42 +0200
Hi Pierre,

On Mon, 30 Aug 2021 at 19:57, Pierre Langlois <pierre.langlois <at> gmx.com> wrote:

> While looking for a non-python2 alternative, I found that there was an
> official python3 port in the works! https://github.com/OfflineIMAP/offlineimap3

Cool!  It would improve the situation as reported here [1]. :-)

1: <http://issues.guix.gnu.org/issue/48213>

>   gnu: Add python-imaplib2.

LGTM.

>   gnu: offlineimap: Replace with offlineimap3.

LGTM.  Is it possible to disable only the tests which require a
modifiable IMAP account?  Although it was not in the initial
’offlineimap’. :-)

>   gnu: Remove python2-rfc6555.

LGTM.

>   gnu: Remove python2-selectors2.

LGTM.  Except the message should be ’Remove variable’, I guess.

>   gnu: Remove python2-pysqlite.

This would break the package ’geierlein’ as reported by:

  guix refresh -l python2-pysqlite

And grepping the sources, this package is a native-inputs of ’icecat’.

Well, I would drop this last patch.


All the best,
simon





Reply sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
You have taken responsibility. (Thu, 02 Sep 2021 19:52:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
bug acknowledged by developer. (Thu, 02 Sep 2021 19:52:02 GMT) Full text and rfc822 format available.

Message #28 received at 50282-done <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>, 50282-done <at> debbugs.gnu.org
Subject: Re: [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with
 offlineimap3.
Date: Thu, 02 Sep 2021 20:48:23 +0100
[Message part 1 (text/plain, inline)]
Hi simon,

zimoun <zimon.toutoune <at> gmail.com> writes:

> Hi Pierre,
>
> On Mon, 30 Aug 2021 at 19:57, Pierre Langlois <pierre.langlois <at> gmx.com> wrote:
>
>> While looking for a non-python2 alternative, I found that there was an
>> official python3 port in the works! https://github.com/OfflineIMAP/offlineimap3
>
> Cool!  It would improve the situation as reported here [1]. :-)
>
> 1: <http://issues.guix.gnu.org/issue/48213>
>
>>   gnu: Add python-imaplib2.
>
> LGTM.
>
>>   gnu: offlineimap: Replace with offlineimap3.
>
> LGTM.  Is it possible to disable only the tests which require a
> modifiable IMAP account?  Although it was not in the initial
> ’offlineimap’. :-)

Yeah, I'm afraid all the tests that I can see require an IMAP account
:-/. I wonder if one day we could have marionnette-style tests in the
packages so you could run services, that would be cool.

>
>>   gnu: Remove python2-rfc6555.
>
> LGTM.
>
>>   gnu: Remove python2-selectors2.
>
> LGTM.  Except the message should be ’Remove variable’, I guess.
>

Done.

>>   gnu: Remove python2-pysqlite.
>
> This would break the package ’geierlein’ as reported by:
>
>   guix refresh -l python2-pysqlite
>
> And grepping the sources, this package is a native-inputs of ’icecat’.
>
> Well, I would drop this last patch.

Oh... how I did I miss that? I was sure I had at least grepped the
sources, thanks for catching that!

Pushed with d8d124fb6521abafd8f6a1772717a0278d6d899b, thanks for the
review!

Pierre
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 01 Oct 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 207 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.