summaryrefslogtreecommitdiff
path: root/dev-python/ipdb
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-14 19:44:42 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-14 19:44:42 +0100
commit4392d53af7ce45ccfe6eb14146479ef0e2bd790a (patch)
tree505de6d6499defff572e53779c70f5fac1118499 /dev-python/ipdb
parent926f46a6d07cdbc78d625b2dfca6a3c27a95b14a (diff)
gentoo auto-resync : 14:10:2022 - 19:44:42
Diffstat (limited to 'dev-python/ipdb')
-rw-r--r--dev-python/ipdb/Manifest3
-rw-r--r--dev-python/ipdb/files/ipdb-0.13.9-tomli.patch54
-rw-r--r--dev-python/ipdb/ipdb-0.13.9-r3.ebuild (renamed from dev-python/ipdb/ipdb-0.13.9-r2.ebuild)22
3 files changed, 74 insertions, 5 deletions
diff --git a/dev-python/ipdb/Manifest b/dev-python/ipdb/Manifest
index 3fc033fc3ef2..222e13c59290 100644
--- a/dev-python/ipdb/Manifest
+++ b/dev-python/ipdb/Manifest
@@ -1,3 +1,4 @@
+AUX ipdb-0.13.9-tomli.patch 2404 BLAKE2B 28f1fa1b44632d40eefeebaf641f78a18a324e8af14679886767f4e6f5365efa3c4d622cca605c3a4e43f8046ab721525e479cecd7319b4a0970e17b95859c83 SHA512 95ead7e4cc19b85cd74f8e621982e3075400be3bab7616eaeb976b1f0a598ba68996398cbdd805442b0952cd30177d447914b45d98b5df4bb8a71da4d64c2447
DIST ipdb-0.13.9.tar.gz 16820 BLAKE2B d028fff2c4273fd4a57c3338093f0065868856b4f7b2b95aa0db3c2b1e7c5906fc17b5b55b79b3a3809465214bd91ac1891cefc1604ed866edaa2811380175f6 SHA512 da0ac6d8a7451e90cf433ab2a0d4e43fff76be03082da5cf31b83fdc56174fde7f0256009ad9a407d805c0bf12da5fa2f081e1aa0e0ce73ca648262acd385671
-EBUILD ipdb-0.13.9-r2.ebuild 711 BLAKE2B 3dad49c26f73a1f6f48dd57a76395770f9a310d7cfeba11c95f9a4733b82fb2d33f29dd16137b199b79a30af96766475ea81e6caf439e065540d6985be08cc4a SHA512 5c77700b58fb6bc9868239e0a6426bd6b78439da74e4fb6682a63ae9f5d073c6ac8b34a483f2eea0cfd698969b790a42b9e1c5f98da0bcab18c9a5ca3ff46c9e
+EBUILD ipdb-0.13.9-r3.ebuild 773 BLAKE2B ea7dc6afb17068ee6c619943a12604c2a74b7380e16ecae9be72dec79967078c7761d56a17ce119fcf7bbacf99debb421a71913d36b79e449ac4c207df4b2c19 SHA512 6578503eb8fc7f99c1afe56929eea261ef149a202a958f909e0aa5cc25bb618768fb086bcdd8ba26a98eb18b98e928588bfbae797cc8bf61ae511e724033dc19
MISC metadata.xml 332 BLAKE2B 3cb1465ff0559029739d49dc1bbc06a6d99bafc7fdf63adfe7130529791d9091e8835f13e4d37ef7b3fc1e8b5bd66578e0f18963ec30552cfa2cd8df556c420e SHA512 7e2965f3534c46964709a62f8065f63cc03e7d1bb47efc26553d8f240fe7fd6e56e161a3ef242c2a1ede1800aade4142d16e8792104fa126eca49e1e178d8905
diff --git a/dev-python/ipdb/files/ipdb-0.13.9-tomli.patch b/dev-python/ipdb/files/ipdb-0.13.9-tomli.patch
new file mode 100644
index 000000000000..20eecdd8721c
--- /dev/null
+++ b/dev-python/ipdb/files/ipdb-0.13.9-tomli.patch
@@ -0,0 +1,54 @@
+From bc06e22817f2644c6ecc838f60c93fbedb9e0016 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 12 Oct 2022 16:57:24 +0200
+Subject: [PATCH] Support tomllib/tomli in newer Python versions
+
+Support the built-in `tomllib` module from Python 3.11 and the modern
+TOML processing library `tomli` in newer versions of Python 3. The old
+`toml` package is unmaintained and does not implement TOML 1.0
+correctly.
+---
+ ipdb/__main__.py | 14 ++++++++++++--
+ setup.py | 4 ++--
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/ipdb/__main__.py b/ipdb/__main__.py
+index ea2ae88..2c3f675 100644
+--- a/ipdb/__main__.py
++++ b/ipdb/__main__.py
+@@ -176,8 +176,18 @@ def get_config():
+ read_func(f)
+ # To use on pyproject.toml, put [tool.ipdb] section
+ elif filepath.endswith('pyproject.toml'):
+- import toml
+- toml_file = toml.load(filepath)
++ try:
++ if sys.version_info >= (3, 11):
++ import tomllib
++ else:
++ import tomli as tomllib
++
++ with open(filepath, "rb") as f:
++ toml_file = tomllib.load(f)
++ except ImportError:
++ import toml
++ toml_file = toml.load(filepath)
++
+ if "tool" in toml_file and "ipdb" in toml_file["tool"]:
+ if not parser.has_section("ipdb"):
+ parser.add_section("ipdb")
+diff --git a/setup.py b/setup.py
+index 6ce51c0..04f594c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -64,8 +64,8 @@
+ # FTR, `decorator` is also a dependency of Ipython.
+ ':python_version == "3.4"': ['ipython >= 6.0.0, < 7.0.0', 'toml >= 0.10.2', 'decorator < 5.0.0'],
+ ':python_version == "3.5"': ['ipython >= 7.0.0, < 7.10.0', 'toml >= 0.10.2', 'decorator'],
+- ':python_version == "3.6"': ['ipython >= 7.10.0, < 7.17.0', 'toml >= 0.10.2', 'decorator'],
+- ':python_version > "3.6"': ['ipython >= 7.17.0', 'toml >= 0.10.2', 'decorator'],
++ ':python_version == "3.6"': ['ipython >= 7.10.0, < 7.17.0', 'tomli', 'decorator'],
++ ':python_version > "3.6"': ['ipython >= 7.17.0', 'tomli', 'decorator'],
+ },
+ tests_require=[
+ 'mock; python_version<"3"'
diff --git a/dev-python/ipdb/ipdb-0.13.9-r2.ebuild b/dev-python/ipdb/ipdb-0.13.9-r3.ebuild
index 9ab449099c1c..b68eb873626a 100644
--- a/dev-python/ipdb/ipdb-0.13.9-r2.ebuild
+++ b/dev-python/ipdb/ipdb-0.13.9-r3.ebuild
@@ -5,23 +5,37 @@ EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_USE_PEP517=setuptools
+
inherit distutils-r1 optfeature
DESCRIPTION="IPython-enabled pdb"
-HOMEPAGE="https://pypi.org/project/ipdb/ https://github.com/gotcha/ipdb"
+HOMEPAGE="
+ https://github.com/gotcha/ipdb/
+ https://pypi.org/project/ipdb/
+"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ppc64 ~riscv ~sparc x86"
-RDEPEND=">=dev-python/ipython-7.17[${PYTHON_USEDEP}]"
-BDEPEND="test? ( dev-python/toml[${PYTHON_USEDEP}] )"
+RDEPEND="
+ >=dev-python/ipython-7.17[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/tomli[${PYTHON_USEDEP}]
+ )
+"
DOCS=( AUTHORS HISTORY.txt README.rst )
+PATCHES=(
+ "${FILESDIR}"/${P}-tomli.patch
+)
+
distutils_enable_tests unittest
pkg_postinst() {
- optfeature "pyproject.toml support" dev-python/toml
+ optfeature "pyproject.toml support" dev-python/tomli
}