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

DoneSubmitted by goodoldpaul.
2 participants
  • goodoldpaul
  • Ricardo Wurmus
goodoldpaul wrote on 6 Jun 2020 01:07
(address . guix-patches@gnu.org)
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.
From 052d6b9b72a914a15cf01f83e7c73439fac44c16 Mon Sep 17 00:00:00 2001From: Giacomo Leidi <goodoldpaul@autistici.org>Date: Sat, 6 Jun 2020 00:30:08 +0200Subject: [PATCH] gnu: Fix propagations of python-prompt-toolkit-2.
Since the update of python-prompt-toolkit to 3.0.5 many packages whosetests depend on version 2 yield conflicts when installed in a profile.
* gnu/packages/python-xyz.scm (python-ipywidgets)[propagated-inputs]: Addpython-ipython, move python-ipython-with-prompt-toolkit-2 from here...[native-inputs]: ...to here;(python-jupyter-console)[propagated-inputs]: Add python-ipykernel andpython-prompt-toolkit, move python-ipykernel-with-prompt-toolkit-2 fromhere...[native-inputs]: ...to here and add python-prompt-toolkit-2;(python-widgetsnbextension)[propagated-inputs]: Add python-ipykernel, movepython-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.scmindex 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
(address . 41730@debbugs.gnu.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 jupyterThe following package will be installed:    jupyter 1.0.0
guix package: error: profile contains conflicting entries for python-ipythonguix package: error:   first entry: python-ipython@7.9.0 /gnu/store/z0yarar134q6sziqncjdlfg2h2w5b2yh-python-ipython-7.9.0guix package: error:    ... propagated from python-ipywidgets@7.5.1guix package: error:    ... propagated from jupyter@1.0.0guix package: error:   second entry: python-ipython@7.9.0 /gnu/store/avmg5jd7kccchxadsd9c7zq0p3shlk3w-python-ipython-7.9.0guix package: error:    ... propagated from python-qtconsole@4.4.3guix package: error:    ... propagated from jupyter@1.0.0hint: 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.

Attachment: file
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)
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 notseem like an elegant solution.
I pushed a different fix with commit 7146c8c75d.
-- Ricardo
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 41730@debbugs.gnu.org