[PATCH] gnu: Fix propagations of python-prompt-toolkit-2.

  • Done
  • quality assurance status badge
Details
2 participants
  • goodoldpaul
  • Ricardo Wurmus
Owner
unassigned
Submitted by
goodoldpaul
Severity
normal
G
G
goodoldpaul wrote on 6 Jun 2020 01:07
(address . guix-patches@gnu.org)
74e587be32830618a856a6f2fc29b4ad@autistici.org
Hello Guix!

On Guix System

guix ecab53c
branch: master
commit: ecab53c320b1584a08f811b17a92bd9a50a50ff3

it's impossible to install jupyter in a new profile because it tries to
propagate two different versions of python-ipython, you should be able
to reproduce with:

guix package -p /tmp/tmp-prof -i jupyter

I believe since 32ba87c14fd5e5b54d95211cd9a159d568ce7c67 many packages
whose tests depend on version python-prompt-toolkit at version 2 yield
conflicts when installed in a profile.

I attached a patch to propagate the right versions.

Giacomo
From 052d6b9b72a914a15cf01f83e7c73439fac44c16 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <goodoldpaul@autistici.org>
Date: Sat, 6 Jun 2020 00:30:08 +0200
Subject: [PATCH] gnu: Fix propagations of python-prompt-toolkit-2.

Since the update of python-prompt-toolkit to 3.0.5 many packages whose
tests depend on version 2 yield conflicts when installed in a profile.

* gnu/packages/python-xyz.scm (python-ipywidgets)[propagated-inputs]: Add
python-ipython, move python-ipython-with-prompt-toolkit-2 from here...
[native-inputs]: ...to here;
(python-jupyter-console)[propagated-inputs]: Add python-ipykernel and
python-prompt-toolkit, move python-ipykernel-with-prompt-toolkit-2 from
here...
[native-inputs]: ...to here and add python-prompt-toolkit-2;
(python-widgetsnbextension)[propagated-inputs]: Add python-ipykernel, move
python-ipykernel-with-prompt-toolkit-2 from here...
[native-inputs]: ...to here.
---
gnu/packages/python-xyz.scm | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2e9f0d5632..72a25a6aef 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9016,11 +9016,13 @@ interactive computing.")
"1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-ipykernel"
- ,(prompt-toolkit-2-instead-of-prompt-toolkit python-ipykernel))
+ `(("python-ipykernel" ,python-ipykernel)
("python-notebook" ,python-notebook)))
(native-inputs
- `(("python-certifi" ,python-certifi)
+ ;; FIXME: ipykernel is here to prevent profile conflicts.
+ `(("python-ipykernel-with-prompt-2"
+ ,(prompt-toolkit-2-instead-of-prompt-toolkit python-ipykernel))
+ ("python-certifi" ,python-certifi)
("python-nose" ,python-nose)))
(home-page "https://ipython.org")
(synopsis "IPython HTML widgets for Jupyter")
@@ -9044,12 +9046,15 @@ notebooks.")
"15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-ipython" ,(prompt-toolkit-2-instead-of-prompt-toolkit
- python-ipython))
+ `(("python-ipython" ,python-ipython)
("python-traitlets" ,python-traitlets)
("python-widgetsnbextension" ,python-widgetsnbextension)))
(native-inputs
- `(("python-nose" ,python-nose)
+ ;; FIXME: ipython is here to prevent profile conflicts.
+ `(("python-ipython-with-prompt-2"
+ ,(prompt-toolkit-2-instead-of-prompt-toolkit
+ python-ipython))
+ ("python-nose" ,python-nose)
("python-pytest" ,python-pytest)))
(home-page "https://ipython.org")
(synopsis "IPython HTML widgets for Jupyter")
@@ -9075,13 +9080,17 @@ in the data.")
"06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-ipykernel" ,(prompt-toolkit-2-instead-of-prompt-toolkit
- python-ipykernel))
+ `(("python-ipykernel" ,python-ipykernel)
("python-jupyter-client" ,python-jupyter-client)
- ("python-prompt-toolkit" ,python-prompt-toolkit-2)
+ ("python-prompt-toolkit" ,python-prompt-toolkit)
("python-pygments" ,python-pygments)))
(native-inputs
- `(("python-nose" ,python-nose)))
+ ;; FIXME: ipykernel is here to prevent profile conflicts.
+ `(("python-ipykernel-with-prompt-2"
+ ,(prompt-toolkit-2-instead-of-prompt-toolkit
+ python-ipykernel))
+ ("python-prompt-toolkit-2" ,python-prompt-toolkit-2)
+ ("python-nose" ,python-nose)))
(home-page "https://jupyter.org")
(synopsis "Jupyter terminal console")
(description "This package provides a terminal-based console frontend for
--
2.26.2
P
(address . 41730@debbugs.gnu.org)
54bfd14b-d57d-6fa1-0c3c-ec23a6e81cdc@autistici.org
Hi everybody, a little update about this patch,

I just found out that it doesn't actually fix the problem: the
requirement for prompt 2 is enforced also at runtime.

The output of guix package _without_ my patch is:


$ guix package -p /tmp/tmp-profile -i jupyter
The following package will be installed:
   jupyter 1.0.0

guix package: error: profile contains conflicting entries for python-ipython
guix package: error:   first entry: python-ipython@7.9.0
/gnu/store/z0yarar134q6sziqncjdlfg2h2w5b2yh-python-ipython-7.9.0
guix package: error:    ... propagated from python-ipywidgets@7.5.1
guix package: error:    ... propagated from jupyter@1.0.0
guix package: error:   second entry: python-ipython@7.9.0
/gnu/store/avmg5jd7kccchxadsd9c7zq0p3shlk3w-python-ipython-7.9.0
guix package: error:    ... propagated from python-qtconsole@4.4.3
guix package: error:    ... propagated from jupyter@1.0.0
hint: You cannot have two different versions or variants of `jupyter' in
the same profile.


With my patch applied it is possible to install jupyter without
conflicts but when started it crashes asking for prompt-toolkit at
version 2. The conflict seems to be caused because:

-
/gnu/store/avmg5jd7kccchxadsd9c7zq0p3shlk3w-python-ipython-7.9.0depends
on python-prompt-toolkit@3.0.5

-
/gnu/store/z0yarar134q6sziqncjdlfg2h2w5b2yh-python-ipython-7.9.0depends
on python-prompt-toolkit@2.0.7

Please ignore the previous patch, I apologize for the noise. I'm opening
an actual bug report and I'll start working on a fix ASAP.


Giacomo
Attachment: file
R
R
Ricardo Wurmus wrote on 16 Jun 2020 19:37
Re: [bug#41889] [PATCH] gnu: jupyter: Fix python-ipython conflict that prevented installation
(name . Edouard Klein)(address . edk@beaver-labs.com)
874kravrnj.fsf@elephly.net
Hi Edouard,

thank you for providing a fix. I think it’s too complicated, though.
Using prompt-toolkit-2-instead-of-prompt-toolkit everywhere does not
seem like an elegant solution.

I pushed a different fix with commit 7146c8c75d.

--
Ricardo
Closed
?