commit 4385f3e0f035fffa6af2c0b36fe0c9b3bc5ab629 Author: tigro Date: Sat Jan 4 15:32:44 2025 +0300 import python-ipykernel-6.29.3-6.el10 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..551523b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/ipykernel-6.29.3.tar.gz diff --git a/.python-ipykernel.metadata b/.python-ipykernel.metadata new file mode 100644 index 0000000..2569e3e --- /dev/null +++ b/.python-ipykernel.metadata @@ -0,0 +1 @@ +2057087affbe4b533ba0b02972c72ea72cc73f51 SOURCES/ipykernel-6.29.3.tar.gz diff --git a/SOURCES/1248.patch b/SOURCES/1248.patch new file mode 100644 index 0000000..e33744e --- /dev/null +++ b/SOURCES/1248.patch @@ -0,0 +1,40 @@ +From 3e7fb7c787511212ccb642004b4331a59594a329 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Mon, 10 Jun 2024 16:11:33 +0200 +Subject: [PATCH] Avoid a DeprecationWarning on Python 3.13+ + + ... + /usr/lib/python3.13/site-packages/ipykernel/jsonutil.py:29: in + datetime.strptime("1", "%d") + /usr/lib64/python3.13/_strptime.py:573: in _strptime_datetime + tt, fraction, gmtoff_fraction = _strptime(data_string, format) + /usr/lib64/python3.13/_strptime.py:336: in _strptime + format_regex = _TimeRE_cache.compile(format) + /usr/lib64/python3.13/_strptime.py:282: in compile + return re_compile(self.pattern(format), IGNORECASE) + /usr/lib64/python3.13/_strptime.py:270: in pattern + warnings.warn("""\ + E DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious + E and fails to parse leap day. The default behavior will change in Python 3.15 + E to either always raise an exception or to use a different default year (TBD). + E To avoid trouble, add a specific year to the input & format. + E See https://github.com/python/cpython/issues/70647. + +See also https://github.com/jupyter/jupyter_client/issues/1020 +--- + ipykernel/jsonutil.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ipykernel/jsonutil.py b/ipykernel/jsonutil.py +index 6a463cf1..e45f06e5 100644 +--- a/ipykernel/jsonutil.py ++++ b/ipykernel/jsonutil.py +@@ -26,7 +26,7 @@ + + # holy crap, strptime is not threadsafe. + # Calling it once at import seems to help. +-datetime.strptime("1", "%d") ++datetime.strptime("2000-01-01", "%Y-%m-%d") + + # ----------------------------------------------------------------------------- + # Classes and functions diff --git a/SOURCES/a7d66a.patch b/SOURCES/a7d66a.patch new file mode 100644 index 0000000..3597cc7 --- /dev/null +++ b/SOURCES/a7d66a.patch @@ -0,0 +1,118 @@ +From a7d66ae2197e0d7471ba160542cf5ff7713084b5 Mon Sep 17 00:00:00 2001 +From: Steven Silvester +Date: Mon, 8 Apr 2024 07:32:26 -0500 +Subject: [PATCH] Add compat with pytest 8 (#1231) + +--- + pyproject.toml | 2 +- + tests/__init__.py | 9 +++++---- + tests/test_async.py | 7 +++---- + tests/test_eventloop.py | 7 +++---- + tests/test_message_spec.py | 3 ++- + 5 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 909308af9..cdf265f63 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -54,7 +54,7 @@ docs = [ + "trio" + ] + test = [ +- "pytest>=7.0", ++ "pytest>=7.0,<9", + "pytest-cov", + "flaky", + "ipyparallel", +diff --git a/tests/__init__.py b/tests/__init__.py +index 013114bd1..ee324a6fa 100644 +--- a/tests/__init__.py ++++ b/tests/__init__.py +@@ -7,6 +7,8 @@ + import tempfile + from unittest.mock import patch + ++import pytest ++ + from ipykernel.kernelspec import install + + pjoin = os.path.join +@@ -15,7 +17,8 @@ + patchers: list = [] + + +-def setup(): ++@pytest.fixture(autouse=True) ++def _global_setup(): + """setup temporary env for tests""" + global tmp + tmp = tempfile.mkdtemp() +@@ -34,9 +37,7 @@ def setup(): + + # install IPython in the temp home: + install(user=True) +- +- +-def teardown(): ++ yield + for p in patchers: + p.stop() + +diff --git a/tests/test_async.py b/tests/test_async.py +index 422673299..a40db4a00 100644 +--- a/tests/test_async.py ++++ b/tests/test_async.py +@@ -11,14 +11,13 @@ + KC = KM = None + + +-def setup_function(): ++@pytest.fixture(autouse=True) ++def _setup_env(): + """start the global kernel (if it isn't running) and return its client""" + global KM, KC + KM, KC = start_new_kernel() + flush_channels(KC) +- +- +-def teardown_function(): ++ yield + assert KC is not None + assert KM is not None + KC.stop_channels() +diff --git a/tests/test_eventloop.py b/tests/test_eventloop.py +index 34581b7fb..77596eedd 100644 +--- a/tests/test_eventloop.py ++++ b/tests/test_eventloop.py +@@ -42,14 +42,13 @@ def _get_qt_vers(): + _get_qt_vers() + + +-def setup(): ++@pytest.fixture(autouse=True) ++def _setup_env(): + """start the global kernel (if it isn't running) and return its client""" + global KM, KC + KM, KC = start_new_kernel() + flush_channels(KC) +- +- +-def teardown(): ++ yield + assert KM is not None + assert KC is not None + KC.stop_channels() +diff --git a/tests/test_message_spec.py b/tests/test_message_spec.py +index d9d8bb810..d98503ee7 100644 +--- a/tests/test_message_spec.py ++++ b/tests/test_message_spec.py +@@ -22,7 +22,8 @@ + KC: BlockingKernelClient = None # type:ignore + + +-def setup(): ++@pytest.fixture(autouse=True) ++def _setup_env(): + global KC + KC = start_global_kernel() + diff --git a/SPECS/python-ipykernel.spec b/SPECS/python-ipykernel.spec new file mode 100644 index 0000000..83adc13 --- /dev/null +++ b/SPECS/python-ipykernel.spec @@ -0,0 +1,343 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.7.2) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 6; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +%global modname ipykernel + +# When we bootstrap new Python, we need to avoid a build dependnecy loop +%bcond_without tests +%bcond_without doc + +Name: python-%{modname} +Version: 6.29.3 +Release: %autorelease +Summary: IPython Kernel for Jupyter +License: BSD-3-Clause +URL: https://github.com/ipython/%{modname} +Source0: https://github.com/ipython/%{modname}/releases/download/v%{version}/%{modname}-%{version}.tar.gz + +# Compatibility with pytest 8 +Patch: https://github.com/ipython/ipykernel/commit/a7d66a.patch +# Avoid a DeprecationWarning on Python 3.13+ +Patch: https://github.com/ipython/ipykernel/pull/1248.patch + +BuildArch: noarch + +BuildRequires: python3-devel + +%global _description \ +This package provides the IPython kernel for Jupyter. + +%description %{_description} + +%package -n python%{python3_pkgversion}-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}} +Requires: python-jupyter-filesystem + +%if %{with doc} +BuildRequires: make +BuildRequires: python3-sphinx +BuildRequires: python3-sphinx-autodoc-typehints +BuildRequires: python3-sphinxcontrib-github-alt +BuildRequires: python3-myst-parser +BuildRequires: python3-pydata-sphinx-theme +# for intersphinx: +BuildRequires: python%{python3_pkgversion}-docs +BuildRequires: python%{python3_pkgversion}-ipython-doc +BuildRequires: python-jupyter-client-doc +%endif + +Recommends: python%{python3_pkgversion}-matplotlib +Recommends: python%{python3_pkgversion}-numpy +Recommends: python%{python3_pkgversion}-pandas +Recommends: python%{python3_pkgversion}-scipy +Recommends: python%{python3_pkgversion}-pillow + +%description -n python%{python3_pkgversion}-%{modname} %{_description} + +%if %{with doc} +%package doc +Summary: Documentation for %{name} +Requires: python%{python3_pkgversion}-docs +Requires: python%{python3_pkgversion}-ipython-doc +Requires: python-jupyter-client-doc + +%description doc +This package contains the documentation of %{name}. +%endif + +%prep +%autosetup -p1 -n %{modname}-%{version} + +# Remove the dependency on debugpy. +# See https://github.com/ipython/ipykernel/pull/767 +sed -i '/"debugpy/d' pyproject.toml + +%if %{with doc} +# Use local objects.inv for intersphinx: +sed -e "s|\(('https://docs.python.org/3/', \)None)|\1'/usr/share/doc/python3-docs/html/objects.inv')|" \ + -e "s|\(('https://ipython.readthedocs.io/en/latest', \)None)|\1'/usr/share/doc/python3-ipython-doc/html/objects.inv')|" \ + -e "s|\(('https://jupyter.readthedocs.io/en/latest', \)None)|\1'/usr/share/doc/python-jupyter-client/html/objects.inv')|" \ + -i docs/conf.py +%endif + +%generate_buildrequires +%pyproject_buildrequires %{?with_tests:-x test} + +%build +%pyproject_wheel + +%if %{with doc} +%make_build -C docs html +%endif + +%install +%pyproject_install +%pyproject_save_files %{modname} %{modname}_launcher +%if %{with doc} +mkdir -p %{buildroot}%{_docdir}/%{name} +cp -fpavr docs/_build/html %{buildroot}%{_docdir}/%{name} +rm %{buildroot}%{_docdir}/%{name}/html/.buildinfo +%endif + +# Install the kernel so it can be found +# See https://bugzilla.redhat.com/show_bug.cgi?id=1327979#c19 +%{python3} -m ipykernel install --prefix %{buildroot}%{_prefix} +ls %{buildroot}%{_datadir}/jupyter/kernels/python3/ +cat %{buildroot}%{_datadir}/jupyter/kernels/python3/kernel.json + + +%check +%if %{with tests} +%pytest -Wdefault +%else +# datapub, pickleutil, serialize need ipyparallel +# pylab needs matplotlib +# trio needs trio +# debugger needs debugpy +# gui needs gobject +%{pyproject_check_import \ + -e %{modname}.datapub -e %{modname}.pickleutil -e %{modname}.serialize \ + -e '%{modname}.pylab*' \ + -e '%{modname}.trio*' \ + -e %{modname}.debugger \ + -e '%{modname}.gui*' \ + -e '*.test*'} +%endif + + +%files -n python%{python3_pkgversion}-%{modname} +%license LICENSE +%doc CONTRIBUTING.md README.md +%{python3_sitelib}/%{modname} +%pycached %{python3_sitelib}/%{modname}_launcher.py +%{python3_sitelib}/%{modname}*.dist-info/ +%{_datadir}/jupyter/kernels/python3 + +%if %{with doc} +%files doc +%doc %{_docdir}/%{name}/html +%endif + + +%changelog +* Sat Jan 04 2025 Arkady L. Shane - 6.29.3-6 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* Fri Jul 19 2024 Fedora Release Engineering - 6.29.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jun 10 2024 Miro Hrončok - 6.29.3-5 +- Avoid a DeprecationWarning on Python 3.13+ + +* Sun Jun 09 2024 Python Maint - 6.29.3-4 +- Rebuilt for Python 3.13 + +* Sun Jun 09 2024 Python Maint - 6.29.3-3 +- Bootstrap for Python 3.13 + +* Thu Apr 11 2024 Lumir Balhar - 6.29.3-2 +- Fix compatibility with pytest 8 + +* Wed Mar 13 2024 Sandro - 6.29.3-1 +- Update to 6.29.3 (RHBZ#2246019) + +* Fri Jan 26 2024 Fedora Release Engineering - 6.25.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 6.25.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Aug 03 2023 Lumír Balhar - 6.25.1-1 +- Update to 6.25.1 (rhbz#2144566) + +* Fri Jul 21 2023 Fedora Release Engineering - 6.17.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jul 10 2023 Python Maint - 6.17.1-5 +- Rebuilt for Python 3.12 + +* Sun Jul 02 2023 Python Maint - 6.17.1-4 +- Bootstrap for Python 3.12 + +* Thu Apr 20 2023 Miro Hrončok - 6.17.1-3 +- Convert the License tag to SPDX + +* Fri Jan 20 2023 Fedora Release Engineering - 6.17.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Nov 11 2022 Lumír Balhar - 6.17.1-1 +- Update to 6.17.1 (#2136453) + +* Tue Sep 27 2022 Charalampos Stratakis - 6.16.0-1 +- Update to 6.16.0 +Resolves: rhbz#2126544 + +* Wed Aug 31 2022 Charalampos Stratakis - 6.15.2-1 +- Update to 6.15.2 +Resolves: rhbz#2122279 + +* Fri Jul 22 2022 Fedora Release Engineering - 6.6.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 20 2022 Python Maint - 6.6.1-4 +- Rebuilt for Python 3.11 + +* Wed Jun 15 2022 Python Maint - 6.6.1-3 +- Bootstrap for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 6.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Jan 04 2022 Lumír Balhar - 6.6.1-1 +- Update to 6.6.1 +Resolves: rhbz#2015753 + +* Tue Aug 31 2021 Lumír Balhar - 6.4.1-1 +- Update to 6.4.1 +Resolves: rhbz#1936895 + +* Fri Jul 23 2021 Fedora Release Engineering - 5.5.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 5.5.0-3 +- Rebuilt for Python 3.10 + +* Fri Jun 04 2021 Python Maint - 5.5.0-2 +- Bootstrap for Python 3.10 + +* Wed Feb 24 2021 Miro Hrončok - 5.5.0-1 +- Update to 5.5.0 +- Fixes: rhbz#1838008 + +* Wed Feb 24 2021 Miro Hrončok - 5.4.3-1 +- Update to 5.4.3 + +* Wed Jan 27 2021 Fedora Release Engineering - 5.2.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 5.2.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 5.2.1-3 +- Rebuilt for Python 3.9 + +* Sun May 24 2020 Miro Hrončok - 5.2.1-2 +- Bootstrap for Python 3.9 + +* Tue Apr 21 2020 Miro Hrončok - 5.2.1-1 +- Update to 5.2.1 (#1815803) + +* Fri Feb 21 2020 Jerry James - 5.1.4-1 +- Update to 5.1.4 (bz 1795174) + +* Thu Jan 30 2020 Fedora Release Engineering - 5.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Dec 19 2019 Miro Hrončok - 5.1.3-1 +- Update to 5.1.3 (#1780932) + +* Thu Sep 26 2019 Jerry James - 5.1.2-1 +- Update to 5.1.2 (bz 1742596) +- Drop upstreamed 408 patch +- Drop explicit Provides that are now autogenerated +- Use local objects.inv for intersphinx, add necessary -doc BRs +- Ship this package's objects.inv +- Run all of the tests again + +* Sun Aug 18 2019 Miro Hrončok - 5.1.1-3 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 5.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon May 27 2019 Miro Hrončok - 5.1.1-1 +- Update to 5.1.1 (#1710745) + +* Tue Feb 12 2019 Miro Hrončok - 4.10.0-1 +- Update to 5.1.0, drop Python 2 package + +* Sat Feb 02 2019 Fedora Release Engineering - 4.8.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 4.8.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jul 13 2018 Miro Hrončok - 4.8.2-3 +- Don't own /usr/share/jupyter/ and /usr/share/jupyter/kernels/, + require python-jupyter-filesystem instead (#1589420) + +* Tue Jun 19 2018 Miro Hrončok - 4.8.2-2 +- Rebuilt for Python 3.7 + +* Wed May 23 2018 Miro Hrončok - 4.8.2-1 +- Update to 4.8.2 (#1438785) +- Use Python 3 Sphinx to build the docs + +* Fri Feb 09 2018 Fedora Release Engineering - 4.6.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Dec 08 2017 Iryna Shcherbina - 4.6.0-3 +- Fix ambiguous Python 2 dependency declarations + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Thu Jul 27 2017 Fedora Release Engineering - 4.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sun Apr 09 2017 Miro Hrončok - 4.6.0-1 +- Update to 4.6.0 +- Recommend some useful packages +- Run the testsuite + +* Wed Mar 15 2017 Miro Hrončok - 4.5.2-6 +- Package the kernel json files + +* Wed Mar 8 2017 Orion Poplawski - 4.5.2-5 +- Add missing requires (bug #1430480) + +* Sat Feb 11 2017 Fedora Release Engineering - 4.5.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Dec 27 2016 pcpa - 4.5.2-3 +- Preseve timestamp of installed files (#1406958#c7) + +* Mon Dec 26 2016 pcpa - 4.5.2-2 +- Use proper Source0 format (#1406958#c4) +- Do parallel html make (#1406958#c4) + +* Thu Dec 22 2016 pcpa - 4.5.2-1 +- Update to latest upstream release. +- Correct removal of unnecessary doc files. + +* Wed Nov 16 2016 pcpa - 4.5.1-1 +- Initial package. + +## END: Generated by rpmautospec