diff mbox series

[bug#41730] gnu: Fix propagations of python-prompt-toolkit-2.

Message ID 74e587be32830618a856a6f2fc29b4ad@autistici.org
State Accepted
Headers show
Series [bug#41730] gnu: Fix propagations of python-prompt-toolkit-2. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Giacomo Leidi June 5, 2020, 11:07 p.m. UTC
Hello Guix!

On Guix System

   guix ecab53c
     repository URL: https://git.savannah.gnu.org/git/guix.git
     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

Comments

Giacomo Leidi June 6, 2020, 3:39 p.m. UTC | #1
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
diff mbox series

Patch

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(-)

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