summaryrefslogtreecommitdiff
path: root/dev-python/ipython/files
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/ipython/files')
-rw-r--r--dev-python/ipython/files/2.1.0-substitute-files.patch27
-rw-r--r--dev-python/ipython/files/ipython-8.24.0-mpl-3.9.patch72
-rw-r--r--dev-python/ipython/files/ipython-8.24.0-pytest-8.patch125
3 files changed, 0 insertions, 224 deletions
diff --git a/dev-python/ipython/files/2.1.0-substitute-files.patch b/dev-python/ipython/files/2.1.0-substitute-files.patch
deleted file mode 100644
index 659df39226ac..000000000000
--- a/dev-python/ipython/files/2.1.0-substitute-files.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-substitute the insource files with these messages
-diff --git a/IPython/extensions/octavemagic.py b/IPython/extensions/octavemagic.py
-new file mode 100644
-index 0000000..dc93fe4
---- /dev/null
-+++ b/IPython/extensions/octavemagic.py
-@@ -0,0 +1,7 @@
-+import warnings
-+
-+def load_ipython_extension(ip):
-+ msg = ("The octavemagic extension has been moved to oct2py. "
-+ "After installing oct2py, you can load octavemagic with the "
-+ "following command: '%load_ext oct2py.ipython'.")
-+ warnings.warn(msg, Warning, stacklevel=2)
-diff --git a/IPython/extensions/rmagic.py b/IPython/extensions/rmagic.py
-new file mode 100644
-index 0000000..739e491
---- /dev/null
-+++ b/IPython/extensions/rmagic.py
-@@ -0,0 +1,7 @@
-+import warnings
-+
-+def load_ipython_extension(ip):
-+ msg = ("The rmagic extension has been moved to rpy2. "
-+ "After installing rpy2, you can load rmagic with the "
-+ "following command: '%load_ext rpy2.ipython'.")
-+ warnings.warn(msg, Warning, stacklevel=2)
diff --git a/dev-python/ipython/files/ipython-8.24.0-mpl-3.9.patch b/dev-python/ipython/files/ipython-8.24.0-mpl-3.9.patch
deleted file mode 100644
index 927cc95ccf29..000000000000
--- a/dev-python/ipython/files/ipython-8.24.0-mpl-3.9.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py
-index 1f5a11f37e..4287834418 100644
---- a/IPython/core/pylabtools.py
-+++ b/IPython/core/pylabtools.py
-@@ -345,8 +345,10 @@ def find_gui_and_backend(gui=None, gui_select=None):
- backend = matplotlib.rcParamsOrig["backend"]
- backend, gui = backend_registry.resolve_backend(backend)
- else:
-+ gui = _convert_gui_to_matplotlib(gui)
- backend, gui = backend_registry.resolve_gui_or_backend(gui)
-
-+ gui = _convert_gui_from_matplotlib(gui)
- return gui, backend
-
- # Fallback to previous behaviour (Matplotlib < 3.9)
-@@ -509,10 +511,28 @@ def _list_matplotlib_backends_and_gui_loops() -> list[str]:
- if _matplotlib_manages_backends():
- from matplotlib.backends.registry import backend_registry
-
-- ret = backend_registry.list_all() + backend_registry.list_gui_frameworks()
-+ ret = backend_registry.list_all() + [
-+ _convert_gui_from_matplotlib(gui)
-+ for gui in backend_registry.list_gui_frameworks()
-+ ]
- else:
- from IPython.core import pylabtools
-
- ret = list(pylabtools.backends.keys())
-
- return sorted(["auto"] + ret)
-+
-+
-+# Matplotlib and IPython do not always use the same gui framework name.
-+# Always use the approprate one of these conversion functions when passing a
-+# gui framework name to/from Matplotlib.
-+def _convert_gui_to_matplotlib(gui: str | None) -> str | None:
-+ if gui and gui.lower() == "osx":
-+ return "macosx"
-+ return gui
-+
-+
-+def _convert_gui_from_matplotlib(gui: str | None) -> str | None:
-+ if gui and gui.lower() == "macosx":
-+ return "osx"
-+ return gui
-diff --git a/IPython/core/tests/test_pylabtools.py b/IPython/core/tests/test_pylabtools.py
-index 4099f04044..6bddb34807 100644
---- a/IPython/core/tests/test_pylabtools.py
-+++ b/IPython/core/tests/test_pylabtools.py
-@@ -276,11 +276,11 @@ def test_figure_no_canvas():
- # name is gui
- ("gtk3", "gtk3", "gtk3agg"),
- ("gtk4", "gtk4", "gtk4agg"),
-- ("headless", "headless", "agg"),
-+ ("headless", None, "agg"),
- ("osx", "osx", "macosx"),
- ("qt", "qt", "qtagg"),
- ("qt5", "qt5", "qt5agg"),
-- ("qt6", "qt6", "qt6agg"),
-+ ("qt6", "qt6", "qtagg"),
- ("tk", "tk", "tkagg"),
- ("wx", "wx", "wxagg"),
- # name is backend
-@@ -301,8 +301,6 @@ def test_figure_no_canvas():
- ("qtcairo", "qt", "qtcairo"),
- ("qt5agg", "qt5", "qt5agg"),
- ("qt5cairo", "qt5", "qt5cairo"),
-- ("qt6agg", "qt", "qt6agg"),
-- ("qt6cairo", "qt", "qt6cairo"),
- ("tkagg", "tk", "tkagg"),
- ("tkcairo", "tk", "tkcairo"),
- ("webagg", "webagg", "webagg"),
diff --git a/dev-python/ipython/files/ipython-8.24.0-pytest-8.patch b/dev-python/ipython/files/ipython-8.24.0-pytest-8.patch
deleted file mode 100644
index 04f1a1534ac5..000000000000
--- a/dev-python/ipython/files/ipython-8.24.0-pytest-8.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 7df70a3cd79068be6f98596e427d60a5d0cfe5b3 Mon Sep 17 00:00:00 2001
-From: Steve Kowalik <steven@wedontsleep.org>
-Date: Thu, 23 May 2024 13:00:43 +1000
-Subject: [PATCH] Support pytest 8.1+ changes in pytest plugin
-
-Pytest 8.1 has also changed the plugin API, as well as required new
-keyword arguments. I've shifted the pytest version calculation to the
-module level so we can use it everywhere, and continue supporting all
-versions of pytest that we can.
-
-Fixes #14390
----
- IPython/testing/plugin/pytest_ipdoctest.py | 36 ++++++++++++++++------
- 1 file changed, 26 insertions(+), 10 deletions(-)
-
-diff --git a/IPython/testing/plugin/pytest_ipdoctest.py b/IPython/testing/plugin/pytest_ipdoctest.py
-index fc8af13b579..40a3ae92b40 100644
---- a/IPython/testing/plugin/pytest_ipdoctest.py
-+++ b/IPython/testing/plugin/pytest_ipdoctest.py
-@@ -38,7 +38,11 @@
- from _pytest.compat import safe_getattr
- from _pytest.config import Config
- from _pytest.config.argparsing import Parser
--from _pytest.fixtures import FixtureRequest
-+
-+try:
-+ from _pytest.fixtures import TopRequest as FixtureRequest
-+except ImportError:
-+ from _pytest.fixtures import FixtureRequest
- from _pytest.nodes import Collector
- from _pytest.outcomes import OutcomeException
- from _pytest.pathlib import fnmatch_ex, import_path
-@@ -69,6 +73,8 @@
- # Lazy definition of output checker class
- CHECKER_CLASS: Optional[Type["IPDoctestOutputChecker"]] = None
-
-+pytest_version = tuple([int(part) for part in pytest.__version__.split(".")])
-+
-
- def pytest_addoption(parser: Parser) -> None:
- parser.addini(
-@@ -143,7 +149,7 @@ def pytest_collect_file(
- return None
-
-
--if int(pytest.__version__.split(".")[0]) < 7:
-+if pytest_version[0] < 7:
- _collect_file = pytest_collect_file
-
- def pytest_collect_file(
-@@ -448,7 +454,7 @@ def reportinfo(self) -> Tuple[Union["os.PathLike[str]", str], Optional[int], str
- assert self.dtest is not None
- return self.path, self.dtest.lineno, "[ipdoctest] %s" % self.name
-
-- if int(pytest.__version__.split(".")[0]) < 7:
-+ if pytest_version[0] < 7:
-
- @property
- def path(self) -> Path:
-@@ -521,7 +527,7 @@ def collect(self) -> Iterable[IPDoctestItem]:
- self, name=test.name, runner=runner, dtest=test
- )
-
-- if int(pytest.__version__.split(".")[0]) < 7:
-+ if pytest_version[0] < 7:
-
- @property
- def path(self) -> Path:
-@@ -636,20 +642,26 @@ def _find(
- )
-
- if self.path.name == "conftest.py":
-- if int(pytest.__version__.split(".")[0]) < 7:
-+ if pytest_version[0] < 7:
- module = self.config.pluginmanager._importconftest(
- self.path,
- self.config.getoption("importmode"),
- )
- else:
-+ kwargs = {"rootpath": self.config.rootpath}
-+ if pytest_version >= (8, 1):
-+ kwargs["consider_namespace_packages"] = False
- module = self.config.pluginmanager._importconftest(
- self.path,
- self.config.getoption("importmode"),
-- rootpath=self.config.rootpath,
-+ **kwargs,
- )
- else:
- try:
-- module = import_path(self.path, root=self.config.rootpath)
-+ kwargs = {"root": self.config.rootpath}
-+ if pytest_version >= (8, 1):
-+ kwargs["consider_namespace_packages"] = False
-+ module = import_path(self.path, **kwargs)
- except ImportError:
- if self.config.getvalue("ipdoctest_ignore_import_errors"):
- pytest.skip("unable to import module %r" % self.path)
-@@ -671,7 +683,7 @@ def _find(
- self, name=test.name, runner=runner, dtest=test
- )
-
-- if int(pytest.__version__.split(".")[0]) < 7:
-+ if pytest_version[0] < 7:
-
- @property
- def path(self) -> Path:
-@@ -701,11 +713,15 @@ def func() -> None:
-
- doctest_item.funcargs = {} # type: ignore[attr-defined]
- fm = doctest_item.session._fixturemanager
-+ kwargs = {"node": doctest_item, "func": func, "cls": None}
-+ if pytest_version <= (8, 0):
-+ kwargs["funcargs"] = False
- doctest_item._fixtureinfo = fm.getfixtureinfo( # type: ignore[attr-defined]
-- node=doctest_item, func=func, cls=None, funcargs=False
-+ **kwargs
- )
- fixture_request = FixtureRequest(doctest_item, _ispytest=True)
-- fixture_request._fillfixtures()
-+ if pytest_version <= (8, 0):
-+ fixture_request._fillfixtures()
- return fixture_request
-
-