summaryrefslogtreecommitdiff
path: root/dev-python/pdoc3
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-03 23:21:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-03 23:21:12 +0100
commit979898cb45139dd0e6727a01df15b602f74a8dd3 (patch)
tree6c18ca0165dc1a0477e0c9c9253c98f03f26da67 /dev-python/pdoc3
parent09f46eb2a6639c039b0b4268a8410d93bbf14e9e (diff)
gentoo auto-resync : 03:04:2023 - 23:21:12
Diffstat (limited to 'dev-python/pdoc3')
-rw-r--r--dev-python/pdoc3/Manifest3
-rw-r--r--dev-python/pdoc3/files/pdoc3-0.10.0-update-tests.patch114
-rw-r--r--dev-python/pdoc3/pdoc3-0.10.0-r1.ebuild (renamed from dev-python/pdoc3/pdoc3-0.10.0.ebuild)6
3 files changed, 120 insertions, 3 deletions
diff --git a/dev-python/pdoc3/Manifest b/dev-python/pdoc3/Manifest
index c58b990434e7..5760ed526e8a 100644
--- a/dev-python/pdoc3/Manifest
+++ b/dev-python/pdoc3/Manifest
@@ -1,4 +1,5 @@
+AUX pdoc3-0.10.0-update-tests.patch 4107 BLAKE2B 546206d956e677166c61ad6028da5c72aadd1a3d405efbca2d903ded6e923c30d867b7ec49d0bd747594764e3e08c5ee82e4419373e62e2ecb9ee861fc7d490b SHA512 1423ae60b05eb2bfc0ef751758a56be682f04c6911bf118de870b15f8d6bfb36340a06b5a59e1fb4fe9c3721a46307e0adb747ba0b2dc6f8f55baa1235639591
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 713 BLAKE2B ff5f68a685237fe171f778397710549ef44d900a2d0f4e20c708759487a07d7b5c4c51c8aaf97a4d4b64147394db4a745a1b0225eb42c29cdc78d60c34da2b0a SHA512 9a5a15c70d615a5b8c3a6d855b0c3ae8cba5bf1d197eab7006b67cbe3d7ea1da903f6928f3b16f65164a8b855e2bc4900664b939a78853bce7c35bae45ef5736
+EBUILD pdoc3-0.10.0-r1.ebuild 791 BLAKE2B 023b7612540825d1cacffa312ec14a75a73147ff8a56e5f6cb8f093ed9e3a8eaabf2873ec437797ee76d969724304f34db9ebf1e1b7db27f2499c4de2fa5aa1f SHA512 80045069fc7929892498f2115edf5abdafbc7a2b3bdf22a6d7722aed6e194844db73a2061231f4bc962a2fc92caff020c99066a01601bcd935ea230bc48c5da8
MISC metadata.xml 365 BLAKE2B 3339f5c2a1488984619c510a3f5bd81ca80ee26fb27fc01e0612632a43e57d1a69be9c4dc509d6a88e3f73cad88bbef3230020eeed1d20f1ec8d2010a335a6a9 SHA512 1614ffd6e83e036b288bcce03d2926429d0b5d41c1b7385053de1bcf5656bb6e03878b5c826f474cf4209f9036c533839ee6bce20780dbe626761ee0c295bf48
diff --git a/dev-python/pdoc3/files/pdoc3-0.10.0-update-tests.patch b/dev-python/pdoc3/files/pdoc3-0.10.0-update-tests.patch
new file mode 100644
index 000000000000..bd68ea2d8368
--- /dev/null
+++ b/dev-python/pdoc3/files/pdoc3-0.10.0-update-tests.patch
@@ -0,0 +1,114 @@
+From 80af5d40d3ca39e2701c44941c1003ae6a280799 Mon Sep 17 00:00:00 2001
+From: Kernc <kerncece@gmail.com>
+Date: Sat, 29 Oct 2022 18:55:46 +0200
+Subject: [PATCH] CI: Bump min Python 3.7+ and update tests for Python 3.10
+
+Fix https://github.com/pdoc3/pdoc/issues/400
+Thanks @tjni
+--- a/pdoc/__init__.py
++++ b/pdoc/__init__.py
+@@ -1275,7 +1275,7 @@ def _formatannotation(annot):
+ `typing.Optional`, `nptyping.NDArray` and other types.
+
+ >>> _formatannotation(NewType('MyType', str))
+- 'MyType'
++ 'pdoc.MyType'
+ >>> _formatannotation(Optional[Tuple[Optional[int], None]])
+ 'Optional[Tuple[Optional[int], None]]'
+ """
+--- a/pdoc/documentation.md
++++ b/pdoc/documentation.md
+@@ -353,7 +353,7 @@ modified templates into the `directories` list of the
+
+ Compatibility
+ -------------
+-`pdoc` requires Python 3.6+.
++`pdoc` requires Python 3.7+.
+ The last version to support Python 2.x is [pdoc3 0.3.x].
+
+ [pdoc3 0.3.x]: https://pypi.org/project/pdoc3/0.3.13/
+--- a/pdoc/test/__init__.py
++++ b/pdoc/test/__init__.py
+@@ -126,7 +126,8 @@ class CliTest(unittest.TestCase):
+ def setUp(self):
+ pdoc.reset()
+
+- @unittest.skipIf(sys.version_info < (3, 7), 'pdoc._formatannotation fails on Py3.6')
++ @unittest.skipIf(sys.version_info < (3, 10),
++ 'HACK: _formatannotation() changed return value in Py3.10')
+ def test_project_doctests(self):
+ doctests = doctest.testmod(pdoc)
+ assert not doctests.failed and doctests.attempted, doctests
+@@ -185,8 +186,12 @@ def test_html(self):
+ '<object ',
+ ' class="ident">_private',
+ ' class="ident">_Private',
+- 'non_callable_routine',
+ ]
++ if sys.version_info >= (3, 10):
++ include_patterns.append('non_callable_routine')
++ else:
++ exclude_patterns.append('non_callable_routine')
++
+ package_files = {
+ '': self.PUBLIC_FILES,
+ '.subpkg2': [f for f in self.PUBLIC_FILES
+@@ -356,8 +361,11 @@ def test_text(self):
+ '_Private',
+ 'subprocess',
+ 'Hidden',
+- 'non_callable_routine',
+ ]
++ if sys.version_info >= (3, 10):
++ include_patterns.append('non_callable_routine')
++ else:
++ exclude_patterns.append('non_callable_routine')
+
+ with self.subTest(package=EXAMPLE_MODULE):
+ with redirect_streams() as (stdout, _):
+@@ -543,8 +551,9 @@ class C:
+ self.assertEqual(doc.doc['vars_dont'].docstring, '')
+ self.assertIn('integer', doc.doc['but_clss_have_doc'].docstring)
+
++ @unittest.skipIf(sys.version_info >= (3, 10), 'No builtin module "parser" in Py3.10')
+ def test_builtin_methoddescriptors(self):
+- import parser
++ import parser # TODO: replace with another public binary builtin
+ with self.assertWarns(UserWarning):
+ c = pdoc.Class('STType', pdoc.Module(parser), parser.STType)
+ self.assertIsInstance(c.doc['compile'], pdoc.Function)
+@@ -906,9 +915,13 @@ def bug130_str_annotation(a: "str"):
+ def bug253_newtype_annotation(a: CustomType):
+ return
+
++ expected = CustomType.__name__
++ if sys.version_info > (3, 10):
++ expected = f'{__name__}.{CustomType.__name__}'
++
+ self.assertEqual(
+ pdoc.Function('bug253', mod, bug253_newtype_annotation).params(annotate=True),
+- ['a:\N{NBSP}CustomType'])
++ [f'a:\N{NBSP}{expected}'])
+
+ # typing.Callable bug
+ def f(a: typing.Callable):
+--- a/setup.py
++++ b/setup.py
+@@ -2,8 +2,8 @@
+ import sys
+ from setuptools import setup, find_packages
+
+-if sys.version_info < (3, 6):
+- sys.exit('ERROR: pdoc requires Python 3.6+')
++if sys.version_info < (3, 7):
++ sys.exit('ERROR: pdoc requires Python 3.7+')
+
+
+ def _discover_tests():
+@@ -58,5 +58,5 @@ def _discover_tests():
+ 'write_to': os.path.join('pdoc', '_version.py'),
+ },
+ test_suite="setup._discover_tests",
+- python_requires='>= 3.6',
++ python_requires='>= 3.7',
+ )
diff --git a/dev-python/pdoc3/pdoc3-0.10.0.ebuild b/dev-python/pdoc3/pdoc3-0.10.0-r1.ebuild
index 057bb057cb39..9dd52ae79fd7 100644
--- a/dev-python/pdoc3/pdoc3-0.10.0.ebuild
+++ b/dev-python/pdoc3/pdoc3-0.10.0-r1.ebuild
@@ -1,8 +1,9 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
+DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} )
inherit distutils-r1 pypi
@@ -12,7 +13,7 @@ HOMEPAGE="https://pdoc3.github.io/pdoc/"
SLOT="0"
LICENSE="AGPL-3+"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 ~x86"
RDEPEND="
dev-python/mako[${PYTHON_USEDEP}]
@@ -22,6 +23,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/${PN}-TST-use-explicit-ClassWithNew-instead-of-typing.Gene.patch"
+ "${FILESDIR}/${PN}-0.10.0-update-tests.patch"
)
python_prepare_all() {