From 690e58e11de69953a1e76d0b9cc5f8caee63badd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 2 Aug 2023 09:29:26 -0700 Subject: [PATCH] python310Packages.notebook: 6.5.2 -> 7.0.1 Changelog: https://github.com/jupyter/notebook/blob/v7.0.1/CHANGELOG.md --- .../python-modules/notebook/default.nix | 103 ++++++------------ 1 file changed, 36 insertions(+), 67 deletions(-) diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index 9cd1e9c37a1e..628742c72f30 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -3,97 +3,66 @@ , buildPythonPackage , pythonOlder , fetchPypi -, argon2-cffi -, glibcLocales -, mock -, jinja2 +, hatch-jupyter-builder +, hatchling +, jupyter-server +, jupyterlab +, jupyterlab_server +, notebook-shim , tornado -, ipython_genutils -, traitlets -, jupyter-core -, jupyter-client -, nbformat -, nbclassic -, nbconvert -, ipykernel -, terminado -, requests -, send2trash -, pexpect -, prometheus-client +, pytest-jupyter , pytestCheckHook }: buildPythonPackage rec { pname = "notebook"; - version = "6.5.2"; - disabled = pythonOlder "3.7"; + version = "7.0.1"; + disabled = pythonOlder "3.8"; + + format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-wYl+UxfiJfx4tFVJpqtLZo5MmW/QOgTpOP5eevK//9A="; + hash = "sha256-LhatTmPqiffvviEu58FpP8+lq1X/73UEdTD3SvS9kmw="; }; - LC_ALL = "en_US.utf8"; - - nativeCheckInputs = [ pytestCheckHook glibcLocales ]; - - propagatedBuildInputs = [ - jinja2 - tornado - ipython_genutils - traitlets - jupyter-core - send2trash - jupyter-client - nbformat - nbclassic - nbconvert - ipykernel - terminado - requests - pexpect - prometheus-client - argon2-cffi - ]; - postPatch = '' - # Remove selenium tests - rm -rf notebook/tests/selenium - export HOME=$TMPDIR + substituteInPlace pyproject.toml \ + --replace "timeout = 300" "" ''; - disabledTests = [ - # a "system_config" is generated, and fails many tests - "config" - "load_ordered" - # requires jupyter, but will cause circular imports - "test_run" - "TestInstallServerExtension" - "launch_socket" - "sock_server" - "test_list_formats" # tries to find python MIME type - "KernelCullingTest" # has a race condition failing on slower hardware - "test_connections" # tornado.simple_httpclient.HTTPTimeoutError: Timeout during request" - ] ++ lib.optionals stdenv.isDarwin [ - "test_delete" - "test_checkpoints_follow_file" + nativeBuildInputs = [ + hatch-jupyter-builder + hatchling + jupyterlab ]; - disabledTestPaths = lib.optionals stdenv.isDarwin [ - # requires local networking - "notebook/auth/tests/test_login.py" - "notebook/bundler/tests/test_bundler_api.py" + propagatedBuildInputs = [ + jupyter-server + jupyterlab + jupyterlab_server + notebook-shim + tornado ]; + nativeCheckInputs = [ + pytest-jupyter + pytestCheckHook + ]; + + env = { + JUPYTER_PLATFORM_DIRS = 1; + }; + # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true; meta = { - description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing"; + changelog = "https://github.com/jupyter/notebook/blob/v${version}/CHANGELOG.md"; + description = "Web-based notebook environment for interactive computing"; homepage = "https://github.com/jupyter/notebook"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ fridh ]; + maintainers = lib.teams.jupyter.members; mainProgram = "jupyter-notebook"; }; }