Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
Newer versions of py-jupyter_client and ipython are python3-only. In preparation of updating these two ports I have been slowly migrating their consumers away from python2. rpointel@ recently committed an update of plaso (consumer of ipython), which has been switched to python3 as well. What remains are a couple of ports that need to be migrated at the same time. Rationale is that these ports all depend upon each other. Splitting up the diff below therefore doesn't make sense. Ports: - devel/ipython - devel/py-ipykernel - devel/py-jupyter_client - devel/py-jupyter_core - devel/py-nbformat - devel/py-traitlets Consumers of the above are already python3-only. Other changes: - switch HOMEPAGE devel/ipython to https Testing: - Build tested ports and their consumers Comments/OK? diff --git devel/Makefile devel/Makefile index 429e62f65f0..849ed5cdcef 100644 --- devel/Makefile +++ devel/Makefile @@ -277,7 +277,6 @@ SUBDIR += include-what-you-use SUBDIR += iniparser SUBDIR += intellij - SUBDIR += ipython SUBDIR += ipython,python3 SUBDIR += iso-codes SUBDIR += itcl @@ -1494,7 +1493,6 @@ SUBDIR += py-iniparse SUBDIR += py-intervaltree SUBDIR += py-intervaltree,python3 - SUBDIR += py-ipykernel SUBDIR += py-ipykernel,python3 SUBDIR += py-ipython_genutils SUBDIR += py-ipython_genutils,python3 @@ -1515,9 +1513,7 @@ SUBDIR += py-jsonrpclib SUBDIR += py-jsonschema SUBDIR += py-jsonschema,python3 - SUBDIR += py-jupyter_client SUBDIR += py-jupyter_client,python3 - SUBDIR += py-jupyter_core SUBDIR += py-jupyter_core,python3 SUBDIR += py-kitchen,python3 SUBDIR += py-kiwisolver @@ -1551,7 +1547,6 @@ SUBDIR += py-munch,python3 SUBDIR += py-mxDateTime SUBDIR += py-nbconvert,python3 - SUBDIR += py-nbformat SUBDIR += py-nbformat,python3 SUBDIR += py-nbval,python3 SUBDIR += py-nose @@ -1710,7 +1705,6 @@ SUBDIR += py-tox SUBDIR += py-tox,python3 SUBDIR += py-traceback2 - SUBDIR += py-traitlets SUBDIR += py-traitlets,python3 SUBDIR += py-trollius SUBDIR += py-twisted diff --git devel/ipython/Makefile devel/ipython/Makefile index 18f71bf9154..03029eb6934 100644 --- devel/ipython/Makefile +++ devel/ipython/Makefile @@ -3,8 +3,9 @@ COMMENT= enhanced interactive Python shell MODPY_EGG_VERSION =5.8.0 -REVISION = 2 +REVISION = 3 DISTNAME= ipython-${MODPY_EGG_VERSION} +PKGNAME = ipython${MODPY_MAJOR_VERSION}-${MODPY_EGG_VERSION} CATEGORIES=devel HOMEPAGE= https://ipython.org/ @@ -20,6 +21,7 @@ RUN_DEPENDS = devel/py-decorator${MODPY_FLAVOR} \ devel/desktop-file-utils \ devel/py-pexpect${MODPY_FLAVOR} \ devel/py-prompt_toolkit${MODPY_FLAVOR} \ + math/py-numpy${MODPY_FLAVOR} \ textproc/py-pygments${MODPY_FLAVOR} # Note that if you have pdb++ installed, tests will fail. @@ -41,16 +43,7 @@ PERMIT_PACKAGE= Yes MODPY_PI = Yes FLAVORS = python3 -FLAVOR ?= - -.if ${FLAVOR:Mpython3} -PKGNAME = ipython${MODPY_MAJOR_VERSION}-${MODPY_EGG_VERSION} -RUN_DEPENDS += math/py-numpy,python3 -.else -RUN_DEPENDS += devel/py-backports-shutil-get-terminal-size \ - devel/py-pathlib2 -TEST_DEPENDS +=devel/py-mock -.endif +FLAVOR = python3 # Despite the fact that setupbase.py defines paths for examples to # be installed into, we still have to do it manually for some reason. diff --git devel/ipython/pkg/PLIST devel/ipython/pkg/PLIST index 4146be3c30e..c5c48c97f01 100644 --- devel/ipython/pkg/PLIST +++ devel/ipython/pkg/PLIST @@ -1,4 +1,6 @@ @comment $OpenBSD: PLIST,v 1.24 2018/10/31 12:37:34 bket Exp $ +@conflict ipython-* +@pkgpath devel/ipython bin/iptest${MODPY_BIN_SUFFIX} @comment bin/iptest2 @comment bin/iptest3 diff --git devel/py-ipykernel/Makefile devel/py-ipykernel/Makefile index 0dc6baf6a5a..81f69643b64 100644 --- devel/py-ipykernel/Makefile +++ devel/py-ipykernel/Makefile @@ -5,7 +5,7 @@ COMMENT = IPython kernel for Jupyter MODPY_EGG_VERSION =4.10.0 DISTNAME = ipykernel-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME} -REVISION = 1 +REVISION = 2 PORTROACH= limit:^4 @@ -32,11 +32,7 @@ MODULES =lang/python MODPY_PI = Yes FLAVORS = python3 -FLAVOR ?= - -.if !${FLAVOR:Mpython3} -TEST_DEPENDS +=devel/py-mock -.endif +FLAVOR = python3 do-test: cd ${WRKSRC} && ${LOCALBASE}/bin/nosetests${MODPY_BIN_SUFFIX} ipykernel diff --git devel/py-ipykernel/pkg/PLIST devel/py-ipykernel/pkg/PLIST index ab3ccabcd1e..5019fbcc1c1 100644 --- devel/py-ipyker
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
Hi Bjorn, I'm testing all the ports and consumers now. Just a note inline. On Wed, 18 Mar 2020, Bjorn Ketelaars wrote: > diff --git devel/ipython/Makefile devel/ipython/Makefile > index 18f71bf9154..03029eb6934 100644 > --- devel/ipython/Makefile > +++ devel/ipython/Makefile > @@ -3,8 +3,9 @@ > COMMENT= enhanced interactive Python shell > > MODPY_EGG_VERSION = 5.8.0 > -REVISION = 2 > +REVISION = 3 > DISTNAME=ipython-${MODPY_EGG_VERSION} > +PKGNAME =ipython${MODPY_MAJOR_VERSION}-${MODPY_EGG_VERSION} > CATEGORIES= devel > > HOMEPAGE=https://ipython.org/ > @@ -20,6 +21,7 @@ RUN_DEPENDS = > devel/py-decorator${MODPY_FLAVOR} \ > devel/desktop-file-utils \ > devel/py-pexpect${MODPY_FLAVOR} \ > devel/py-prompt_toolkit${MODPY_FLAVOR} \ > + math/py-numpy${MODPY_FLAVOR} \ > textproc/py-pygments${MODPY_FLAVOR} > > # Note that if you have pdb++ installed, tests will fail. > @@ -41,16 +43,7 @@ PERMIT_PACKAGE=Yes > MODPY_PI = Yes > > FLAVORS =python3 > -FLAVOR ?= > - > -.if ${FLAVOR:Mpython3} > -PKGNAME =ipython${MODPY_MAJOR_VERSION}-${MODPY_EGG_VERSION} > -RUN_DEPENDS += math/py-numpy,python3 > -.else > -RUN_DEPENDS += devel/py-backports-shutil-get-terminal-size \ > - devel/py-pathlib2 > -TEST_DEPENDS += devel/py-mock > -.endif > +FLAVOR = python3 > > # Despite the fact that setupbase.py defines paths for examples to > # be installed into, we still have to do it manually for some reason. The diff I sent for devel/ipython also removed the renaming of the binaries (so there's no more ipython-3, but ipython and all that). Should we do that ? Or leave it with the "-3" suffix ? # Despite the fact that setupbase.py defines paths for examples to # be installed into, we still have to do it manually for some reason. @@ -62,11 +54,7 @@ post-install: chown -R ${SHAREOWN}:${SHAREGRP} \ ${WRKSRC}/examples/IPython\ Kernel/ipython.desktop mv ${WRKSRC}/examples/IPython\ Kernel/ipython.desktop \ - ${APPS_DIR}/ipython${MODPY_BIN_SUFFIX}.desktop - - mv ${PREFIX}/bin/ipython ${PREFIX}/bin/ipython${MODPY_BIN_SUFFIX} - mv ${PREFIX}/bin/iptest ${PREFIX}/bin/iptest${MODPY_BIN_SUFFIX} - mv ${PREFIX}/man/man1/ipython.1 ${PREFIX}/man/man1/ipython${MODPY_BIN_SUFFIX}.1 + ${APPS_DIR}/ipython.desktop pre-build: ${SUBST_CMD} ${WRKBUILD}/IPython/core/tests/test_interactiveshell.py @@ -74,6 +62,6 @@ pre-build: do-test: env LC_CTYPE=en_US.UTF-8 PYTHONNOUSERSITE=1 \ - ${LOCALBASE}/bin/iptest${MODPY_BIN_SUFFIX} + ${LOCALBASE}/bin/iptest > diff --git devel/ipython/pkg/PLIST devel/ipython/pkg/PLIST > index 4146be3c30e..c5c48c97f01 100644 > --- devel/ipython/pkg/PLIST > +++ devel/ipython/pkg/PLIST > @@ -1,4 +1,6 @@ > @comment $OpenBSD: PLIST,v 1.24 2018/10/31 12:37:34 bket Exp $ > +@conflict ipython-* > +@pkgpath devel/ipython > bin/iptest${MODPY_BIN_SUFFIX} > @comment bin/iptest2 > @comment bin/iptest3 -- Paco Esteban. 0x5818130B8A6DBC03
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
On Thu, Mar 19, 2020 at 05:29:17PM +0100, Paco Esteban wrote: > The diff I sent for devel/ipython also removed the renaming of the > binaries (so there's no more ipython-3, but ipython and all that). > > Should we do that ? > Or leave it with the "-3" suffix ? I wonder if we should make ipython-3 a symlink to ipython? At least tell users about the change, either as a MESSAGE or in current.html? -- Best Regards Edd Barrett http://www.theunixzoo.co.uk
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
On Thu 19/03/2020 17:29, Paco Esteban wrote: > The diff I sent for devel/ipython also removed the renaming of the > binaries (so there's no more ipython-3, but ipython and all that). > > Should we do that ? > Or leave it with the "-3" suffix ? I think your proposal is better. Enclosed a new diff which uses your work on ipython. diff --git devel/Makefile devel/Makefile index da7b0ba8d64..71f07afb8db 100644 --- devel/Makefile +++ devel/Makefile @@ -277,7 +277,6 @@ SUBDIR += include-what-you-use SUBDIR += iniparser SUBDIR += intellij - SUBDIR += ipython SUBDIR += ipython,python3 SUBDIR += iso-codes SUBDIR += itcl @@ -1494,7 +1493,6 @@ SUBDIR += py-iniparse SUBDIR += py-intervaltree SUBDIR += py-intervaltree,python3 - SUBDIR += py-ipykernel SUBDIR += py-ipykernel,python3 SUBDIR += py-ipython_genutils SUBDIR += py-ipython_genutils,python3 @@ -1515,9 +1513,7 @@ SUBDIR += py-jsonrpclib SUBDIR += py-jsonschema SUBDIR += py-jsonschema,python3 - SUBDIR += py-jupyter_client SUBDIR += py-jupyter_client,python3 - SUBDIR += py-jupyter_core SUBDIR += py-jupyter_core,python3 SUBDIR += py-kitchen,python3 SUBDIR += py-kiwisolver @@ -1551,7 +1547,6 @@ SUBDIR += py-munch,python3 SUBDIR += py-mxDateTime SUBDIR += py-nbconvert,python3 - SUBDIR += py-nbformat SUBDIR += py-nbformat,python3 SUBDIR += py-nbval,python3 SUBDIR += py-nose @@ -1710,7 +1705,6 @@ SUBDIR += py-tox SUBDIR += py-tox,python3 SUBDIR += py-traceback2 - SUBDIR += py-traitlets SUBDIR += py-traitlets,python3 SUBDIR += py-trollius SUBDIR += py-twisted diff --git devel/ipython/Makefile devel/ipython/Makefile index 18f71bf9154..efabf8a3182 100644 --- devel/ipython/Makefile +++ devel/ipython/Makefile @@ -3,7 +3,7 @@ COMMENT= enhanced interactive Python shell MODPY_EGG_VERSION =5.8.0 -REVISION = 2 +REVISION = 3 DISTNAME= ipython-${MODPY_EGG_VERSION} CATEGORIES=devel @@ -20,6 +20,7 @@ RUN_DEPENDS = devel/py-decorator${MODPY_FLAVOR} \ devel/desktop-file-utils \ devel/py-pexpect${MODPY_FLAVOR} \ devel/py-prompt_toolkit${MODPY_FLAVOR} \ + math/py-numpy${MODPY_FLAVOR} \ textproc/py-pygments${MODPY_FLAVOR} # Note that if you have pdb++ installed, tests will fail. @@ -41,16 +42,7 @@ PERMIT_PACKAGE= Yes MODPY_PI = Yes FLAVORS = python3 -FLAVOR ?= - -.if ${FLAVOR:Mpython3} -PKGNAME = ipython${MODPY_MAJOR_VERSION}-${MODPY_EGG_VERSION} -RUN_DEPENDS += math/py-numpy,python3 -.else -RUN_DEPENDS += devel/py-backports-shutil-get-terminal-size \ - devel/py-pathlib2 -TEST_DEPENDS +=devel/py-mock -.endif +FLAVOR = python3 # Despite the fact that setupbase.py defines paths for examples to # be installed into, we still have to do it manually for some reason. @@ -62,11 +54,7 @@ post-install: chown -R ${SHAREOWN}:${SHAREGRP} \ ${WRKSRC}/examples/IPython\ Kernel/ipython.desktop mv ${WRKSRC}/examples/IPython\ Kernel/ipython.desktop \ - ${APPS_DIR}/ipython${MODPY_BIN_SUFFIX}.desktop - - mv ${PREFIX}/bin/ipython ${PREFIX}/bin/ipython${MODPY_BIN_SUFFIX} - mv ${PREFIX}/bin/iptest ${PREFIX}/bin/iptest${MODPY_BIN_SUFFIX} - mv ${PREFIX}/man/man1/ipython.1 ${PREFIX}/man/man1/ipython${MODPY_BIN_SUFFIX}.1 + ${APPS_DIR}/ipython.desktop pre-build: ${SUBST_CMD} ${WRKBUILD}/IPython/core/tests/test_interactiveshell.py @@ -74,6 +62,6 @@ pre-build: do-test: env LC_CTYPE=en_US.UTF-8 PYTHONNOUSERSITE=1 \ - ${LOCALBASE}/bin/iptest${MODPY_BIN_SUFFIX} + ${LOCALBASE}/bin/iptest .include diff --git devel/ipython/pkg/PLIST devel/ipython/pkg/PLIST index 4146be3c30e..cba02e8c7ca 100644 --- devel/ipython/pkg/PLIST +++ devel/ipython/pkg/PLIST @@ -1,9 +1,11 @@ @comment $OpenBSD: PLIST,v 1.24 2018/10/31 12:37:34 bket Exp $ -bin/iptest${MODPY_BIN_SUFFIX} +@conflict ipython* +@pkgpath devel/ipython @comment bin/iptest2 -@comment bin/iptest3 -bin/ipython${MODPY_BIN_SUFFIX} @comment bin/ipython2 +bin/iptest +@comment bin/iptest3 +bin/ipython @comment bin/ipython3 lib/python${MODPY_VERSION}/site-packages/IPython/ lib/python${MODPY_VERSION}/site-packages/IPython/__init__.py @@ -665,6 +667,6 @@ lib/python${MODPY_VERSION}/site-packages/IPython/utils/version.py lib/python${MODPY_VERSION}/site-packages/IPython/utils/warn.py lib/python${MODPY_VERSION}/site-packages/IPython/utils/wildcard.py lib/python${MODPY_VERSION}/site-packages/ipython-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info -@man man/man1/ipython${MODPY_BIN_SUFFIX}.1 -share/applications/ipython${MODPY_
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
On Thu, 19 Mar 2020, Edd Barrett wrote: > On Thu, Mar 19, 2020 at 05:29:17PM +0100, Paco Esteban wrote: > > The diff I sent for devel/ipython also removed the renaming of the > > binaries (so there's no more ipython-3, but ipython and all that). > > > > Should we do that ? > > Or leave it with the "-3" suffix ? > > I wonder if we should make ipython-3 a symlink to ipython? > > At least tell users about the change, either as a MESSAGE or in > current.html? I leave that decision to you as maintainer. I'm not a user of ipython myself, so I don't really care. Just let us know so we can include it on a diff if necessary. I hope to finish this endless testing this weekend ... Cheers, -- Paco Esteban. 0x5818130B8A6DBC03
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
On Thu, 19 Mar 2020, Bjorn Ketelaars wrote: > On Thu 19/03/2020 17:29, Paco Esteban wrote: > > The diff I sent for devel/ipython also removed the renaming of the > > binaries (so there's no more ipython-3, but ipython and all that). > > > > Should we do that ? > > Or leave it with the "-3" suffix ? > > I think your proposal is better. Enclosed a new diff which uses your > work on ipython. All build and install fine for me on amd64. About tests, all tests pass for those ports with the exceptions of: * devel/ipython Status: ERROR - 3 out of 7 test groups failed (core, lib, utils). * devel/py-jupyter_client jupyter_client/tests/test_multikernelmanager.py ...Segmentation fault This is the same as before the patches, so I guess it's ok. I also tried to test as much consumers as I could without finding any significant differences. This is expected, as there are no updates, just the py2 --> py3 move. Waiting for Edd's (maintainer) decision on the binary name change notification for users regarding ipython. A part from that, ok paco. Cheers, -- Paco Esteban. 0x5818130B8A6DBC03
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
Hi, Sorry for the delay. On Sat, Mar 21, 2020 at 05:14:57PM +0100, Paco Esteban wrote: > Waiting for Edd's (maintainer) decision on the binary name change > notification for users regarding ipython. Currently we have install either `ipython-2` and `ipython-3`. Nothing installs any `ipython` binary at present. So I'd be happy for either of the following things to happen: * For `ipython-2` to just disappear. * For `ipython-3` to be renamed `ipython` (as it is in the diff). Either way I will write an entry for current.html Latest diff reads fine for me. Thanks for working on this! -- Best Regards Edd Barrett http://www.theunixzoo.co.uk
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
On Sun, Mar 22, 2020 at 03:34:07PM +, Edd Barrett wrote: > Either way I will write an entry for current.html > ... > * For `ipython-3` to be renamed `ipython` (as it is in the diff). ^ Assuming we do this: Index: current.html === RCS file: /cvs/www/faq/current.html,v retrieving revision 1.1032 diff -u -p -r1.1032 current.html --- current.html17 Mar 2020 04:56:14 - 1.1032 +++ current.html22 Mar 2020 15:55:52 - @@ -265,3 +265,11 @@ Please note that tools supplied by this $OpenBSD: current.html,v 1.1032 2020/03/17 04:56:14 tb Exp $ + +2020/02/23 - [packages] Retiring Python 2 support in IPython + +The IPython port now only supports Python 3. + + +/usr/local/bin/ipython-3 has been renamed to +/usr/local/bin/ipython. -- Best Regards Edd Barrett http://www.theunixzoo.co.uk
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
On Sun, Mar 22, 2020 at 03:57:50PM +, Edd Barrett wrote: > On Sun, Mar 22, 2020 at 03:34:07PM +, Edd Barrett wrote: > > Either way I will write an entry for current.html > > ... > > * For `ipython-3` to be renamed `ipython` (as it is in the diff). > > ^ Assuming we do this: > > Index: current.html > === > RCS file: /cvs/www/faq/current.html,v > retrieving revision 1.1032 > diff -u -p -r1.1032 current.html > --- current.html 17 Mar 2020 04:56:14 - 1.1032 > +++ current.html 22 Mar 2020 15:55:52 - > @@ -265,3 +265,11 @@ Please note that tools supplied by this > > > $OpenBSD: current.html,v 1.1032 2020/03/17 04:56:14 tb Exp $ > + > +2020/02/23 - [packages] Retiring Python 2 support in > IPython > + > +The IPython port now only supports Python 3. > + > + > +/usr/local/bin/ipython-3 has been renamed to > +/usr/local/bin/ipython. Oops! Let's try again. Index: current.html === RCS file: /cvs/www/faq/current.html,v retrieving revision 1.1032 diff -u -p -r1.1032 current.html --- current.html17 Mar 2020 04:56:14 - 1.1032 +++ current.html22 Mar 2020 16:30:52 - @@ -256,6 +256,13 @@ Please note that tools supplied by this jupyter-notebook-3 has been renamed to jupyter-notebook. +2020/03/23 - [packages] Retiring Python 2 support in IPython + +The IPython port now only supports Python 3. + + +/usr/local/bin/ipython-3 has been renamed to +/usr/local/bin/ipython.
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
On Sun 22/03/2020 16:31, Edd Barrett wrote: > On Sun, Mar 22, 2020 at 03:57:50PM +, Edd Barrett wrote: > > On Sun, Mar 22, 2020 at 03:34:07PM +, Edd Barrett wrote: > > > Either way I will write an entry for current.html > > > ... > > > * For `ipython-3` to be renamed `ipython` (as it is in the diff). > > > > ^ Assuming we do this: > > > > Index: current.html > > === > > RCS file: /cvs/www/faq/current.html,v > > retrieving revision 1.1032 > > diff -u -p -r1.1032 current.html > > --- current.html17 Mar 2020 04:56:14 - 1.1032 > > +++ current.html22 Mar 2020 15:55:52 - > > @@ -265,3 +265,11 @@ Please note that tools supplied by this > > > > > > $OpenBSD: current.html,v 1.1032 2020/03/17 04:56:14 tb Exp $ > > + > > +2020/02/23 - [packages] Retiring Python 2 support in > > IPython > > + > > +The IPython port now only supports Python 3. > > + > > + > > +/usr/local/bin/ipython-3 has been renamed to > > +/usr/local/bin/ipython. > > Oops! Let's try again. > > Index: current.html > === > RCS file: /cvs/www/faq/current.html,v > retrieving revision 1.1032 > diff -u -p -r1.1032 current.html > --- current.html 17 Mar 2020 04:56:14 - 1.1032 > +++ current.html 22 Mar 2020 16:30:52 - > @@ -256,6 +256,13 @@ Please note that tools supplied by this > jupyter-notebook-3 has been renamed to > jupyter-notebook. > > +2020/03/23 - [packages] Retiring Python 2 support in > IPython > + > +The IPython port now only supports Python 3. > + > + > +/usr/local/bin/ipython-3 has been renamed to > +/usr/local/bin/ipython. > >
Re: Migrate ipython/py-ipykernel/py-jupyter_*/py-nbformat/py-traitlets to py3-only
On Sun, 22 Mar 2020, Bjorn Ketelaars wrote: > Unless someone objects, I will commit my diff tomorrow morning (CET). Looking forward to it. I'll send a ping with my two related diffs then :-) -- Paco Esteban. 0x5818130B8A6DBC03