pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56437: Avoid annoying error message when starting jupyter notebook



>Number:         56437
>Category:       pkg
>Synopsis:       Avoid annoying error message when starting jupyter notebook
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 03 14:30:01 +0000 2021
>Originator:     Chavdar Ivanov
>Release:        Both -current as of 30-Sept-2021
>Organization:
CI4 Consulting Ltd
>Environment:
NetBSD ymir 9.99.89 NetBSD 9.99.89 (GENERIC) #26: Wed Sep 29 13:56:17 BST 2021  sysbuild@ymir:/home/sysbuild/amd64/obj/home/sysbuild/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When staring 'jupyter notebook' one gets a totally harmless but annoying message:
...
/usr/pkg/lib/python3.9/site-packages/jupyter_client/connect.py:159: RuntimeWarning: Failed to set sticky bit on '/home/xci/.local/share/jupyter/runtime/kernel-4cd7b5d2-c3b3-4d00-af18-905b16991462.json': [Errno 79] Inappropriate file type or format: '/home/xci/.local/share/jupyter/runtime/kernel-4cd7b5d2-c3b3-4d00-af18-905b16991462.json'
Probably not a big deal, but runtime files may be cleaned up periodically.
....

It is trying to set the sticky bit on a file; as far as I understand it, this no longer has any sense in any reasonably modern system. 

Surely I can claim for the most trivial patch ever submitted - which belongs to upstream anyway and - as pkgsrc version of jupyter_client is some 6-7 releases behind - maybe even fixed there...  
>How-To-Repeat:
Run 'jupyter notebook' and open the connection. 
>Fix:
$NetBSD$

        Avoid trying to set sticky bit on a file.


--- jupyter_client/connect.py.orig      2021-03-14 00:34:45.000000000 +0000
+++ jupyter_client/connect.py
@@ -139,7 +139,7 @@ def write_connection_file(fname=None, sh
     if hasattr(stat, 'S_ISVTX'):
         # set the sticky bit on the file and its parent directory
         # to avoid periodic cleanup
-        paths = [fname]
+        paths = []
         runtime_dir = os.path.dirname(fname)
         if runtime_dir:
             paths.append(runtime_dir)



Home | Main Index | Thread Index | Old Index