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/
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
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?
(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/
(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...
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
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.)
Is this going to be corrected in F27 at least? PS, I am sponsored now so I could co-maintain something if needed.
If someone else from the SIG says go for it, i'll move all the jupyter executables to Python 3 only for Fedora 27.
python-jupyter-core PR https://src.fedoraproject.org/rpms/python-jupyter-core/pull-request/1
python-jupyter-client PR https://src.fedoraproject.org/rpms/python-jupyter-client/pull-request/1
python-nbconvert PR https://src.fedoraproject.org/rpms/python-nbconvert/pull-request/1
python-nbformat already has only py3 executables
python-notebook already has only py3 executables
python-qtconsole PR https://src.fedoraproject.org/rpms/python-qtconsole/pull-request/1
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
(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.
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
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
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.