summaryrefslogtreecommitdiff
path: root/dev-python/pdoc3
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pdoc3')
-rw-r--r--dev-python/pdoc3/Manifest3
-rw-r--r--dev-python/pdoc3/files/pdoc3-TST-use-explicit-ClassWithNew-instead-of-typing.Gene.patch43
-rw-r--r--dev-python/pdoc3/pdoc3-0.10.0.ebuild4
3 files changed, 49 insertions, 1 deletions
diff --git a/dev-python/pdoc3/Manifest b/dev-python/pdoc3/Manifest
index 9961100d1d03..f1ba5f3df4b5 100644
--- a/dev-python/pdoc3/Manifest
+++ b/dev-python/pdoc3/Manifest
@@ -1,3 +1,4 @@
+AUX pdoc3-TST-use-explicit-ClassWithNew-instead-of-typing.Gene.patch 1352 BLAKE2B c0e950e1f84f0e10e977e89eb84abdc52f80c242d2b0285142fd32830ce3f8825c3565b99720df249521a667860dadabfed4bc39503156a72158082f4b5e15e7 SHA512 df89ca51799dca760f22899eba9f12af590d9473235bee36d152fc00e7e9406aa3daa20a97dab012e2ca354076beb54961d90819373a5517fc9a49e5bb9a1bc5
DIST pdoc3-0.10.0.tar.gz 86133 BLAKE2B 3bada6fb1b048c4eff7556108c29d7f92ee988332d160c4ff765c47bf0cf7a461ed90f93e7be25a7a3251f5d3e70492d23be7230a5ec4abb12612b7e0dd4b5b6 SHA512 646ffb9bceb4456a1ab36c840eb384858aab430443905bc71e62e9c71112a769b69e22cbd18a9d75b7968e2336cbbaa9072103f96dc2d0829ccc7515b057ca85
-EBUILD pdoc3-0.10.0.ebuild 667 BLAKE2B 5b215350bc62d43e2139447af84a9c08e24967abefbb3fac750b52d874d74ed8c78c1e0467f6811dccaab786787d7d8ce4852a7ed06eafe56157a0e83360afb5 SHA512 aae4137c4cf52029631487a0ea7edfd12fbdfaff13a9f797b1dbde8dddb6ad652356cbafc148e9e5deacaa203fbce68610ca43152cdd9994e97cb753269c9f1f
+EBUILD pdoc3-0.10.0.ebuild 760 BLAKE2B 58f4e758b3eb0485af82913f54b71f9b43ae87ea9a27ae5c96183d6cd7cd5c095fc6c939e978404c5d0bcc05c329215d325fbcc02f603892636e78c49431f99b SHA512 e58debb52dac21eaed3f28495c42bbc725877cc70b65103de7f7ad0b4a8e5fd72df84e81a88fc66bd12490616cb4dd38b7117897a28c52394777cd40667038f6
MISC metadata.xml 365 BLAKE2B 3339f5c2a1488984619c510a3f5bd81ca80ee26fb27fc01e0612632a43e57d1a69be9c4dc509d6a88e3f73cad88bbef3230020eeed1d20f1ec8d2010a335a6a9 SHA512 1614ffd6e83e036b288bcce03d2926429d0b5d41c1b7385053de1bcf5656bb6e03878b5c826f474cf4209f9036c533839ee6bce20780dbe626761ee0c295bf48
diff --git a/dev-python/pdoc3/files/pdoc3-TST-use-explicit-ClassWithNew-instead-of-typing.Gene.patch b/dev-python/pdoc3/files/pdoc3-TST-use-explicit-ClassWithNew-instead-of-typing.Gene.patch
new file mode 100644
index 000000000000..b969bf4727bc
--- /dev/null
+++ b/dev-python/pdoc3/files/pdoc3-TST-use-explicit-ClassWithNew-instead-of-typing.Gene.patch
@@ -0,0 +1,43 @@
+From 4aa70de2221a34a3003a7e5f52a9b91965f0e359 Mon Sep 17 00:00:00 2001
+From: Spencer Baugh <sbaugh@catern.com>
+Date: Thu, 23 Sep 2021 09:00:25 -0400
+Subject: [PATCH] TST: use explicit ClassWithNew instead of typing.Generic
+
+typing.Generic doesn't have a __new__ method in 3.9.
+
+Fixes https://github.com/pdoc3/pdoc/issues/355
+---
+ pdoc/test/__init__.py | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/pdoc/test/__init__.py b/pdoc/test/__init__.py
+index e8c3d94a805b..8b67ab77d3f7 100644
+--- a/pdoc/test/__init__.py
++++ b/pdoc/test/__init__.py
+@@ -1043,16 +1043,20 @@ class Foo:
+
+ self.assertEqual(pdoc.Class('C2', mod, C2).params(), ['a', 'b', 'c=None', '*', 'd=1', 'e'])
+
+- class G(typing.Generic[T]):
++ class ClassWithNew:
++ def __new__(self, arg):
++ pass
++
++ class G(ClassWithNew):
+ def __init__(self, a, b, c=100):
+ pass
+
+ self.assertEqual(pdoc.Class('G', mod, G).params(), ['a', 'b', 'c=100'])
+
+- class G2(typing.Generic[T]):
++ class G2(ClassWithNew):
+ pass
+
+- self.assertEqual(pdoc.Class('G2', mod, G2).params(), ['*args', '**kwds'])
++ self.assertEqual(pdoc.Class('G2', mod, G2).params(), ['arg'])
+
+ def test_url(self):
+ mod = pdoc.Module(EXAMPLE_MODULE)
+--
+2.32.0
+
diff --git a/dev-python/pdoc3/pdoc3-0.10.0.ebuild b/dev-python/pdoc3/pdoc3-0.10.0.ebuild
index 7769b43281fc..5f148c0355d0 100644
--- a/dev-python/pdoc3/pdoc3-0.10.0.ebuild
+++ b/dev-python/pdoc3/pdoc3-0.10.0.ebuild
@@ -21,6 +21,10 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}/${PN}-TST-use-explicit-ClassWithNew-instead-of-typing.Gene.patch"
+)
+
python_prepare_all() {
distutils-r1_python_prepare_all
sed -i \