unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3.
@ 2021-08-30 18:57 Pierre Langlois
  2021-08-30 19:13 ` [bug#50282] [PATCH 1/5] gnu: Add python-imaplib2 Pierre Langlois
  2021-08-31  6:56 ` [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3 zimoun
  0 siblings, 2 replies; 8+ messages in thread
From: Pierre Langlois @ 2021-08-30 18:57 UTC (permalink / raw)
  To: 50282

[-- Attachment #1: Type: text/plain, Size: 925 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#50282] [PATCH 1/5] gnu: Add python-imaplib2.
  2021-08-30 18:57 [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3 Pierre Langlois
@ 2021-08-30 19:13 ` Pierre Langlois
  2021-08-30 19:13   ` [bug#50282] [PATCH 2/5] gnu: offlineimap: Replace with offlineimap3 Pierre Langlois
                     ` (3 more replies)
  2021-08-31  6:56 ` [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3 zimoun
  1 sibling, 4 replies; 8+ messages in thread
From: Pierre Langlois @ 2021-08-30 19:13 UTC (permalink / raw)
  To: 50282; +Cc: Pierre Langlois

* 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





^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50282] [PATCH 2/5] gnu: offlineimap: Replace with offlineimap3.
  2021-08-30 19:13 ` [bug#50282] [PATCH 1/5] gnu: Add python-imaplib2 Pierre Langlois
@ 2021-08-30 19:13   ` Pierre Langlois
  2021-08-30 19:13   ` [bug#50282] [PATCH 3/5] gnu: Remove python2-rfc6555 Pierre Langlois
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Pierre Langlois @ 2021-08-30 19:13 UTC (permalink / raw)
  To: 50282; +Cc: Pierre Langlois

* 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





^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50282] [PATCH 3/5] gnu: Remove python2-rfc6555.
  2021-08-30 19:13 ` [bug#50282] [PATCH 1/5] gnu: Add python-imaplib2 Pierre Langlois
  2021-08-30 19:13   ` [bug#50282] [PATCH 2/5] gnu: offlineimap: Replace with offlineimap3 Pierre Langlois
@ 2021-08-30 19:13   ` Pierre Langlois
  2021-08-30 19:13   ` [bug#50282] [PATCH 4/5] gnu: Remove python2-selectors2 Pierre Langlois
  2021-08-30 19:13   ` [bug#50282] [PATCH 5/5] gnu: Remove python2-pysqlite Pierre Langlois
  3 siblings, 0 replies; 8+ messages in thread
From: Pierre Langlois @ 2021-08-30 19:13 UTC (permalink / raw)
  To: 50282; +Cc: Pierre Langlois

* 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





^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50282] [PATCH 4/5] gnu: Remove python2-selectors2.
  2021-08-30 19:13 ` [bug#50282] [PATCH 1/5] gnu: Add python-imaplib2 Pierre Langlois
  2021-08-30 19:13   ` [bug#50282] [PATCH 2/5] gnu: offlineimap: Replace with offlineimap3 Pierre Langlois
  2021-08-30 19:13   ` [bug#50282] [PATCH 3/5] gnu: Remove python2-rfc6555 Pierre Langlois
@ 2021-08-30 19:13   ` Pierre Langlois
  2021-08-30 19:13   ` [bug#50282] [PATCH 5/5] gnu: Remove python2-pysqlite Pierre Langlois
  3 siblings, 0 replies; 8+ messages in thread
From: Pierre Langlois @ 2021-08-30 19:13 UTC (permalink / raw)
  To: 50282; +Cc: Pierre Langlois

* 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





^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50282] [PATCH 5/5] gnu: Remove python2-pysqlite.
  2021-08-30 19:13 ` [bug#50282] [PATCH 1/5] gnu: Add python-imaplib2 Pierre Langlois
                     ` (2 preceding siblings ...)
  2021-08-30 19:13   ` [bug#50282] [PATCH 4/5] gnu: Remove python2-selectors2 Pierre Langlois
@ 2021-08-30 19:13   ` Pierre Langlois
  3 siblings, 0 replies; 8+ messages in thread
From: Pierre Langlois @ 2021-08-30 19:13 UTC (permalink / raw)
  To: 50282; +Cc: Pierre Langlois

* 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





^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3.
  2021-08-30 18:57 [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3 Pierre Langlois
  2021-08-30 19:13 ` [bug#50282] [PATCH 1/5] gnu: Add python-imaplib2 Pierre Langlois
@ 2021-08-31  6:56 ` zimoun
  2021-09-02 19:48   ` bug#50282: " Pierre Langlois
  1 sibling, 1 reply; 8+ messages in thread
From: zimoun @ 2021-08-31  6:56 UTC (permalink / raw)
  To: Pierre Langlois, 50282

Hi Pierre,

On Mon, 30 Aug 2021 at 19:57, Pierre Langlois <pierre.langlois@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#50282: [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3.
  2021-08-31  6:56 ` [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3 zimoun
@ 2021-09-02 19:48   ` Pierre Langlois
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre Langlois @ 2021-09-02 19:48 UTC (permalink / raw)
  To: zimoun; +Cc: Pierre Langlois, 50282-done

[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]

Hi simon,

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

> Hi Pierre,
>
> On Mon, 30 Aug 2021 at 19:57, Pierre Langlois <pierre.langlois@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-02 19:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-30 18:57 [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3 Pierre Langlois
2021-08-30 19:13 ` [bug#50282] [PATCH 1/5] gnu: Add python-imaplib2 Pierre Langlois
2021-08-30 19:13   ` [bug#50282] [PATCH 2/5] gnu: offlineimap: Replace with offlineimap3 Pierre Langlois
2021-08-30 19:13   ` [bug#50282] [PATCH 3/5] gnu: Remove python2-rfc6555 Pierre Langlois
2021-08-30 19:13   ` [bug#50282] [PATCH 4/5] gnu: Remove python2-selectors2 Pierre Langlois
2021-08-30 19:13   ` [bug#50282] [PATCH 5/5] gnu: Remove python2-pysqlite Pierre Langlois
2021-08-31  6:56 ` [bug#50282] [PATCH 0/5] gnu: offlineimap: Replace with offlineimap3 zimoun
2021-09-02 19:48   ` bug#50282: " Pierre Langlois

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).