repo/proj/guru:dev commit in: dev-python/python-fire/, dev-python/python-fire/files/
"Gil Ferrand" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786689267.259e0c0b0b8df5d05897fb07fc874ab54da2f1a2.bakedsnake@gentoo> |
commit: 259e0c0b0b8df5d05897fb07fc874ab54da2f1a2 Author: bakedsnake <bakedsnake <AT> vagrantz <DOT> xyz> AuthorDate: Thu Aug 13 21:42:44 2026 +0000 Commit: Gil Ferrand <bakedsnake <AT> vagrantz <DOT> xyz> CommitDate: Fri Aug 14 06:34:27 2026 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=259e0c0b dev-python/python-fire: support python 3.14 Adds missing python usedeps & patches for python 3.14 support as well as to make all tests pass. The original homepage is from the original author. Since the google fork has more fixes, and is the one used in this package, it's homepage has been added. Signed-off-by: bakedsnake <bakedsnake <AT> vagrantz.xyz> .../python-fire/files/python-fire-asyncio.patch | 22 +++++++++++++++ .../python-fire/files/python-fire-inspect.patch | 23 ++++++++++++++++ ...0.7.0-r1.ebuild => python-fire-0.7.0-r2.ebuild} | 32 ++++++++++++++-------- 3 files changed, 66 insertions(+), 11 deletions(-) diff --git a/dev-python/python-fire/files/python-fire-asyncio.patch b/dev-python/python-fire/files/python-fire-asyncio.patch new file mode 100644 index 0000000000..6c53b95dac --- /dev/null +++ b/dev-python/python-fire/files/python-fire-asyncio.patch @@ -0,0 +1,22 @@ +From: https://github.com/google/python-fire/commit/716bbc23d7eca949fdb682172283c8d18f742cb6 +From: David Bieber <[email protected]> +Subject: [PATCH] Add Python 3.13 and 3.14 checking in build workflow (#623) +* Add Python 3.13 and 3.14 checking in build workflow + +--- a/fire/core.py 2024-09-22 18:14:50.000000000 +0200 ++++ b/fire/core.py 2026-08-13 23:36:49.448259702 +0200 +@@ -678,8 +678,12 @@ + + # Call the function. + if inspectutils.IsCoroutineFunction(fn): +- loop = asyncio.get_event_loop() +- component = loop.run_until_complete(fn(*varargs, **kwargs)) ++ try: ++ loop = asyncio.get_running_loop() ++ except RuntimeError: ++ component = asyncio.run(fn(*varargs, **kwargs)) ++ else: ++ component = loop.run_until_complete(fn(*varargs, **kwargs)) + else: + component = fn(*varargs, **kwargs) + diff --git a/dev-python/python-fire/files/python-fire-inspect.patch b/dev-python/python-fire/files/python-fire-inspect.patch new file mode 100644 index 0000000000..2d72eb0d9e --- /dev/null +++ b/dev-python/python-fire/files/python-fire-inspect.patch @@ -0,0 +1,23 @@ +From: https://github.com/google/python-fire/commit/716bbc23d7eca949fdb682172283c8d18f742cb6 +From: David Bieber <[email protected]> +Subject: [PATCH] Add Python 3.13 and 3.14 checking in build workflow (#623) +* Add Python 3.13 and 3.14 checking in build workflow + +--- a/fire/inspectutils.py 2026-08-13 22:49:35.213681329 +0200 ++++ b/fire/inspectutils.py 2026-08-13 22:51:08.232253224 +0200 +@@ -14,7 +14,6 @@ + + """Inspection utility functions for Python Fire.""" + +-import asyncio + import inspect + import sys + import types +@@ -343,6 +342,6 @@ + + def IsCoroutineFunction(fn): + try: +- return asyncio.iscoroutinefunction(fn) ++ return inspect.iscoroutinefunction(fn) + except: # pylint: disable=bare-except + return False diff --git a/dev-python/python-fire/python-fire-0.7.0-r1.ebuild b/dev-python/python-fire/python-fire-0.7.0-r2.ebuild similarity index 62% rename from dev-python/python-fire/python-fire-0.7.0-r1.ebuild rename to dev-python/python-fire/python-fire-0.7.0-r2.ebuild index 81f5b070e3..28dcd0aecd 100644 --- a/dev-python/python-fire/python-fire-0.7.0-r1.ebuild +++ b/dev-python/python-fire/python-fire-0.7.0-r2.ebuild @@ -9,29 +9,41 @@ PYPI_PN="fire" inherit distutils-r1 pypi DESCRIPTION="Library for automatically generating command line interfaces from Python objects" -HOMEPAGE="https://pypi.org/project/python-fire/" +HOMEPAGE="https://pypi.org/project/fire" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~x86" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + RDEPEND=" - dev-python/six - dev-python/termcolor + ${PYTHON_DEPS} + dev-python/six[${PYTHON_USEDEP}] + dev-python/termcolor[${PYTHON_USEDEP}] +" +BDEPEND=" + ${PYTHON_DEPS} " DEPEND=" ${RDEPEND} test? ( - dev-python/hypothesis - dev-python/mock - dev-python/pytest-asyncio - dev-python/termcolor - dev-python/hypothesis + dev-python/hypothesis[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/termcolor[${PYTHON_USEDEP}] + dev-python/hypothesis[${PYTHON_USEDEP}] ) " +PATCHES=( + "${FILESDIR}/python-fire-asyncio.patch" + "${FILESDIR}/python-fire-inspect.patch" +) + EPYTEST_PLUGINS=( ) -EPYTEST_DESELECT=( "fire/fire_test.py::FireTest::testFireAsyncio" ) + +distutils_enable_tests pytest src_prepare() { default @@ -45,5 +57,3 @@ src_prepare() { sed -ie "/tests_require/d" setup.py \ || die "Failed to remove deprecated `tests_require`" } - -distutils_enable_tests pytest