diff mbox series

[bug#41395,2/4] gnu: Update python-prompt-toolkit to version 3.0.5

Message ID 87h7w4i7bj.fsf@alice.lan
State Accepted
Headers show
Series None | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Edouard Klein May 25, 2020, 11:26 a.m. UTC
* gnu/packages/machine-learning.scm (python-iml): Move python-nose from
propagated to native input.
(python-iml): Pin implicit python-prompt-toolkit dependency to version 2.

* gnu/packages/python-xyz.scm (python-widgetsnbextension): Update to version
3.5.1.
(python-widgetsnbextension): Pin implicit python-prompt-toolkit dependency to
version 2.
(python-ipywidgets): Update to version 7.5.1.
(python-ipywidgets): Pin implicit python-prompt-toolkit dependency to version
2.
(python-jupyter-console): Update to version 6.1.0.
(python-jupyter-console): Pin implicit python-prompt-toolkit dependency to
version 2.
(python-jupyter-console): Pin explicit python-prompt-toolkit dependency to
version 2.
(python-prompt-toolkit): Update to version 3.0.5.
(python-prompt-toolkit-2): New variable
(prompt-toolkit-2-instead-of-prompt-toolkit): New variable

---
 gnu/packages/machine-learning.scm |  7 +++--
 gnu/packages/python-xyz.scm       | 52 +++++++++++++++++++++----------
 2 files changed, 40 insertions(+), 19 deletions(-)

Comments

Marius Bakke May 25, 2020, 10:28 p.m. UTC | #1
Edouard Klein <edk@beaver-labs.com> writes:

> * gnu/packages/machine-learning.scm (python-iml): Move python-nose from
> propagated to native input.

Can you submit this change as a separate patch, as it is unrelated to
the python-prompt-toolkit update?

[...]

> @@ -12105,14 +12108,14 @@ collections of data.")
>  (define-public python-prompt-toolkit
>    (package
>      (name "python-prompt-toolkit")
> -    (version "2.0.7")
> +    (version "3.0.5")
>      (source
>       (origin
>         (method url-fetch)
> -       (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
> +       (uri (pypi-uri "prompt_toolkit" version))
>         (sha256
>          (base32
> -         "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
> +         "1j3x5s4gp4ih73sbcni0a0vffbzvrxbrbnkvb3fzjgxn810ilgan"))))
>      (build-system python-build-system)
>      (arguments
>       `(#:phases
> @@ -12126,12 +12129,11 @@ collections of data.")
>               (add-installed-pythonpath inputs outputs)
>               (invoke "py.test"))))))
>      (propagated-inputs
> -     `(("python-wcwidth" ,python-wcwidth)
> -       ("python-six" ,python-six)
> -       ("python-pygments" ,python-pygments)))
> +     `(("python-wcwidth" ,python-wcwidth)))

I think you need to re-add these inputs in 'python-prompt-toolkit-2'.
'python2-prompt-toolkit' should probably inherit from
'python-prompt-toolkit-2' too, given that the dependency on Six is
removed in version 3.

Finally 'python-prompt-toolkit-1' (!!!) also needs to inherit from
'python-prompt-toolkit-2' so that the inputs don't change, unless
version 1 can be removed entirely.

Quite the cabal!
Edouard Klein May 26, 2020, 11:39 a.m. UTC | #2
Marius Bakke writes:

> Edouard Klein <edk@beaver-labs.com> writes:
>
>> * gnu/packages/machine-learning.scm (python-iml): Move python-nose from
>> propagated to native input.
>
> Can you submit this change as a separate patch, as it is unrelated to
> the python-prompt-toolkit update?
>
> [...]
Done

>
>> @@ -12105,14 +12108,14 @@ collections of data.")
>>  (define-public python-prompt-toolkit
>>    (package
>>      (name "python-prompt-toolkit")
>> -    (version "2.0.7")
>> +    (version "3.0.5")
>>      (source
>>       (origin
>>         (method url-fetch)
>> -       (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
>> +       (uri (pypi-uri "prompt_toolkit" version))
>>         (sha256
>>          (base32
>> -         "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
>> +         "1j3x5s4gp4ih73sbcni0a0vffbzvrxbrbnkvb3fzjgxn810ilgan"))))
>>      (build-system python-build-system)
>>      (arguments
>>       `(#:phases
>> @@ -12126,12 +12129,11 @@ collections of data.")
>>               (add-installed-pythonpath inputs outputs)
>>               (invoke "py.test"))))))
>>      (propagated-inputs
>> -     `(("python-wcwidth" ,python-wcwidth)
>> -       ("python-six" ,python-six)
>> -       ("python-pygments" ,python-pygments)))
>> +     `(("python-wcwidth" ,python-wcwidth)))
>
> I think you need to re-add these inputs in 'python-prompt-toolkit-2'.
> 'python2-prompt-toolkit' should probably inherit from
> 'python-prompt-toolkit-2' too, given that the dependency on Six is
> removed in version 3.
>
That makes sense, done.

> Finally 'python-prompt-toolkit-1' (!!!) also needs to inherit from
> 'python-prompt-toolkit-2' so that the inputs don't change, unless
> version 1 can be removed entirely.

I grepped and did not find any user anywhere so I went ahead and removed it.

>
> Quite the cabal!
diff mbox series

Patch

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 2395dbfe80..5553b31bb5 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -14,6 +14,7 @@ 
 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
+;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1803,11 +1804,13 @@  advanced research.")
          "1k8szlpm19rcwcxdny9qdm3gmaqq8akb4xlvrzyz8c2d679aak6l"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("ipython" ,python-ipython)
-       ("nose" ,python-nose)
+     `(("ipython" ,(prompt-toolkit-2-instead-of-prompt-toolkit
+                    python-ipython))
        ("numpy" ,python-numpy)
        ("pandas" ,python-pandas)
        ("scipy" ,python-scipy)))
+    (native-inputs
+     `(("nose" ,python-nose)))
     (home-page "https://github.com/interpretable-ml/iml")
     (synopsis "Interpretable Machine Learning (iML) package")
     (description "Interpretable ML (iML) is a set of data type objects,
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9aa5635ab8..f60d4cc0ab 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8970,17 +8970,18 @@  interactive computing.")
 (define-public python-widgetsnbextension
   (package
     (name "python-widgetsnbextension")
-    (version "3.4.2")
+    (version "3.5.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "widgetsnbextension" version))
        (sha256
         (base32
-         "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
+         "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-ipykernel" ,python-ipykernel)
+     `(("python-ipykernel"
+        ,(prompt-toolkit-2-instead-of-prompt-toolkit python-ipykernel))
        ("python-notebook" ,python-notebook)))
     (native-inputs
      `(("python-certifi" ,python-certifi)
@@ -8997,17 +8998,18 @@  notebooks.")
 (define-public python-ipywidgets
   (package
     (name "python-ipywidgets")
-    (version "5.2.2")
+    (version "7.5.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ipywidgets" version))
        (sha256
         (base32
-         "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
+         "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-ipython" ,python-ipython)
+     `(("python-ipython" ,(prompt-toolkit-2-instead-of-prompt-toolkit
+                           python-ipython))
        ("python-traitlets" ,python-traitlets)
        ("python-widgetsnbextension" ,python-widgetsnbextension)))
     (native-inputs
@@ -9027,19 +9029,20 @@  in the data.")
 (define-public python-jupyter-console
   (package
     (name "python-jupyter-console")
-    (version "6.0.0")
+    (version "6.1.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "jupyter_console" version))
        (sha256
         (base32
-         "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
+         "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-ipykernel" ,python-ipykernel)
+     `(("python-ipykernel" ,(prompt-toolkit-2-instead-of-prompt-toolkit
+        python-ipykernel))
        ("python-jupyter-client" ,python-jupyter-client)
-       ("python-prompt-toolkit" ,python-prompt-toolkit)
+       ("python-prompt-toolkit" ,python-prompt-toolkit-2)
        ("python-pygments" ,python-pygments)))
     (native-inputs
      `(("python-nose" ,python-nose)))
@@ -12105,14 +12108,14 @@  collections of data.")
 (define-public python-prompt-toolkit
   (package
     (name "python-prompt-toolkit")
-    (version "2.0.7")
+    (version "3.0.5")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
+       (uri (pypi-uri "prompt_toolkit" version))
        (sha256
         (base32
-         "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
+         "1j3x5s4gp4ih73sbcni0a0vffbzvrxbrbnkvb3fzjgxn810ilgan"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -12126,12 +12129,11 @@  collections of data.")
              (add-installed-pythonpath inputs outputs)
              (invoke "py.test"))))))
     (propagated-inputs
-     `(("python-wcwidth" ,python-wcwidth)
-       ("python-six" ,python-six)
-       ("python-pygments" ,python-pygments)))
+     `(("python-wcwidth" ,python-wcwidth)))
     (native-inputs
      `(("python-pytest" ,python-pytest)))
-    (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
+    (home-page
+     "https://github.com/prompt-toolkit/python-prompt-toolkit")
     (synopsis "Library for building command line interfaces in Python")
     (description
      "Prompt-Toolkit is a library for building interactive command line
@@ -12141,6 +12143,22 @@  code completion, incremental search, support for Chinese double-width
 characters, mouse support, and auto suggestions.")
     (license license:bsd-3)))
 
+(define-public python-prompt-toolkit-2
+  (package (inherit python-prompt-toolkit)
+    (name "python-prompt-toolkit")
+    (version "2.0.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
+       (sha256
+        (base32
+         "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))))
+
+(define-public prompt-toolkit-2-instead-of-prompt-toolkit
+  (package-input-rewriting/spec
+   `(("python-prompt-toolkit" . ,(const python-prompt-toolkit-2)))))
+
 (define-public python2-prompt-toolkit
   (package-with-python2 python-prompt-toolkit))