Merge pull request #198340 from dotlambda/jupyter_core-4.11.2

python310Packages.jupyter_core: 4.9.2 -> 4.11.2

authored by

Robert Scott and committed by
GitHub
fbec7428 c588a77c

+107 -95
+25 -23
pkgs/development/python-modules/jupyter_core/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 - , fetchPypi 4 - , isPy3k 5 - , fetchpatch 6 - , python 7 - , ipython 3 + , pythonOlder 4 + , fetchFromGitHub 5 + , hatchling 8 6 , traitlets 9 - , glibcLocales 10 - , mock 11 7 , pytestCheckHook 12 - , nose 13 8 }: 14 9 15 10 buildPythonPackage rec { 16 11 pname = "jupyter_core"; 17 - version = "4.9.2"; 18 - disabled = !isPy3k; 12 + version = "4.11.2"; 13 + disabled = pythonOlder "3.7"; 19 14 20 - src = fetchPypi { 21 - inherit pname version; 22 - sha256 = "sha256-1puuuf+xKLjNJlf88nA/icdp0Wc8hRgSEZ46Kg6TrZo="; 23 - }; 15 + format = "pyproject"; 24 16 25 - checkInputs = [ pytestCheckHook mock glibcLocales nose ]; 26 - propagatedBuildInputs = [ ipython traitlets ]; 17 + src = fetchFromGitHub { 18 + owner = "jupyter"; 19 + repo = "jupyter_core"; 20 + rev = version; 21 + hash = "sha256-lDhwvhsOxLHBC6CQjCW/rmtHSuMRPC2yaurBd5K3FLc="; 22 + }; 27 23 28 24 patches = [ 29 - # install jupyter_core/*.py files 30 - (fetchpatch { 31 - url = "https://github.com/jupyter/jupyter_core/pull/253/commits/3bbeaebec0a53520523162d5e8d5c6ca02b1b782.patch"; 32 - sha256 = "sha256-QeAfj7wLz4egVUPMAgrZ9Wn/Tv60LrIXLgHGVoH41wQ="; 33 - }) 34 25 ./tests_respect_pythonpath.patch 35 26 ]; 36 27 28 + nativeBuildInputs = [ 29 + hatchling 30 + ]; 31 + 32 + propagatedBuildInputs = [ 33 + traitlets 34 + ]; 35 + 36 + checkInputs = [ 37 + pytestCheckHook 38 + ]; 39 + 37 40 preCheck = '' 38 41 export HOME=$TMPDIR 39 - export LC_ALL=en_US.utf8 40 42 ''; 41 43 42 44 disabledTests = [ ··· 51 53 pythonImportsCheck = [ "jupyter_core" ]; 52 54 53 55 meta = with lib; { 54 - description = "Jupyter core package. A base package on which Jupyter projects rely"; 56 + description = "Base package on which Jupyter projects rely"; 55 57 homepage = "https://jupyter.org/"; 56 58 license = licenses.bsd3; 57 59 maintainers = with maintainers; [ fridh ];
+18 -16
pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch
··· 1 + diff --git a/jupyter_core/tests/test_command.py b/jupyter_core/tests/test_command.py 2 + index 4ef38cd..08fba22 100644 1 3 --- a/jupyter_core/tests/test_command.py 2 4 +++ b/jupyter_core/tests/test_command.py 3 - @@ -131,7 +131,7 @@ def test_not_on_path(tmpdir): 4 - witness_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")') 5 + @@ -174,7 +174,7 @@ def test_not_on_path(tmpdir): 6 + witness_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS ME")') 5 7 write_executable(witness, witness_src) 6 - 7 - - env = {'PATH': ''} 8 - + env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']} 9 - if 'SYSTEMROOT' in os.environ: # Windows http://bugs.python.org/issue20614 10 - env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT'] 11 - if sys.platform == 'win32': 12 - @@ -157,7 +157,7 @@ def test_path_priority(tmpdir): 13 - witness_b_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS B")') 8 + 9 + - env = {"PATH": ""} 10 + + env = {"PATH": "", "PYTHONPATH": os.environ["PYTHONPATH"]} 11 + if "SYSTEMROOT" in os.environ: # Windows http://bugs.python.org/issue20614 12 + env["SYSTEMROOT"] = os.environ["SYSTEMROOT"] 13 + if sys.platform == "win32": 14 + @@ -198,7 +198,7 @@ def test_path_priority(tmpdir): 15 + witness_b_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS B")') 14 16 write_executable(witness_b, witness_b_src) 15 - 16 - - env = {'PATH': str(b)} 17 - + env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']} 18 - if 'SYSTEMROOT' in os.environ: # Windows http://bugs.python.org/issue20614 19 - env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT'] 20 - if sys.platform == 'win32': 17 + 18 + - env = {"PATH": str(b)} 19 + + env = {"PATH": str(b), "PYTHONPATH": os.environ["PYTHONPATH"]} 20 + if "SYSTEMROOT" in os.environ: # Windows http://bugs.python.org/issue20614 21 + env["SYSTEMROOT"] = os.environ["SYSTEMROOT"] 22 + if sys.platform == "win32":
+8
pkgs/development/python-modules/jupytext/default.nix
··· 2 2 , stdenv 3 3 , buildPythonPackage 4 4 , fetchFromGitHub 5 + , fetchpatch 5 6 , GitPython 6 7 , isort 7 8 , jupyter-client ··· 30 31 rev = "refs/tags/v${version}"; 31 32 sha256 = "sha256-DDF4aTLkhEl4xViYh/E0/y6swcwZ9KbeS0qKm+HdFz8="; 32 33 }; 34 + 35 + patches = [ 36 + (fetchpatch { 37 + url = "https://github.com/mwouts/jupytext/commit/be9b65b03600227b737b5f10ea259a7cdb762b76.patch"; 38 + hash = "sha256-3klx8I+T560EVfsKe/FlrSjF6JzdKSCt6uhAW2cSwtc="; 39 + }) 40 + ]; 33 41 34 42 buildInputs = [ 35 43 jupyter-packaging
+2
pkgs/development/python-modules/mkdocs-jupyter/default.nix
··· 21 21 }; 22 22 23 23 postPatch = '' 24 + substituteInPlace setup.py \ 25 + --replace "nbconvert>=6.2.0,<7.0.0" "nbconvert>=6.2.0" 24 26 substituteInPlace mkdocs_jupyter/tests/test_base_usage.py \ 25 27 --replace "[\"mkdocs\"," "[\"${mkdocs.out}/bin/mkdocs\"," 26 28 '';
+36 -36
pkgs/development/python-modules/nbconvert/default.nix
··· 4 4 , defusedxml 5 5 , fetchPypi 6 6 , fetchpatch 7 + , fetchurl 8 + , hatchling 9 + , importlib-metadata 7 10 , ipywidgets 8 11 , jinja2 12 + , jupyter_core 9 13 , jupyterlab-pygments 10 14 , lib 11 15 , markupsafe 12 16 , mistune 13 17 , nbclient 18 + , packaging 14 19 , pandocfilters 20 + , pygments 15 21 , pyppeteer 16 22 , pytestCheckHook 23 + , pythonOlder 17 24 , tinycss2 25 + , traitlets 18 26 }: 19 27 20 - buildPythonPackage rec { 28 + let 29 + # see https://github.com/jupyter/nbconvert/issues/1896 30 + style-css = fetchurl { 31 + url = "https://cdn.jupyter.org/notebook/5.4.0/style/style.min.css"; 32 + hash = "sha256-WGWmCfRDewRkvBIc1We2GQdOVAoFFaO4LyIvdk61HgE="; 33 + }; 34 + in buildPythonPackage rec { 21 35 pname = "nbconvert"; 22 - version = "6.5.3"; 23 - format = "setuptools"; 36 + version = "7.2.3"; 37 + 38 + disabled = pythonOlder "3.7"; 39 + 40 + format = "pyproject"; 24 41 25 42 src = fetchPypi { 26 43 inherit pname version; 27 - hash = "sha256-EO1pPEz9PGNYPIfKXDovbth0FFEDWV84JO/Mjfy3Uiw="; 44 + hash = "sha256-eufMxoSVtWXasVNFnufmUDmXCRPrEVBw2m4sZzzw6fg="; 28 45 }; 29 46 30 47 # Add $out/share/jupyter to the list of paths that are used to search for 31 48 # various exporter templates 32 49 patches = [ 33 50 ./templates.patch 34 - 35 - # Use mistune 2.x 36 - (fetchpatch { 37 - name = "support-mistune-2.x.patch"; 38 - url = "https://github.com/jupyter/nbconvert/commit/e870d9a4a61432a65bee5466c5fa80c9ee28966e.patch"; 39 - hash = "sha256-kdOmE7BnkRy2lsNQ2OVrEXXZntJUPJ//b139kSsfKmI="; 40 - excludes = [ "pyproject.toml" ]; 41 - }) 42 - 43 - # patch nbconvert/filters/markdown_mistune.py 44 - (fetchpatch { 45 - name = "clean-up-markdown-parsing.patch"; 46 - url = "https://github.com/jupyter/nbconvert/commit/4df1f5451c9c3e8121036dfbc7e07f0095f4d524.patch"; 47 - hash = "sha256-O+VWUaQi8UMCpE9/h/IsrenmEuJ2ac/kBkUBq7GFJTY"; 48 - }) 49 - (fetchpatch { 50 - name = "fix-markdown-table.patch"; 51 - url = "https://github.com/jupyter/nbconvert/commit/d3900ed4527f024138dc3a8658c6a1b1dfc43c09.patch"; 52 - hash = "sha256-AFE1Zhw29JMLB0Sj17zHcOfy7VEFqLekO8NYbyMLrdI="; 53 - }) 54 51 ]; 55 52 56 53 postPatch = '' 57 54 substituteAllInPlace ./nbconvert/exporters/templateexporter.py 58 55 59 - # Use mistune 2.x 60 - substituteInPlace setup.py \ 61 - --replace "mistune>=0.8.1,<2" "mistune>=2.0.3,<3" 62 - 63 - # Equivalent of the upstream patch https://github.com/jupyter/nbconvert/commit/aec39288c9a6c614d659bcaf9f5cb36634d6b37b.patch 64 - substituteInPlace share/jupyter/nbconvert/templates/lab/base.html.j2 \ 65 - --replace "{{ output.data['image/svg+xml'] | clean_html }}" "{{ output.data['image/svg+xml'].encode(\"utf-8\") | clean_html }}" 56 + mkdir -p share/templates/classic/static 57 + cp ${style-css} share/templates/classic/static/style.css 66 58 ''; 67 59 60 + nativeBuildInputs = [ 61 + hatchling 62 + ]; 63 + 68 64 propagatedBuildInputs = [ 69 65 beautifulsoup4 70 66 bleach 71 67 defusedxml 72 68 jinja2 69 + jupyter_core 73 70 jupyterlab-pygments 74 71 markupsafe 75 72 mistune 76 73 nbclient 74 + packaging 77 75 pandocfilters 76 + pygments 78 77 tinycss2 78 + traitlets 79 + ] ++ lib.optionals (pythonOlder "3.10") [ 80 + importlib-metadata 79 81 ]; 80 82 81 83 preCheck = '' ··· 88 90 pytestCheckHook 89 91 ]; 90 92 91 - pytestFlagsArray = [ 92 - # DeprecationWarning: Support for bleach <5 will be removed in a future version of nbconvert 93 - "-W ignore::DeprecationWarning" 94 - ]; 95 - 96 93 disabledTests = [ 97 94 # Attempts network access (Failed to establish a new connection: [Errno -3] Temporary failure in name resolution) 98 95 "test_export" 99 96 "test_webpdf_with_chromium" 97 + # ModuleNotFoundError: No module named 'nbconvert.tests' 98 + "test_convert_full_qualified_name" 99 + "test_post_processor" 100 100 ]; 101 101 102 102 # Some of the tests use localhost networking.
+18 -20
pkgs/development/python-modules/nbformat/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 + , pythonOlder 3 4 , fetchPypi 5 + , hatchling 6 + , hatch-nodejs-version 4 7 , fastjsonschema 5 - , flit-core 6 - , pytestCheckHook 7 - , glibcLocales 8 - , ipython_genutils 9 - , traitlets 10 - , testpath 11 8 , jsonschema 12 9 , jupyter_core 10 + , traitlets 13 11 , pep440 12 + , pytestCheckHook 13 + , testpath 14 14 }: 15 15 16 16 buildPythonPackage rec { 17 17 pname = "nbformat"; 18 - version = "5.5.0"; 18 + version = "5.7.0"; 19 + 20 + disabled = pythonOlder "3.7"; 21 + 19 22 format = "pyproject"; 20 23 21 24 src = fetchPypi { 22 25 inherit pname version; 23 - sha256 = "sha256-nr4w5sOz5bR9Of8KOJehrPUj0r+vy04tBM23D4pmxQc="; 26 + sha256 = "1d4760c15c1a04269ef5caf375be8b98dd2f696e5eb9e603ec2bf091f9b0d3f3"; 24 27 }; 25 28 26 29 nativeBuildInputs = [ 27 - flit-core 30 + hatchling 31 + hatch-nodejs-version 28 32 ]; 29 - 30 - LC_ALL="en_US.utf8"; 31 33 32 34 propagatedBuildInputs = [ 33 35 fastjsonschema 34 - ipython_genutils 35 36 jsonschema 36 37 jupyter_core 38 + traitlets 39 + ]; 40 + 41 + checkInputs = [ 37 42 pep440 43 + pytestCheckHook 38 44 testpath 39 - traitlets 40 45 ]; 41 - 42 - checkInputs = [ pytestCheckHook glibcLocales ]; 43 - 44 - preCheck = '' 45 - mkdir tmp 46 - export HOME=tmp 47 - ''; 48 46 49 47 # Some of the tests use localhost networking. 50 48 __darwinAllowLocalNetworking = true;