Index: devel/py-jupyter_core/Makefile
===================================================================
RCS file: /cvs/ports/devel/py-jupyter_core/Makefile,v
retrieving revision 1.4
diff -u -p -u -r1.4 Makefile
--- devel/py-jupyter_core/Makefile 18 Feb 2017 13:37:44 -0000 1.4
+++ devel/py-jupyter_core/Makefile 10 Dec 2018 18:06:28 -0000
@@ -2,15 +2,15 @@
COMMENT = Jupyter core package
-MODPY_EGG_VERSION = 4.3.0
+MODPY_EGG_VERSION = 4.4.0
DISTNAME = jupyter_core-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
CATEGORIES = devel
-HOMEPAGE = http://jupyter.org/
+HOMEPAGE = https://jupyter.org/
-MAINTAINER = Alexandr Shadchin <shadchin@openbsd.org>
+MAINTAINER = Elias M. Mariani <marianielias@gmail.com>
RUN_DEPENDS = devel/py-traitlets${MODPY_FLAVOR}
TEST_DEPENDS = ${RUN_DEPENDS} \
Index: devel/py-jupyter_core/distinfo
===================================================================
RCS file: /cvs/ports/devel/py-jupyter_core/distinfo,v
retrieving revision 1.3
diff -u -p -u -r1.3 distinfo
--- devel/py-jupyter_core/distinfo 18 Feb 2017 13:37:44 -0000 1.3
+++ devel/py-jupyter_core/distinfo 10 Dec 2018 18:06:28 -0000
@@ -1,2 +1,2 @@
-SHA256 (jupyter_core-4.3.0.tar.gz) = qWsSnhZBQlvwV8PUb09Erc50en1gEH6K13EEXDZRTUA=
-SIZE (jupyter_core-4.3.0.tar.gz) = 57998
+SHA256 (jupyter_core-4.4.0.tar.gz) = unB1SqaAMAMGxpl5ASj2+9jDBu5ZJ5dsvkitrPJAwLc=
+SIZE (jupyter_core-4.4.0.tar.gz) = 63613
Index: devel/py-jupyter_core/patches/patch-jupyter_core_tests_test_command_py
===================================================================
RCS file: /cvs/ports/devel/py-jupyter_core/patches/patch-jupyter_core_tests_test_command_py,v
retrieving revision 1.1
diff -u -p -u -r1.1 patch-jupyter_core_tests_test_command_py
--- devel/py-jupyter_core/patches/patch-jupyter_core_tests_test_command_py 13 Dec 2016 14:46:43 -0000 1.1
+++ devel/py-jupyter_core/patches/patch-jupyter_core_tests_test_command_py 10 Dec 2018 18:06:28 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-jupyter_core_tests_test_command_py,v 1.1 2016/12/13 14:46:43 shadchin Exp $
---- jupyter_core/tests/test_command.py.orig Tue Sep 13 18:22:49 2016
-+++ jupyter_core/tests/test_command.py Fri Oct 7 21:46:24 2016
-@@ -78,16 +78,20 @@ def test_subcommand_not_found():
+Index: jupyter_core/tests/test_command.py
+--- jupyter_core/tests/test_command.py.orig
++++ jupyter_core/tests/test_command.py
+@@ -98,16 +98,20 @@ def test_subcommand_not_found():
@patch.object(sys, 'argv', [__file__] + sys.argv[1:])
def test_subcommand_list(tmpdir):
@@ -24,7 +25,7 @@ $OpenBSD: patch-jupyter_core_tests_test_
path = os.pathsep.join(map(str, [a, b]))
-@@ -101,6 +105,10 @@ def test_subcommand_list(tmpdir):
+@@ -121,13 +125,17 @@ def test_subcommand_list(tmpdir):
]
def test_not_on_path(tmpdir):
@@ -35,16 +36,15 @@ $OpenBSD: patch-jupyter_core_tests_test_
a = tmpdir.mkdir("a")
jupyter = a.join('jupyter')
jupyter.write(
-@@ -110,7 +118,7 @@ def test_not_on_path(tmpdir):
- witness_cmd = 'jupyter-witness'
- if sys.platform == 'win32':
- witness_cmd += '.py'
-- witness = a.join(witness_cmd)
-+ witness = a.join(witness_cmd + cmd_sufx)
- witness.write('#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")'))
- witness.chmod(0o700)
- out = check_output([sys.executable, str(jupyter), 'witness'], env={'PATH': ''})
-@@ -118,6 +126,10 @@ def test_not_on_path(tmpdir):
+ 'from jupyter_core import command; command.main()'
+ )
+ jupyter.chmod(0o700)
+- witness = a.join('jupyter-witness')
++ witness = a.join('jupyter-witness' + cmd_sufx)
+ witness_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")')
+ write_executable(witness, witness_src)
+
+@@ -142,18 +150,22 @@ def test_not_on_path(tmpdir):
def test_path_priority(tmpdir):
@@ -55,18 +55,17 @@ $OpenBSD: patch-jupyter_core_tests_test_
a = tmpdir.mkdir("a")
jupyter = a.join('jupyter')
jupyter.write(
-@@ -127,12 +139,12 @@ def test_path_priority(tmpdir):
- witness_cmd = 'jupyter-witness'
- if sys.platform == 'win32':
- witness_cmd += '.py'
-- witness_a = a.join(witness_cmd)
-+ witness_a = a.join(witness_cmd + cmd_sufx)
- witness_a.write('#!%s\n%s\n' % (sys.executable, 'print("WITNESS A")'))
- witness_a.chmod(0o700)
+ 'from jupyter_core import command; command.main()'
+ )
+ jupyter.chmod(0o700)
+- witness_a = a.join('jupyter-witness')
++ witness_a = a.join('jupyter-witness' + cmd_sufx)
+ witness_a_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS A")')
+ write_executable(witness_a, witness_a_src)
b = tmpdir.mkdir("b")
-- witness_b = b.join(witness_cmd)
-+ witness_b = b.join(witness_cmd + cmd_sufx)
- witness_b.write('#!%s\n%s\n' % (sys.executable, 'print("WITNESS B")'))
- witness_b.chmod(0o700)
+- witness_b = b.join('jupyter-witness')
++ witness_b = b.join('jupyter-witness' + cmd_sufx)
+ witness_b_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS B")')
+ write_executable(witness_b, witness_b_src)
Index: devel/py-jupyter_client/Makefile
===================================================================
RCS file: /cvs/ports/devel/py-jupyter_client/Makefile,v
retrieving revision 1.6
diff -u -p -u -r1.6 Makefile
--- devel/py-jupyter_client/Makefile 24 Jun 2017 09:52:46 -0000 1.6
+++ devel/py-jupyter_client/Makefile 10 Dec 2018 18:17:46 -0000
@@ -2,15 +2,15 @@
COMMENT = Jupyter protocol implementation and client libraries
-MODPY_EGG_VERSION = 5.1.0
+MODPY_EGG_VERSION = 5.2.3
DISTNAME = jupyter_client-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
CATEGORIES = devel
-HOMEPAGE = http://jupyter.org/
+HOMEPAGE = https://jupyter.org/
-MAINTAINER = Alexandr Shadchin <shadchin@openbsd.org>
+MAINTAINER = Elias M. Mariani <marianielias@gmail.com>
# BSD
PERMIT_PACKAGE_CDROM = Yes
@@ -26,18 +26,20 @@ FLAVOR ?=
RUN_DEPENDS = devel/py-dateutil${MODPY_FLAVOR} \
devel/py-jupyter_core${MODPY_FLAVOR}>=4.3.0 \
devel/py-traitlets${MODPY_FLAVOR} \
- net/py-zmq${MODPY_FLAVOR}
+ net/py-zmq${MODPY_FLAVOR} \
+ www/py-tornado${MODPY_FLAVOR}
TEST_DEPENDS = ${RUN_DEPENDS} \
devel/ipython${MODPY_FLAVOR}>=5.1.0 \
devel/py-ipykernel${MODPY_FLAVOR}>=4.5.2 \
devel/py-test${MODPY_FLAVOR} \
- net/py-msgpack${MODPY_FLAVOR}
+ shells/bash
.if !${FLAVOR:Mpython3}
TEST_DEPENDS += devel/py-mock
.endif
post-install:
+ mv ${PREFIX}/bin/jupyter-kernel{,${MODPY_BIN_SUFFIX}}
mv ${PREFIX}/bin/jupyter-kernelspec{,${MODPY_BIN_SUFFIX}}
mv ${PREFIX}/bin/jupyter-run{,${MODPY_BIN_SUFFIX}}
Index: devel/py-jupyter_client/distinfo
===================================================================
RCS file: /cvs/ports/devel/py-jupyter_client/distinfo,v
retrieving revision 1.5
diff -u -p -u -r1.5 distinfo
--- devel/py-jupyter_client/distinfo 24 Jun 2017 09:52:46 -0000 1.5
+++ devel/py-jupyter_client/distinfo 10 Dec 2018 18:17:46 -0000
@@ -1,2 +1,2 @@
-SHA256 (jupyter_client-5.1.0.tar.gz) = CHVrAhdlyXvFZlOQcApCVcLfMWZurYv/EWs2jQmRKro=
-SIZE (jupyter_client-5.1.0.tar.gz) = 265233
+SHA256 (jupyter_client-5.2.3.tar.gz) = J7788ERrAeKYUwFNapAt0QGtfX+U4iUrGtyhfDRmt2E=
+SIZE (jupyter_client-5.2.3.tar.gz) = 271787
Index: devel/py-jupyter_client/patches/patch-jupyter_client_connect_py
===================================================================
RCS file: devel/py-jupyter_client/patches/patch-jupyter_client_connect_py
diff -N devel/py-jupyter_client/patches/patch-jupyter_client_connect_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ devel/py-jupyter_client/patches/patch-jupyter_client_connect_py 10 Dec 2018 18:17:46 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Index: jupyter_client/connect.py
+--- jupyter_client/connect.py.orig
++++ jupyter_client/connect.py
+@@ -18,6 +18,7 @@ import socket
+ import stat
+ import tempfile
+ import warnings
++import sys
+ from getpass import getpass
+
+ import zmq
+@@ -137,7 +138,7 @@ def write_connection_file(fname=None, shell_port=0, io
+ with open(fname, 'w') as f:
+ f.write(json.dumps(cfg, indent=2))
+
+- if hasattr(stat, 'S_ISVTX'):
++ if hasattr(stat, 'S_ISVTX') and not sys.platform.startswith('openbsd'):
+ # set the sticky bit on the file and its parent directory
+ # to avoid periodic cleanup
+ paths = [fname]
Index: devel/py-jupyter_client/patches/patch-setup_py
===================================================================
RCS file: devel/py-jupyter_client/patches/patch-setup_py
diff -N devel/py-jupyter_client/patches/patch-setup_py
--- devel/py-jupyter_client/patches/patch-setup_py 24 Jun 2017 09:52:46 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-setup_py,v 1.1 2017/06/24 09:52:46 shadchin Exp $
-
-Index: setup.py
---- setup.py.orig
-+++ setup.py
-@@ -70,8 +70,7 @@ setup_args = dict(
- ],
- )
-
--if 'develop' in sys.argv or any(a.startswith('bdist') for a in sys.argv):
-- import setuptools
-+import setuptools
-
- setuptools_args = {}
- install_requires = setuptools_args['install_requires'] = [
Index: devel/py-jupyter_client/pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/py-jupyter_client/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -u -r1.4 PLIST
--- devel/py-jupyter_client/pkg/PLIST 24 Jun 2017 09:52:46 -0000 1.4
+++ devel/py-jupyter_client/pkg/PLIST 10 Dec 2018 18:17:46 -0000
@@ -1,4 +1,5 @@
@comment $OpenBSD: PLIST,v 1.4 2017/06/24 09:52:46 shadchin Exp $
+bin/jupyter-kernel${MODPY_BIN_SUFFIX}
bin/jupyter-kernelspec${MODPY_BIN_SUFFIX}
bin/jupyter-run${MODPY_BIN_SUFFIX}
lib/python${MODPY_VERSION}/site-packages/jupyter_client/
@@ -21,6 +22,7 @@ lib/python${MODPY_VERSION}/site-packages
lib/python${MODPY_VERSION}/site-packages/jupyter_client/${MODPY_PYCACHE}connect.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/${MODPY_PYCACHE}consoleapp.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/${MODPY_PYCACHE}jsonutil.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_client/${MODPY_PYCACHE}kernelapp.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/${MODPY_PYCACHE}kernelspec.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/${MODPY_PYCACHE}kernelspecapp.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/${MODPY_PYCACHE}launcher.${MODPY_PYC_MAGIC_TAG}pyc
@@ -58,6 +60,7 @@ lib/python${MODPY_VERSION}/site-packages
lib/python${MODPY_VERSION}/site-packages/jupyter_client/ioloop/manager.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/ioloop/restarter.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/jsonutil.py
+lib/python${MODPY_VERSION}/site-packages/jupyter_client/kernelapp.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/kernelspec.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/kernelspecapp.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/launcher.py
@@ -77,6 +80,7 @@ lib/python${MODPY_VERSION}/site-packages
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/${MODPY_PYCACHE}test_client.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/${MODPY_PYCACHE}test_connect.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/${MODPY_PYCACHE}test_jsonutil.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/${MODPY_PYCACHE}test_kernelapp.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/${MODPY_PYCACHE}test_kernelmanager.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/${MODPY_PYCACHE}test_kernelspec.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/${MODPY_PYCACHE}test_localinterfaces.${MODPY_PYC_MAGIC_TAG}pyc
@@ -89,6 +93,7 @@ lib/python${MODPY_VERSION}/site-packages
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/test_client.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/test_connect.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/test_jsonutil.py
+lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/test_kernelapp.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/test_kernelmanager.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/test_kernelspec.py
lib/python${MODPY_VERSION}/site-packages/jupyter_client/tests/test_localinterfaces.py
Hi Björn,
First, thanks for testing, good luck that you found that small but
important case.
On my thoughts about the issue, I'm attaching two diff, one with
py-jupyter_core and one with py-jupyter_client, the later with a patch
to disable the use of the sticky bit.
The code actually checks if:
"if hasattr(stat, 'S_ISVTX')", so I have to assume that the logical
step would be to extend the "if" to cover our case: We have the sticky
bit, but we can not use it (leaving root aside), so:
"if hasattr(stat, 'S_ISVTX') and not sys.platform.startswith('openbsd'):"
The warning is no more on my side, and test are passing, would you
care to test the patch ?
By the way, just out of curiosity, you use jupyter for something in
particular? I'm only updating it to cover the requires to update
devel/spyder and it would be good to include you in future updates if
you are interested in testing the changes.
Thanks.
Elias.
On Sun, Dec 9, 2018 at 3:42 AM Björn Ketelaars
<bjorn.ketelaars@hydroxide.nl> wrote:
>
> On Sat 08/12/2018 17:38, Elias M. Mariani wrote:
> > py-jupyter_core 4.3.0 to 4.4.0:
> > Changelog:
> > https://github.com/jupyter/jupyter_core/blob/4.4.0/docs/changelog.rst
> >
> > - Taking maintainership. (already talked to Alexandr)
> > - HOMEPAGE to HTTPS.
> > - A little love to the patches to keep working.
> > - Regression test:
> >
> > devel/py-jupyter_core and devel/py-jupyter_core,python3:
> > 40 passed
> > Same results for 4.3.0 and 4.4.0.
> >
> > ++++++++++++++++++++
> > py-jupyter_client 5.1.0 to 5.2.3:
> > Changelog:
> > https://github.com/jupyter/jupyter_client/blob/5.2.3/docs/changelog.rst
> >
> > ....
>
> For what it is worth, I prefer to look at two separate diffs instead of
> one. Helps me giving feedback. That said:
>
> Both updates look good, and test ok in an existing jupyter-notebook
> setup. However, jupyter_client gives a warning when opening a workbook:
>
> [I 06:41:46.032 NotebookApp] Kernel started: 1a170f9c-4d7a-4646-abac-fff4961889d6
> /usr/local/lib/python3.6/site-packages/jupyter_client/connect.py:163: RuntimeWarning: Failed to set sticky bit on '/home/bket/.local/share/jupyter/runtime/kernel-1a170f9c-4d7a-4646-abac-fff4961889d6.json': [Errno 79] Inappropriate file type or format: '/home/bket/.local/share/jupyter/runtime/kernel-1a170f9c-4d7a-4646-abac-fff4961889d6.json'
> Probably not a big deal, but runtime files may be cleaned up periodically.
> RuntimeWarning,
>
> The warning is caused by [1], which tries to set the sticky bit on a
> file. On OpenBSD the latter is only allowed by the superuser, see
> sticky(8).
> Easy fix would be for an user to just ignore the warning. However, I
> think the behaviour of jupyter_client is wrong, and should be patched.
> What do you think?
>
> [1] https://github.com/jupyter/jupyter_client/blob/master/jupyter_client/connect.py#L152
No comments:
Post a Comment