From 375cd7c9ad25f5568f2b84ff4f78fe69c275828a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Fri, 28 Feb 2025 15:04:01 -0300 Subject: [PATCH 1/4] New package: python3-ipython-pygments-lexers-1.1.1 --- .../python3-ipython-pygments-lexers/template | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 srcpkgs/python3-ipython-pygments-lexers/template diff --git a/srcpkgs/python3-ipython-pygments-lexers/template b/srcpkgs/python3-ipython-pygments-lexers/template new file mode 100644 index 00000000000000..775dedbf2aa80a --- /dev/null +++ b/srcpkgs/python3-ipython-pygments-lexers/template @@ -0,0 +1,18 @@ +# Template file for 'python3-ipython-pygments-lexers' +pkgname=python3-ipython-pygments-lexers +version=1.1.1 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-flit_core" +depends="python3-Pygments" +checkdepends="$depends python3-pytest" +short_desc="Pygments lexers for highlighting IPython code" +maintainer="Gonzalo TornarĂ­a " +license="BSD-3-Clause" +homepage="https://github.com/ipython/ipython-pygments-lexers/" +distfiles="${PYPI_SITE}/i/ipython-pygments-lexers/ipython_pygments_lexers-${version}.tar.gz" +checksum=09c0138009e56b6854f9535736f4171d855c8c08a563a0dcd8022f78355c7e81 + +post_install() { + vlicense LICENSE +} From 4871de17537edd5ed8314521043853d8557efaa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Wed, 5 Mar 2025 21:10:52 -0300 Subject: [PATCH 2/4] python3-jedi: update to 0.19.2. --- srcpkgs/python3-jedi/patches/fix-test.patch | 11 +++++++++++ srcpkgs/python3-jedi/template | 10 +++++----- 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/python3-jedi/patches/fix-test.patch diff --git a/srcpkgs/python3-jedi/patches/fix-test.patch b/srcpkgs/python3-jedi/patches/fix-test.patch new file mode 100644 index 00000000000000..8738d7747b3c8e --- /dev/null +++ b/srcpkgs/python3-jedi/patches/fix-test.patch @@ -0,0 +1,11 @@ +--- a/test/test_utils.py ++++ b/test/test_utils.py +@@ -91,7 +91,7 @@ + } + # There are quite a few differences, because both Windows and Linux + # (posix and nt) libraries are included. +- assert len(difference) < 30 ++ assert len(difference) < 32 + + def test_local_import(self): + s = 'import test.test_utils' diff --git a/srcpkgs/python3-jedi/template b/srcpkgs/python3-jedi/template index dc5ae987ef1341..d071cad305f638 100644 --- a/srcpkgs/python3-jedi/template +++ b/srcpkgs/python3-jedi/template @@ -1,18 +1,18 @@ # Template file for 'python3-jedi' pkgname=python3-jedi -version=0.19.1 -revision=2 -build_style=python3-module +version=0.19.2 +revision=1 +build_style=python3-pep517 hostmakedepends="python3-setuptools" depends="python3-parso" -checkdepends="python3-parso python3-pytest python3-docopt" +checkdepends="$depends python3-pytest-xdist python3-docopt python3-attrs" short_desc="Autocompletion/static analysis library for Python 3" maintainer="DragonGhost7 " license="MIT" homepage="https://jedi.readthedocs.io/" changelog="https://raw.githubusercontent.com/davidhalter/jedi/master/CHANGELOG.rst" distfiles="${PYPI_SITE}/j/jedi/jedi-${version}.tar.gz" -checksum=cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd +checksum=4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0 post_install() { vlicense LICENSE.txt From e006a07885bf59d4d2afbfea1ed1e1e417fbff9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Fri, 28 Feb 2025 14:45:36 -0300 Subject: [PATCH 3/4] python3-ipython: update to 9.2.0. --- srcpkgs/python3-ipython/patches/fix-race.patch | 8 +++----- srcpkgs/python3-ipython/template | 9 +++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/srcpkgs/python3-ipython/patches/fix-race.patch b/srcpkgs/python3-ipython/patches/fix-race.patch index a6fdf5726815fe..98ec2fc8fabca4 100644 --- a/srcpkgs/python3-ipython/patches/fix-race.patch +++ b/srcpkgs/python3-ipython/patches/fix-race.patch @@ -1,18 +1,16 @@ See: https://github.com/ipython/ipython/issues/12164 -diff --git a/IPython/utils/_process_posix.py b/IPython/utils/_process_posix.py -index 59b5c2389..e83da39c6 100644 --- a/IPython/utils/_process_posix.py +++ b/IPython/utils/_process_posix.py -@@ -136,6 +136,7 @@ def system(self, cmd): +@@ -112,6 +112,7 @@ # record how far we've printed, so that next time we only print *new* # content from the buffer. out_size = 0 + child = None + assert self.sh is not None try: # Since we're not really searching the buffer for text patterns, we - # can set pexpect's search window to be tiny and it won't matter. -@@ -158,6 +159,13 @@ def system(self, cmd): +@@ -135,6 +136,13 @@ # Update the pointer to what we've already printed out_size = len(child.before) except KeyboardInterrupt: diff --git a/srcpkgs/python3-ipython/template b/srcpkgs/python3-ipython/template index 24211329c236f3..9e1b3178ea6d9a 100644 --- a/srcpkgs/python3-ipython/template +++ b/srcpkgs/python3-ipython/template @@ -1,12 +1,13 @@ # Template file for 'python3-ipython' pkgname=python3-ipython -version=8.35.0 +version=9.2.0 revision=1 build_style=python3-pep517 hostmakedepends="python3-setuptools python3-wheel" depends="python3-jedi python3-decorator python3-pickleshare python3-traitlets python3-prompt_toolkit python3-Pygments python3-backcall - python3-matplotlib-inline python3-pexpect python3-stack_data" + python3-matplotlib-inline python3-pexpect python3-stack_data + python3-ipython-pygments-lexers" checkdepends="$depends python3-pytest-asyncio python3-testpath python3-curio python3-jupyter_nbformat python3-matplotlib python3-numpy python3-pandas python3-trio" @@ -14,9 +15,9 @@ short_desc="Enhanced interactive Python3 shell" maintainer="Andrew J. Hesford " license="BSD-3-Clause" homepage="https://ipython.org/" -changelog="https://github.com/ipython/ipython/raw/main/docs/source/whatsnew/version8.rst" +changelog="https://github.com/ipython/ipython/raw/main/docs/source/whatsnew/version9.rst" distfiles="${PYPI_SITE}/i/ipython/ipython-${version}.tar.gz" -checksum=d200b7d93c3f5883fc36ab9ce28a18249c7706e51347681f80a0aef9895f2520 +checksum=62a9373dbc12f28f9feaf4700d052195bf89806279fc8ca11f3f54017d04751b conflicts="python-ipython<=5.8.0_2" make_check_pre="env PYTHONPATH=." From 70719e731907f2d10c152314d6fa7ac88513783d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Thu, 6 Mar 2025 16:09:26 -0300 Subject: [PATCH 4/4] python3-ipython_ipykernel: patches for ipython 9.0 --- .../patches/1354.diff | 30 +++++++++++++++++++ ...4fd4630020a3a13895bfddd16ddcfc423387.patch | 27 +++++++++++++++++ ...68ddc26cc0078ec6466897bb4f84869e7068.patch | 29 ++++++++++++++++++ srcpkgs/python3-ipython_ipykernel/template | 2 +- 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/python3-ipython_ipykernel/patches/1354.diff create mode 100644 srcpkgs/python3-ipython_ipykernel/patches/1390-05ee4fd4630020a3a13895bfddd16ddcfc423387.patch create mode 100644 srcpkgs/python3-ipython_ipykernel/patches/1390-991068ddc26cc0078ec6466897bb4f84869e7068.patch diff --git a/srcpkgs/python3-ipython_ipykernel/patches/1354.diff b/srcpkgs/python3-ipython_ipykernel/patches/1354.diff new file mode 100644 index 00000000000000..f4a66c06e181a3 --- /dev/null +++ b/srcpkgs/python3-ipython_ipykernel/patches/1354.diff @@ -0,0 +1,30 @@ +From https://github.com/ipython/ipykernel/pull/1354 + +diff --git a/tests/test_start_kernel.py b/tests/test_start_kernel.py +index f2a632be..71f4bdc0 100644 +--- a/tests/test_start_kernel.py ++++ b/tests/test_start_kernel.py +@@ -14,6 +14,14 @@ + + @flaky(max_runs=3) + def test_ipython_start_kernel_userns(): ++ import IPython ++ ++ if IPython.version_info > (9, 0): # noqa:SIM108 ++ EXPECTED = "IPythonMainModule" ++ else: ++ # not this since https://github.com/ipython/ipython/pull/14754 ++ EXPECTED = "DummyMod" ++ + cmd = dedent( + """ + from ipykernel.kernelapp import launch_new_instance +@@ -40,7 +48,7 @@ def test_ipython_start_kernel_userns(): + content = msg["content"] + assert content["found"] + text = content["data"]["text/plain"] +- assert "DummyMod" in text ++ assert EXPECTED in text + + + @flaky(max_runs=3) diff --git a/srcpkgs/python3-ipython_ipykernel/patches/1390-05ee4fd4630020a3a13895bfddd16ddcfc423387.patch b/srcpkgs/python3-ipython_ipykernel/patches/1390-05ee4fd4630020a3a13895bfddd16ddcfc423387.patch new file mode 100644 index 00000000000000..37d5a77fa4e4f8 --- /dev/null +++ b/srcpkgs/python3-ipython_ipykernel/patches/1390-05ee4fd4630020a3a13895bfddd16ddcfc423387.patch @@ -0,0 +1,27 @@ +From https://github.com/ipython/ipykernel/pull/1390 + +From 05ee4fd4630020a3a13895bfddd16ddcfc423387 Mon Sep 17 00:00:00 2001 +From: Ian Thomas +Date: Fri, 11 Apr 2025 10:25:39 +0100 +Subject: [PATCH] Fix embed kernel (taken from #1322) + +--- + ipykernel/embed.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/ipykernel/embed.py b/ipykernel/embed.py +index 3e4abd390..d2cbe60b4 100644 +--- a/ipykernel/embed.py ++++ b/ipykernel/embed.py +@@ -49,9 +49,10 @@ def embed_kernel(module=None, local_ns=None, **kwargs): + if module is None: + module = caller_module + if local_ns is None: +- local_ns = caller_locals ++ local_ns = dict(**caller_locals) + + app.kernel.user_module = module ++ assert isinstance(local_ns, dict) + app.kernel.user_ns = local_ns + app.shell.set_completer_frame() # type:ignore[union-attr] + app.start() diff --git a/srcpkgs/python3-ipython_ipykernel/patches/1390-991068ddc26cc0078ec6466897bb4f84869e7068.patch b/srcpkgs/python3-ipython_ipykernel/patches/1390-991068ddc26cc0078ec6466897bb4f84869e7068.patch new file mode 100644 index 00000000000000..9c703d7a78e458 --- /dev/null +++ b/srcpkgs/python3-ipython_ipykernel/patches/1390-991068ddc26cc0078ec6466897bb4f84869e7068.patch @@ -0,0 +1,29 @@ +From https://github.com/ipython/ipykernel/pull/1390 + +From 991068ddc26cc0078ec6466897bb4f84869e7068 Mon Sep 17 00:00:00 2001 +From: Ian Thomas +Date: Thu, 10 Apr 2025 13:36:43 +0100 +Subject: [PATCH] Remove welcome_message arg from enable_pylab + +--- + ipykernel/inprocess/ipkernel.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ipykernel/inprocess/ipkernel.py b/ipykernel/inprocess/ipkernel.py +index 873b96d20..320b739b6 100644 +--- a/ipykernel/inprocess/ipkernel.py ++++ b/ipykernel/inprocess/ipkernel.py +@@ -193,11 +193,11 @@ def enable_matplotlib(self, gui=None): + gui = self.kernel.gui + return super().enable_matplotlib(gui) + +- def enable_pylab(self, gui=None, import_all=True, welcome_message=False): ++ def enable_pylab(self, gui=None, import_all=True): + """Activate pylab support at runtime.""" + if not gui: + gui = self.kernel.gui +- return super().enable_pylab(gui, import_all, welcome_message) ++ return super().enable_pylab(gui, import_all) + + + InteractiveShellABC.register(InProcessInteractiveShell) diff --git a/srcpkgs/python3-ipython_ipykernel/template b/srcpkgs/python3-ipython_ipykernel/template index b768cfb3fc49c1..72c0eb045e3f9d 100644 --- a/srcpkgs/python3-ipython_ipykernel/template +++ b/srcpkgs/python3-ipython_ipykernel/template @@ -1,7 +1,7 @@ # Template file for 'python3-ipython_ipykernel' pkgname=python3-ipython_ipykernel version=6.29.5 -revision=3 +revision=4 build_style=python3-pep517 # run all tests available make_check_target="tests"