From 2949743f202e96050595eb7d445836780b0150c6c962ab1b9c16730862f423f5 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Sat, 20 Dec 2025 17:35:23 +0000 Subject: [PATCH] - Update to 0.10.3 * Drop Python 3.9, test 3.14 and pypy-3.11 #337 (@davidbrochart) * correct execution count in test for ipython 9.8 and above #335 (@drorspei, @davidbrochart) * Update contribution with pytest instructions, remove tox. #331 (@dgrahn, @davidbrochart) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbclient?expand=0&rev=76 --- .gitattributes | 24 +++ .gitignore | 4 + _multibuild | 3 + nbclient-0.10.3.tar.gz | 3 + python-nbclient.changes | 391 ++++++++++++++++++++++++++++++++++++++++ python-nbclient.spec | 123 +++++++++++++ 6 files changed, 548 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 nbclient-0.10.3.tar.gz create mode 100644 python-nbclient.changes create mode 100644 python-nbclient.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..ec2fdbb --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + \ No newline at end of file diff --git a/nbclient-0.10.3.tar.gz b/nbclient-0.10.3.tar.gz new file mode 100644 index 0000000..e081302 --- /dev/null +++ b/nbclient-0.10.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0baf171ee246e3bb2391da0635e719f27dc77d99aef59e0b04dcb935ee04c575 +size 62564 diff --git a/python-nbclient.changes b/python-nbclient.changes new file mode 100644 index 0000000..7bde238 --- /dev/null +++ b/python-nbclient.changes @@ -0,0 +1,391 @@ +------------------------------------------------------------------- +Sat Dec 20 17:30:30 UTC 2025 - Ben Greiner + +- Update to 0.10.3 + * Drop Python 3.9, test 3.14 and pypy-3.11 #337 (@davidbrochart) + * correct execution count in test for ipython 9.8 and above #335 + (@drorspei, @davidbrochart) + * Update contribution with pytest instructions, remove tox. #331 + (@dgrahn, @davidbrochart) + +------------------------------------------------------------------- +Sat Dec 13 14:37:39 UTC 2025 - Dirk Müller + +- update to 0.10.2: + * Drop Python 3.8, test PyPy 3.10 #323 (@davidbrochart) + * Gracefully handle explicit transient=None #322 +- update to 0.10.1: + * Run docs on ubuntu #314 (@blink1073) + * avoid deprecation warning for py313 #320 (@lucascolley) +- drop nbclient-pr315-date-deprecation.patch, + nbclient-pr317-py313tests.patch: (upstream) + +------------------------------------------------------------------- +Thu Feb 27 12:54:52 UTC 2025 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Thu Nov 21 22:28:41 UTC 2024 - Matej Cepl + +- Remove color from logs. + +------------------------------------------------------------------- +Thu Nov 21 18:57:39 UTC 2024 - Ben Greiner + +- Add nbclient-pr315-date-deprecation.patch + * Avoids DeprecationWarning when importing + * gh#jupyter/nbclient#315 gh#jupyter/nbclient#318 +- Add nbclient-pr317-py313tests.patch gh#jupyter/nbclient#317 + * make tests more lenient + +------------------------------------------------------------------- +Wed Jun 26 01:36:57 UTC 2024 - Steve Kowalik + +- Remove upper bound on pytest. + +------------------------------------------------------------------- +Fri Mar 29 18:45:22 UTC 2024 - Ben Greiner + +- Update to 0.10.0 + * Optionally write out executed notebook in jupyter-execute #307 + (@wpk-nist-gov) + +------------------------------------------------------------------- +Thu Mar 7 13:40:12 UTC 2024 - Ben Greiner + +- Skip testing with python39: no longer supported since ipython 8.19 + +------------------------------------------------------------------- +Sun Nov 26 16:23:50 UTC 2023 - Ben Greiner + +- Update to 0.9.0 + * Maintenance and upkeep improvements + +------------------------------------------------------------------- +Sun Jun 11 19:57:08 UTC 2023 - Ben Greiner + +- Update to 0.8.0 + * Bump min version support #287 (@blink1073) + +------------------------------------------------------------------- +Mon May 1 17:50:53 UTC 2023 - Ben Greiner + +- Update to 0.7.4 + * include stream output in CellExecutionError #282 (@minrk) + * avoid duplicate 'Exception: message' in CellExecutionError #283 + (@minrk) + * Send KeyboardInterrupt a little later in + test_run_all_notebooks[Interrupt.ipynb-opts6] #285 (@kxxt) + +------------------------------------------------------------------- +Sun Apr 23 17:56:28 UTC 2023 - Ben Greiner + +- Update to 0.7.3 + * Add coalesce_streams #279 (@davidbrochart) + +------------------------------------------------------------------- +Sun Jan 8 09:32:12 UTC 2023 - Ben Greiner + +- Update to 0.7.2 + * Allow space after In #264 (@davidbrochart) + * Fix jupyter_core pinning #263 (@davidbrochart) + * Update README, add Python 3.11 #260 (@davidbrochart) +- Release 0.7.1 + * Remove nest-asyncio #259 (@davidbrochart) +- Use PEP517 hatchling build + +------------------------------------------------------------------- +Sun Oct 9 17:10:22 UTC 2022 - Arun Persaud + +- update to version 0.7.0: + * Maintenance and upkeep improvements + + Cleanup CI #254 (@blink1073) + + Handle client 8 support #253 (@blink1073) + +------------------------------------------------------------------- +Fri Sep 9 16:47:56 UTC 2022 - Arun Persaud + +- update to version 0.6.8: + * Merged PRs + + Fix tests compatibility with IPython 8.5.0 #251 (@frenzymadness) + +------------------------------------------------------------------- +Sun Aug 28 20:59:32 UTC 2022 - Ben Greiner + +- Update to 0.6.7 + * Fix tests for ipywidgets 8 #246 (@frenzymadness) + +------------------------------------------------------------------- +Sat Jul 9 13:26:33 UTC 2022 - Arun Persaud + +- update to version 0.6.6: + * Merged PRs + + Start new client if needed in blocking setup_kernel #241 + (@davidbrochart) + +- changes from version 0.6.5: + * Merged PRs + + Start new client if needed #239 (@davidbrochart) + +------------------------------------------------------------------- +Sun Jun 5 16:49:53 UTC 2022 - Ben Greiner + +- Fix test requirements + +------------------------------------------------------------------- +Sat Jun 4 23:14:53 UTC 2022 - Arun Persaud + +- specfile: + * update requirements + +- update to version 0.6.4: + * Merged PRs + + Make sure kernel is cleaned up in case an error occurred while + starting kernel client #234 (@CiprianAnton) + + Suppress most warnings in tests #232 (@davidbrochart) + +- changes from version 0.6.3: + * Bugs fixed + + Clean up docs and typings #230 (@blink1073) + * Documentation improvements + + Clean up docs and typings #230 (@blink1073) + +- changes from version 0.6.2: + * Merged PRs + + Fix documentation generation #228 (@davidbrochart) + +- changes from version 0.6.1: + * Merged PRs + + [pre-commit.ci] pre-commit autoupdate #225 (@pre-commit-ci) + + Add error_on_interrupt trait #224 (@davidbrochart) + + Fix typo #223 (@davidbrochart) + + Add on_cell_executed hook #222 (@davidbrochart) + +- changes from version 0.6.0: + * Maintenance and upkeep improvements + + Fix typings and update mypy settings #220 (@blink1073) + + Add missing dep on testpath #219 (@blink1073) + + Add more pre-commit hooks and update flake8 #218 (@blink1073) + * Documentation improvements + + Clean up docs handling #216 (@blink1073) + +------------------------------------------------------------------- +Sat Mar 12 04:52:28 UTC 2022 - Arun Persaud + +- update to version 0.5.13: + * Drop ipython_genutils #209 (@davidbrochart) + +------------------------------------------------------------------- +Wed Mar 9 16:47:55 UTC 2022 - Arun Persaud + +* specfile: + * update version requirement for traitlets + +- update to version 0.5.12: + * Merged PRs + + Require traitlets>=5.0.0 #204 (@davidbrochart) + + Extend the ignored part of IPython outputs #202 (@frenzymadness) + +------------------------------------------------------------------- +Mon Feb 28 10:17:42 UTC 2022 - Ben Greiner + +- Skip more failing tests due to new Exception message format + +------------------------------------------------------------------- +Thu Feb 17 16:33:39 UTC 2022 - Arun Persaud + +- update to version 0.5.11: + * Merged PRs + + Pin ipython<8 in tests #198 (@davidbrochart) + + Clear execution metadata, prefer msg header date when recording + times #195 (@kevin-bates) + + Client hooks #188 (@devintang3) + +------------------------------------------------------------------- +Mon Jan 17 19:50:25 UTC 2022 - Ben Greiner + +- Skip a flaky test gh#jupyter/nbclient#189 + +------------------------------------------------------------------- +Sat Jan 15 19:17:53 UTC 2022 - Ben Greiner + +- Update to 0.5.10 + * Fix ipywidgets version in tests #192 (@martinRenou) + * Compatibility with IPython 8 where tracebacks are different + #190 (@frenzymadness) + * Drop tox #187 (@davidbrochart) + * Drop python3.6, test python3.10 #184 (@davidbrochart) + * Fix typos #182 (@kianmeng) +- Cleanup now unused specfile code for Python 3.6 distributions + +------------------------------------------------------------------- +Sat Jan 8 20:19:58 UTC 2022 - Ben Greiner + +- Do not build on SLE/Leap <= 15.3 + +------------------------------------------------------------------- +Sun Nov 21 17:25:17 UTC 2021 - Ben Greiner + +- Deselect all 4 flaky parallel_notebooks tests + +------------------------------------------------------------------- +Fri Nov 19 09:52:05 UTC 2021 - Ben Greiner + +- Update to version 0.5.9 + * Remove jupyter-run, keep jupyter-execute #180 (@davidbrochart) +- Switch to libalternatives + +------------------------------------------------------------------- +Sun Nov 14 13:28:35 UTC 2021 - Ben Greiner + +- Update to version 0.5.8 + * Prepare for use with Jupyter Releaser #175 (@davidbrochart) + * Move IPYKERNEL_CELL_NAME from tox to pytest #172 + (@frenzymadness) + * Added CLI to README #170 (@palewire) + * Add "jupyter execute" command-line interface #165 (@palewire) + * Fix: updating buffers overwrote previous buffers #169 + (@maartenbreddels) + * Fix tests for ipykernel without debugpy #166 (@frenzymadness) + * gitignore Pipfile #164 (@palewire) + * Fixed CONTRIBUTING.md link #163 (@palewire) + * Fix typo #162 (@The-Compiler) + * Move format & lint to pre-commit #161 (@chrisjsewell) + * Add skip-execution cell tag functionality #151 (@chrisjsewell) +- Not enabling new jupyter-run entrypoint due to conflict with + jupyter_client + +------------------------------------------------------------------- +Wed Sep 22 19:04:07 UTC 2021 - Ben Greiner + +- Fix async_parallel_notebooks deselection expression + +------------------------------------------------------------------- +Sun Sep 19 11:10:00 UTC 2021 - Ben Greiner + +- Add IPYKERNEL_CELL_NAME env var for test sanitization +- Only require async_generator for Python < 3.7 + +------------------------------------------------------------------- +Wed Sep 15 05:46:38 UTC 2021 - Arun Persaud + +- update to version 0.5.4: + * Replace km.cleanup with km.cleanup_resources #152 (@davidbrochart) + * Use async generator backport only on old python #154 (@mkoeppe) + * Support parsing of IPython dev version #150 (@cphyc) + * Set IPYKERNEL_CELL_NAME = #147 (@davidbrochart) + * Print useful error message on exception #142 (@certik) + +------------------------------------------------------------------- +Thu Apr 8 22:30:04 UTC 2021 - Ben Greiner + +- Actually break the cycle: test flavor needs a psuffix + +------------------------------------------------------------------- +Wed Mar 31 16:03:17 UTC 2021 - Ben Greiner + +- test in multibuild flavor in order to break runtime and build + dependency cycle with nbconvert. + +------------------------------------------------------------------- +Wed Mar 3 19:24:34 UTC 2021 - Arun Persaud + +- update to version 0.5.3: + * Fix ipykernel's stop_on_error value to take into account + raises-exception tag and force_raise_errors #137 + +------------------------------------------------------------------- +Sun Feb 14 18:08:05 UTC 2021 - Arun Persaud + +- specfile: + * update copyright year + +- update to version 0.5.2: + * Set minimum python version supported to 3.6.1 to avoid 3.6.0 + issues + * CellExecutionError is now unpickleable + * Added testing for python 3.9 + * Changed travis tests to github actions + * Documentation referencing an old model instead of NotebookClient + was fixed + * allow_error_names option was added for a more specific scope of + allow_errors to be applied + +------------------------------------------------------------------- +Thu Nov 26 17:49:54 UTC 2020 - Arun Persaud + +- update to version 0.5.1: + * Update kernel client class JIT if it's the synchronous version + * Several documentation fixes / improvements + +------------------------------------------------------------------- +Sat Sep 5 16:24:04 UTC 2020 - Arun Persaud + +- specfile: + * update required version + +- update to version 0.5.0: + * Move language_info retrieval before cell execution #102 + * HistoryManager setting for ipython kernels no longer applies twice + (fix for 5.0 trailets release) + * Improved error handling around language_info missing + (async_)start_new_kernel_client is now split into (async_)start_new_kernel and (async_)start_new_kernel_client + +------------------------------------------------------------------- +Tue Jul 14 15:32:36 UTC 2020 - Arun Persaud + +- update to version 0.4.1: + * Python type hinting added to most interfaces! #83 + * Several documentation fixes and improvements were made #86 + * An asynchronous heart beat check was added to correctly raise a + DeadKernelError when kernels die unexpectantly #90 + +------------------------------------------------------------------- +Tue Jun 30 13:37:24 UTC 2020 - Marketa Calabkova + +- Update to 0.4.0 + * Use KernelManager's graceful shutdown rather than KILLing kernels + * Mimic an Output widget at the frontend so that the Output widget behaves correctly + * Nested asyncio is automatic, and works with Tornado + * async_execute now has a reset_kc argument to control if the client is reset upon execution request + +------------------------------------------------------------------- +Tue Jun 9 08:49:18 UTC 2020 - Tomáš Chvátal + +- Update to 0.3.1: + * The (async_)start_new_kernel_client method now supports starting a new client when its kernel manager (self.km) is a MultiKernelManager. The method now returns the kernel id in addition to the kernel client. If the kernel manager was a KernelManager, the returned kernel id is None. #51 + * Added reset_kc option to reset_execution_trackers, so that the kernel client can be reset and a new one created in calls to (async_)execute #44 + * Check that a kernel manager exists before cleaning up the kernel #61 + * Force client class to be async when kernel manager is MultiKernelManager #55 + * Replace pip install with conda install in Binder #54 + +------------------------------------------------------------------- +Sun Apr 26 19:33:24 UTC 2020 - Arun Persaud + +- specfile: + * only build for python 3, add skip_python2 + * updated requirement versions, add async_generator + * be more specific in %files section + +- update to version 0.2.0: + * Major Changes + + Async support is now available on the client. Methods that + support async have an async_ prefix and can be awaited #10 #35 + #37 #38 + + Dropped support for Python 3.5 due to async compatability issues + #34 + + Notebook documents now include the new kernel timing fields #32 + * Fixes + + Memory and process leaks from nbclient should now be fixed #34 + + Notebook execution exceptions now include error information in + addition to the message #41 + * Docs + + Added binder examples / tests #7 + + Added changelog to docs #22 + + Doc typo fixes #27 #30 + +------------------------------------------------------------------- +Mon Feb 24 15:45:01 UTC 2020 - Todd R + +- initial version diff --git a/python-nbclient.spec b/python-nbclient.spec new file mode 100644 index 0000000..8884134 --- /dev/null +++ b/python-nbclient.spec @@ -0,0 +1,123 @@ +# +# spec file for package python-nbclient +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%define skip_python39 1 +%else +%define psuffix %{nil} +%bcond_with test +%endif +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + +%{?sle15_python_module_pythons} + +Name: python-nbclient%{psuffix} +Version: 0.10.3 +Release: 0 +Summary: A client library for executing notebooks +License: BSD-3-Clause +URL: https://github.com/jupyter/nbclient +Source: https://files.pythonhosted.org/packages/source/n/nbclient/nbclient-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module hatchling >= 1.10.0} +BuildRequires: %{python_module pip} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-jupyter-client >= 6.1.12 +Requires: python-nbformat >= 5.1.3 +Requires: python-traitlets >= 5.4 +Requires: ((python-jupyter-core >= 4.12 with python-jupyter-core < 5) or python-jupyter-core >= 5.1) +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif +%if %{with test} +BuildRequires: %{python_module flaky} +BuildRequires: %{python_module ipykernel >= 6.19.3} +BuildRequires: %{python_module ipython} +BuildRequires: %{python_module ipywidgets} +BuildRequires: %{python_module nbclient = %{version}} +BuildRequires: %{python_module nbconvert >= 7} +BuildRequires: %{python_module pytest >= 9.0.1} +BuildRequires: %{python_module pytest-asyncio >= 1.3.0} +BuildRequires: %{python_module testpath} +BuildRequires: %{python_module xmltodict} +%endif +%python_subpackages + +%description +A client library for executing notebooks. Formally nbconvert's +ExecutePreprocessor. + +NBClient is a tool for parameterizing andexecuting Jupyter Notebooks. + +%prep +%autosetup -p1 -n nbclient-%{version} +sed -i 's/, "--color=yes"//' pyproject.toml + +%if ! %{with test} +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/jupyter-execute +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%if %{with test} +%check +export IPYKERNEL_CELL_NAME="" +# tests on parallel notebooks randomly fail (4 tests) - https://github.com/jupyter/nbclient/pull/74#issuecomment-635929953 +donttest="parallel_notebooks" +# https://github.com/jupyter/nbclient/issues/189 +donttest+=" or (test_run_all_notebooks and (opts6 or opts8 or opts9))" +# extra -v for more verbose error diffs +%pytest -v -k "not ($donttest)" +%endif + +%if ! %{with test} +%pre +%python_libalternatives_reset_alternative jupyter-execute + +%post +%python_install_alternative jupyter-execute + +%postun +%python_uninstall_alternative jupyter-execute + +%files %{python_files} +%doc README.md +%license LICENSE +%python_alternative %{_bindir}/jupyter-execute +%{python_sitelib}/nbclient +%{python_sitelib}/nbclient-%{version}.dist-info/ +%endif + +%changelog