Bug 1410332 - jupyter-3 subcommands all require extra versions
Summary: jupyter-3 subcommands all require extra versions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-jupyter-core
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Spura
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-05 07:33 UTC by Elliott Sales de Andrade
Modified: 2017-09-30 06:17 UTC (History)
4 users (show)

Fixed In Version: python-jupyter-core-4.3.0-2.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-30 06:17:09 UTC
Type: Bug


Attachments (Terms of Use)
Lock Jupyter subcommands to same Python version (1.77 KB, patch)
2017-01-05 08:47 UTC, Elliott Sales de Andrade
no flags Details | Diff

Description Elliott Sales de Andrade 2017-01-05 07:33:36 UTC
Description of problem:
Jupyter seems to determine what subcommands exists by looking for jupyter-* in the PATH. In Fedora, Python 3 executables are all suffixed with -3 and -3.5/-3.6. This means that a) all the subcommands get an extra version suffix and b) there're extraneous '3' and '3.5' subcommands.

Version-Release number of selected component (if applicable):
4.0.2-4.fc25

How reproducible:
I'm using my copr at the moment [1], but it's just a backport of the spec from Rawhide.


Steps to Reproduce:
1. Run `jupyter-3 --help`


Actual results:

usage: jupyter-3 [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
                 [--paths] [--json]
                 [subcommand]

Jupyter: Interactive Computing

positional arguments:
  subcommand     the subcommand to launch

optional arguments:
  -h, --help     show this help message and exit
  --version      show the jupyter command's version and exit
  --config-dir   show Jupyter config dir
  --data-dir     show Jupyter data dir
  --runtime-dir  show Jupyter runtime dir
  --paths        show all Jupyter paths. Add --json for machine-readable
                 format.
  --json         output paths as machine-readable json

Available subcommands: 3 3.5 console-3 console-3.5 kernelspec migrate-3
migrate-3.5 nbconvert-3 nbconvert-3.5 nbextension-3 nbextension-3.5 notebook-3
notebook-3.5 serverextension-3 serverextension-3.5 trust


Expected results:

Available subcommands should be "console kernelspec migrate nbconvert nbextension notebook serverextension trust" since the number is redundant with the base command.


Additional info:
[1] https://copr.fedorainfracloud.org/coprs/qulogic/jupyter/

Comment 1 Elliott Sales de Andrade 2017-01-05 08:47:02 UTC
Created attachment 1237546 [details]
Lock Jupyter subcommands to same Python version

I've created and currently using the attached patch (also available at [1]), which locks Jupyter subcommands to those that contain a major or major/minor suffix that matches its own interpreter. I'm not sure whether the locking should only be to the latter. It also ignores non-suffixed subcommands.

I'm not too sure whether this patch needs to be/should be upstreamed.

[1] https://github.com/QuLogic/rpmbuild-specs/commit/1dc4276d9437cc6f905dff03d734b315aa10ffbe + https://github.com/QuLogic/rpmbuild-specs/commit/c5233abf8a012ebaa49b322ef9adc8ef0be7dc24

Comment 2 Thomas Spura 2017-02-09 21:57:40 UTC
Thanks for this bug report. Do you also want to co-maintain this stack in Fedora? I would welcome some help updating the stack :)

(In reply to Elliott Sales de Andrade from comment #1)
> Created attachment 1237546 [details]
> Lock Jupyter subcommands to same Python version
> 
> I've created and currently using the attached patch (also available at [1]),
> which locks Jupyter subcommands to those that contain a major or major/minor
> suffix that matches its own interpreter. I'm not sure whether the locking
> should only be to the latter. It also ignores non-suffixed subcommands.
> 
> I'm not too sure whether this patch needs to be/should be upstreamed.


I think so. It is also a good way to discuss with upstream, if this is a good idea to implement. Furthermore, maybe other distros can use it too and upstream wants to implement it because of that.

Do you want to propose it upstream?

Comment 3 Elliott Sales de Andrade 2017-03-05 23:10:19 UTC
(In reply to Thomas Spura from comment #2)
> Thanks for this bug report. Do you also want to co-maintain this stack in
> Fedora? I would welcome some help updating the stack :)

For that, I would need a sponsor, probably. I do have the entire stack in a copr, though [1].

(In reply to Thomas Spura from comment #2)
> I think so. It is also a good way to discuss with upstream, if this is a
> good idea to implement. Furthermore, maybe other distros can use it too and
> upstream wants to implement it because of that.
> 
> Do you want to propose it upstream?

I can't find it at the moment, but I remember seeing a GitHub comment where upstream recommends only installing jupyter on Python 3. You might need Python 2 for a kernel, but then you only need ipykernel, not the executables.

So maybe we should not even be shipping this split set of executables at all?


[1] https://copr.fedorainfracloud.org/coprs/qulogic/jupyter/

Comment 4 Thomas Spura 2017-03-06 09:55:03 UTC
(In reply to Elliott Sales de Andrade from comment #3)
> (In reply to Thomas Spura from comment #2)
> > Thanks for this bug report. Do you also want to co-maintain this stack in
> > Fedora? I would welcome some help updating the stack :)
> 
> For that, I would need a sponsor, probably. I do have the entire stack in a
> copr, though [1].

Orion (in CC) and me are both sponsors and can help you getting on board. :)
I don't find the time recently to update the entire stack properly in Fedora and help is appreciated (see e.g. #1327979#c15)

> (In reply to Thomas Spura from comment #2)
> > I think so. It is also a good way to discuss with upstream, if this is a
> > good idea to implement. Furthermore, maybe other distros can use it too and
> > upstream wants to implement it because of that.
> > 
> > Do you want to propose it upstream?
> 
> I can't find it at the moment, but I remember seeing a GitHub comment where
> upstream recommends only installing jupyter on Python 3. You might need
> Python 2 for a kernel, but then you only need ipykernel, not the executables.
> 
> So maybe we should not even be shipping this split set of executables at all?
> 
> 
> [1] https://copr.fedorainfracloud.org/coprs/qulogic/jupyter/


Agreed...

Comment 5 Elliott Sales de Andrade 2017-07-13 22:43:54 UTC
It's too bad this could not have been done before F26 was out. The notebook was added with only a Python 3 executable, which is confusing since `jupyter notebook` will run the Python 3 version even though plain `jupyter` is Python 2.

PS, if you'd like to help sponsor me along, I've got a few review requests up:
https://bugzilla.redhat.com/show_bug.cgi?id=1468872
https://bugzilla.redhat.com/show_bug.cgi?id=1468873
https://bugzilla.redhat.com/show_bug.cgi?id=1468877
https://bugzilla.redhat.com/show_bug.cgi?id=1468995

Comment 6 Miro Hrončok 2017-07-14 00:03:07 UTC
I am in favor of dropping all the Python 2 executables if possible and only supporting running Python 3 Jupyter with the Python 2 kernel. (Too bad I haven't sen this in time before Fedra 26. Will watch this package from now on.)

Comment 7 Elliott Sales de Andrade 2017-09-01 02:12:50 UTC
Is this going to be corrected in F27 at least?

PS, I am sponsored now so I could co-maintain something if needed.

Comment 8 Miro Hrončok 2017-09-01 10:25:31 UTC
If someone else from the SIG says go for it, i'll move all the jupyter executables to Python 3 only for Fedora 27.

Comment 9 Miro Hrončok 2017-09-01 11:49:57 UTC
python-jupyter-core PR https://src.fedoraproject.org/rpms/python-jupyter-core/pull-request/1

Comment 10 Miro Hrončok 2017-09-01 12:00:54 UTC
python-jupyter-client PR https://src.fedoraproject.org/rpms/python-jupyter-client/pull-request/1

Comment 11 Miro Hrončok 2017-09-01 12:15:57 UTC
python-nbconvert PR https://src.fedoraproject.org/rpms/python-nbconvert/pull-request/1

Comment 12 Miro Hrončok 2017-09-01 12:28:29 UTC
python-nbformat already has only py3 executables

Comment 13 Miro Hrončok 2017-09-01 12:30:58 UTC
python-notebook already has only py3 executables

Comment 14 Miro Hrončok 2017-09-01 12:44:43 UTC
python-qtconsole PR https://src.fedoraproject.org/rpms/python-qtconsole/pull-request/1

Comment 15 Miro Hrončok 2017-09-01 12:46:13 UTC
That should be all.

$ sudo dnf repoquery --release=rawhide --disablerepo=\* --enablerepo=fedora -f /usr/bin/jupyter-\* --srpm
python-jupyter-client-0:4.4.0-4.fc27.src
python-jupyter-core-0:4.1.0-9.fc27.src
python-nbconvert-0:5.2.1-2.fc27.src
python-nbformat-0:4.3.0-3.fc27.src
python-notebook-0:5.1.0-0.1.rc2.fc28.src
python-qtconsole-0:4.3.0-1.fc28.src

Comment 16 Miro Hrončok 2017-09-03 11:56:12 UTC
(In reply to Miro Hrončok from comment #11)
> python-nbconvert PR
> https://src.fedoraproject.org/rpms/python-nbconvert/pull-request/1

Merged.
Rawhide build: https://koji.fedoraproject.org/koji/taskinfo?taskID=21628994


(In reply to Miro Hrončok from comment #14)
> python-qtconsole PR
> https://src.fedoraproject.org/rpms/python-qtconsole/pull-request/1

Merged.
Rawhide build: https://koji.fedoraproject.org/koji/taskinfo?taskID=21629003


Will do f27 builds once everything is merged.

Comment 17 Fedora Update System 2017-09-05 11:21:18 UTC
python-qtconsole-4.3.0-2.fc27 python-jupyter-core-4.3.0-2.fc27 python-jupyter-client-4.4.0-5.fc27 python-nbconvert-5.2.1-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2918376bf1

Comment 18 Fedora Update System 2017-09-07 14:31:00 UTC
python-jupyter-client-4.4.0-5.fc27, python-jupyter-core-4.3.0-2.fc27, python-nbconvert-5.2.1-3.fc27, python-qtconsole-4.3.0-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2918376bf1

Comment 19 Fedora Update System 2017-09-30 06:17:09 UTC
python-jupyter-client-4.4.0-5.fc27, python-jupyter-core-4.3.0-2.fc27, python-nbconvert-5.2.1-3.fc27, python-qtconsole-4.3.0-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.