diff --git a/notebook-6.5.4.tar.gz b/notebook-6.5.4.tar.gz deleted file mode 100644 index 4aa4c1f..0000000 --- a/notebook-6.5.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:517209568bd47261e2def27a140e97d49070602eea0d226a696f42a7f16c9a4e -size 5785832 diff --git a/notebook-7.0.2.tar.gz b/notebook-7.0.2.tar.gz new file mode 100644 index 0000000..a2159e7 --- /dev/null +++ b/notebook-7.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d70d6a07418c829bd5f54337ce993b7105261d9026f9d3fe68e9b8aa1a20da9a +size 3927445 diff --git a/notebook-issue7014-fixtests.patch b/notebook-issue7014-fixtests.patch new file mode 100644 index 0000000..c648e81 --- /dev/null +++ b/notebook-issue7014-fixtests.patch @@ -0,0 +1,24 @@ +diff -ur notebook-7.0.2.orig/tests/conftest.py notebook-7.0.2/tests/conftest.py +--- notebook-7.0.2.orig/tests/conftest.py 2023-08-19 12:08:45.146379687 +0200 ++++ notebook-7.0.2/tests/conftest.py 2023-08-19 12:10:22.285942278 +0200 +@@ -5,10 +5,7 @@ + import pathlib + import shutil + +-try: +- from importlib.resources import files +-except ImportError: +- from importlib_resources import files # type:ignore ++from importlib_resources import files # type:ignore + + import pytest + +@@ -91,7 +88,7 @@ + ) + + # Copy the schema files. +- test_data = str(files("jupyterlab_server.test_data").joinpath("")) ++ test_data = str(files("jupyterlab_server.test_data")._paths[0]) + src = pathlib.PurePath(test_data, "schemas", "@jupyterlab") + dst = pathlib.PurePath(str(schemas_dir), "@jupyterlab") + if os.path.exists(dst): diff --git a/python-notebook-rpmlintrc b/python-notebook-rpmlintrc index afb57ce..a4008d0 100644 --- a/python-notebook-rpmlintrc +++ b/python-notebook-rpmlintrc @@ -1,4 +1,2 @@ -addFilter("zero-length .*/notebook/bundler/tests/resources/subdir/subsubdir/.gitkeep") -addFilter("hidden-file-or-dir .*/notebook/bundler/tests/resources/subdir/subsubdir/.gitkeep") # jupyter-notebook requires python3-notebook which provides one of the alternatives addFilter("desktopfile-without-binary .*jupyter-notebook") \ No newline at end of file diff --git a/python-notebook.changes b/python-notebook.changes index 231137f..393038d 100644 --- a/python-notebook.changes +++ b/python-notebook.changes @@ -1,3 +1,35 @@ +------------------------------------------------------------------- +Sat Aug 19 08:39:15 UTC 2023 - Ben Greiner + +- Update to 7.0.2 + * Update to JupyterLab 4.0.4 packages #6998 (@jtpio) + * Improve about dialog #6996 (@yjrab) + * Added documentation link in Help menu #6993 (@Mikil03) +- Release 7.0.1 + * Update accessibly compliance section in the docs #6982 + (@andrii-i) + * Update the browser tab favicon on kernel busy #6980 (@jtpio) +- Release 7.0.0 + ## New features + * https://jupyter-notebook.readthedocs.io/en/latest/notebook_7_features.h + * Debugger + * Real Time collaboration + * Table of Contents + * Theming and Dark Mode + * Internationalization + * Accessibility Improvements + * Support for many JupyterLab extensions + * A document-centric user experience + * Compact View on Mobile Devices + ## Migrating to Notebook 7 + * https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html + * If you need to maintain compatibility with the Classic Notebook + for extensions or other customizations that are critical to + your workflows, you can switch to nbclassic, which will provide + compatibility with the old notebook interface and support + during an intermediate transition period to Notebook 7 +- Add notebook-issue7014-fixtests.patch gh#jupyter/notebook#7014 + ------------------------------------------------------------------- Mon Aug 7 12:00:44 UTC 2023 - Jiri Srain diff --git a/python-notebook.spec b/python-notebook.spec index b32fabf..bcf5cc8 100644 --- a/python-notebook.spec +++ b/python-notebook.spec @@ -34,7 +34,7 @@ BuildArch: noarch %bcond_with libalternatives %endif Name: python-notebook%{psuffix} -Version: 6.5.4 +Version: 7.0.2 Release: 0 Summary: Jupyter Notebook interface License: BSD-3-Clause @@ -42,35 +42,25 @@ Group: Development/Languages/Python URL: https://github.com/jupyter/notebook Source0: https://files.pythonhosted.org/packages/source/n/notebook/notebook-%{version}.tar.gz Source100: python-notebook-rpmlintrc +# PATCH-FIX-UPSTREAM notebook-issue7014-fixtests.patch gh#jupyter/notebook#7014 +Patch0: notebook-issue7014-fixtests.patch BuildRequires: %{python_module base >= 3.7} -BuildRequires: %{python_module jupyter-packaging >= 0.9} -BuildRequires: %{python_module nbclassic >= 0.4.0} +BuildRequires: %{python_module hatch-jupyter-builder >= 0.2} +BuildRequires: %{python_module hatchling >= 1.11} +BuildRequires: %{python_module jupyterlab} BuildRequires: %{python_module pip} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module wheel} BuildRequires: python-rpm-macros >= 20210929 Requires: jupyter-notebook = %{version} -Requires: python-Jinja2 -Requires: python-Send2Trash -Requires: python-argon2-cffi -Requires: python-ipykernel -Requires: python-ipython_genutils -# https://github.com/jupyter/notebook/issues/6748 -Requires: (python-jupyter-client >= 5.3.4 with python-jupyter-client < 8) -Requires: python-jupyter-core >= 4.6.1 -Requires: python-nbclassic >= 0.4.7 -Requires: python-nbconvert >= 5 -Requires: python-nbformat -Requires: python-nest-asyncio >= 1.5 -Requires: python-prometheus_client -Requires: python-pyzmq >= 17 -Requires: python-terminado >= 0.8.3 -Requires: python-tornado >= 6.1 -Requires: python-traitlets >= 4.2.1 -Recommends: python-ipywidgets -Suggests: %{name}-latex -Provides: python-jupyter_notebook = %{version} -Obsoletes: python-jupyter_notebook < %{version} +Requires: python-tornado >= 6.2 +Requires: (python-jupyter-server >= 2.4 with python-jupyter-server < 3) +Requires: (python-jupyterlab >= 4.0.2 with python-jupyterlab < 5) +Requires: (python-jupyterlab-server >= 2.22.1 with python-jupyterlab-server < 3) +Requires: (python-notebook-shim >= 0.2 with python-notebook-shim < 0.3) +%if 0%{?python_version_nodots} < 39 +Requires: python-importlib-resources >= 5 +%endif +Provides: python-jupyter_notebook = %{version}-%{release} +Obsoletes: python-jupyter_notebook < %{version}-%{release} %if !%{with test} BuildRequires: fdupes BuildRequires: hicolor-icon-theme @@ -85,18 +75,18 @@ Requires(postun):update-alternatives %endif %endif %if %{with test} +BuildRequires: %{python_module ipykernel} +# See Patch0 +BuildRequires: %{python_module importlib_resources >= 5} +BuildRequires: %{python_module jupyter-server-test >= 2.4.0 with %python-jupyter-server-test < 3} +BuildRequires: %{python_module jupyterlab-server-test >= 2.22.1 with %python-jupyterlab-server-test < 3} BuildRequires: %{python_module nbval} BuildRequires: %{python_module notebook = %{version}} -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module requests-unixsocket} +BuildRequires: %{python_module pytest >= 7.0} +BuildRequires: %{python_module pytest-console-scripts} +BuildRequires: %{python_module pytest-timeout} +BuildRequires: %{python_module pytest-tornasync} BuildRequires: %{python_module requests} -BuildRequires: %{python_module testpath} -%if 0%{?suse_version} != 1600 -%ifnarch %{ix86} -# pandoc package disabled build for ix86 -BuildRequires: pandoc -%endif -%endif %endif %python_subpackages @@ -106,30 +96,11 @@ interactive computing. This package provides the python interface. -%package lang -# FIXME: consider using %%lang_package macro -Summary: Translations for the Jupyter Notebook -Group: System/Localization -Requires: python-notebook = %{version} -Requires: %{plainpython}(abi) = %{python_version} -Provides: python-jupyter_notebook-lang = %{version} -Provides: python-notebook-lang-all = %{version} -Obsoletes: python-jupyter_notebook-lang < %{version} - -%description lang -Provides translations for the Jupyter notebook. - -This package provides the Python module translations. - %package -n jupyter-notebook Summary: Jupyter Notebook interface Group: Development/Languages/Python -Requires: jupyter-ipykernel -Requires: jupyter-jupyter-client >= 5.3.4 -Requires: jupyter-jupyter-core >= 4.6.1 -Requires: jupyter-nbconvert -Requires: jupyter-notebook-filesystem -Requires: python3-notebook = %{version} +Requires: python3dist(notebook) = %{version} +Suggests: python3-notebook = %{version} Conflicts: python3-jupyter_notebook < 5.7.8 Provides: jupyter-notebook-doc = %{version} Obsoletes: jupyter-notebook-doc < %{version} @@ -140,34 +111,6 @@ interactive computing. This package provides the jupyter components. -%package -n jupyter-notebook-lang -# FIXME: consider using %%lang_package macro -Summary: Translations for the Jupyter Notebook -Group: System/Localization -Requires: jupyter-notebook = %{version} -Requires: python3-notebook-lang = %{version} -Provides: jupyter-notebook-lang-all = %{version} - -%description -n jupyter-notebook-lang -Provides translations for the Jupyter notebook. - -This package provides the jupyter component translations. - -%package -n jupyter-notebook-latex -Summary: LaTeX support for the Jupyter Notebook -Group: Development/Languages/Python -Requires: jupyter-nbconvert-latex -Requires: jupyter-notebook = %{version} -Provides: %{python_module jupyter_notebook-latex = %{version}} -Provides: %{python_module notebook-latex = %{version}} -Obsoletes: %{python_module jupyter_notebook-latex < %{version}} - -%description -n jupyter-notebook-latex -The Jupyter HTML notebook is a web-based notebook environment for -interactive computing. - -This package pulls in the LaTeX dependencies for the Jupyter Notebook. - %prep %autosetup -p1 -n notebook-%{version} # We don't want to run selenium tests @@ -181,53 +124,17 @@ rm -rf notebook/tests/selenium %install %if !%{with test} %pyproject_install +rm %{buildroot}%{_jupyter_lab_dir}/schemas/@jupyter-notebook/*/package.json.orig +rm %{buildroot}%{_jupyter_labextensions_dir3}/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig %python_expand %fdupes %{buildroot}%{$python_sitelib} - -# Install icons -mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ -cp docs/resources/icon_512x512.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/JupyterNotebook.svg - -for x in 16 24 32 48 64 128 256 512 ; do - mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${x}x${x}/apps/ - cp docs/resources/ipynb.iconset/icon_${x}x${x}.png %{buildroot}%{_datadir}/icons/hicolor/${x}x${x}/apps/JupyterNotebook.png -done - -%{python_expand # the structure is not compatible with (python_)find_lang. Roll our own. -find %{buildroot}%{$python_sitelib}/notebook/i18n -type f -o -type l | grep -v '__init__' > lang-files -sed -E ' - s:%{buildroot}:: - s:(.*/notebook/i18n/)([^/_]+)(.*(mo|po|json)$):%lang(\2) \1\2\3: -' > %{$python_prefix}-notebook.lang < lang-files -sed -E ' - s:%{buildroot}:: - s:(.*/notebook/i18n/)([^/_]+)(.*(mo|po|json)$):%exclude \1\2\3: -' > %{$python_prefix}-notebook.lang-exclude < lang-files -find %{buildroot}%{$python_sitelib}/notebook/i18n -type d -mindepth 1 | grep -v '__pycache__' > lang-dirs -sed -E ' - s:%{buildroot}:: - s:(.*):%dir \1: -' >> %{$python_prefix}-notebook.lang < lang-dirs -sed -E ' - s:%{buildroot}:: - s:(.*):%exclude %dir \1: -' >> %{$python_prefix}-notebook.lang-exclude < lang-dirs -} - -%python_clone -a %{buildroot}%{_bindir}/jupyter-bundlerextension -%python_clone -a %{buildroot}%{_bindir}/jupyter-nbextension %python_clone -a %{buildroot}%{_bindir}/jupyter-notebook -%python_clone -a %{buildroot}%{_bindir}/jupyter-serverextension -# https://github.com/jupyter/notebook/issues/6501, use the same grouping as nbclassic -%python_group_libalternatives jupyter-notebook jupyter-bundlerextension jupyter-nbextension jupyter-serverextension +%python_group_libalternatives jupyter-notebook %suse_update_desktop_file jupyter-notebook - %endif %if %{with test} %check export LANG=en_US.UTF-8 -# required when testing with jupyter_core 4.9.1 -export PYTHONNOUSERSITE=1 # test_launch_socket_collision: fails because there are still servers listening pythonall_donttest="test_launch_socket_collision" %{python_expand # these tests call the wrong interpreter somewhere deep in the stack @@ -244,35 +151,26 @@ fi %python_libalternatives_reset_alternative jupyter-notebook %post -%python_install_alternative jupyter-notebook jupyter-bundlerextension jupyter-nbextension jupyter-serverextension +%python_install_alternative jupyter-notebook %postun %python_uninstall_alternative jupyter-notebook -%files %{python_files} -f %{python_prefix}-notebook.lang-exclude +%files %{python_files} %doc README.md %license LICENSE +%python_alternative %{_bindir}/jupyter-notebook %{python_sitelib}/notebook-%{version}.dist-info %{python_sitelib}/notebook/ -%python_alternative %{_bindir}/jupyter-bundlerextension -%python_alternative %{_bindir}/jupyter-nbextension -%python_alternative %{_bindir}/jupyter-notebook -%python_alternative %{_bindir}/jupyter-serverextension - -%files %{python_files lang} -f %{python_prefix}-notebook.lang -%license LICENSE %files -n jupyter-notebook %license LICENSE -%{_datadir}/icons/hicolor/*/apps/JupyterNotebook.* -%{_datadir}/icons/hicolor/*/apps/notebook.svg +%{_datadir}/icons/hicolor/scalable/apps/notebook.svg %{_datadir}/applications/jupyter-notebook.desktop - -%files -n jupyter-notebook-lang -%license LICENSE - -%files -n jupyter-notebook-latex -%license LICENSE +%dir %{_jupyter_lab_dir}/schemas +%{_jupyter_lab_dir}/schemas/@jupyter-notebook +%{_jupyter_labextensions_dir3}/@jupyter-notebook +%{_jupyter_config} %{_jupyter_server_confdir}/notebook.json %endif %changelog