dev-python/manhole: update PYTHON_COMPAT for 3.12

Signed-off-by: Henri Gasc <gasc@eurecom.fr>
This commit is contained in:
Henri Gasc 2024-04-12 23:42:08 +02:00
parent 8eb0438772
commit cd59f6ab24
No known key found for this signature in database
GPG Key ID: 3C21DC7CC460006B
4 changed files with 88 additions and 59 deletions

View File

@ -0,0 +1,11 @@
Use importlib as imp is removed in python3.12
--- a/tests/test_manhole.py
+++ b/tests/test_manhole.py
@@ -1,6 +1,6 @@
from __future__ import print_function
-import imp
+import importlib
import os
import re
import select

View File

@ -1,55 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..11} pypy3 )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1
DESCRIPTION="Debugging manhole for python application"
HOMEPAGE="
https://github.com/ionelmc/python-manhole
https://pypi.org/project/manhole/
"
SRC_URI="https://github.com/ionelmc/python-${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/python-${P}"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
BDEPEND="
test? (
dev-python/process-tests[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
)
"
DOCS=( AUTHORS.rst CHANGELOG.rst README.rst )
distutils_enable_tests pytest
distutils_enable_sphinx docs \
dev-python/sphinx-py3doc-enhanced-theme
python_test() {
local -x PYTHONPATH="${S}/src:${PYTHONPATH}"
local EPYTEST_DESELECT=(
tests/test_manhole.py::test_connection_handler_exec
tests/test_manhole.py::test_non_daemon_connection
tests/test_manhole.py::test_daemon_connection
tests/test_manhole.py::test_environ_variable_activation
tests/test_manhole.py::test_fork_exec
tests/test_manhole.py::test_uwsgi
tests/test_manhole_cli.py::test_help
# usually passes but sometimes fails (bug #792225)
tests/test_manhole.py::test_stderr_doesnt_deadlock
)
[[ ${EPYTHON} == pypy3 ]] && \
EPYTEST_DESELECT+=( tests/test_manhole.py::test_log_fh )
distutils-r1_python_test
}

View File

@ -0,0 +1,73 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
DISTUTILS_USE_PEP517=setuptools
DOCS_BUILDER="sphinx"
DOCS_DEPEND="dev-python/sphinx-py3doc-enhanced-theme"
DOCS_DIR="docs"
inherit distutils-r1 docs
DESCRIPTION="Debugging manhole for python application"
HOMEPAGE="
https://github.com/ionelmc/python-manhole
https://pypi.org/project/manhole/
"
SRC_URI="https://github.com/ionelmc/python-${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/python-${P}"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
BDEPEND="
test? (
dev-python/process-tests[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
)
"
DOCS=( AUTHORS.rst CHANGELOG.rst README.rst )
PATCHES=(
"${FILESDIR}/importlib.patch"
)
distutils_enable_tests pytest
EPYTEST_DESELECT=(
# Need an internet connection
tests/test_manhole.py::test_simple
tests/test_manhole.py::test_connection_handler_exec
tests/test_manhole.py::test_daemon_connection
tests/test_manhole.py::test_non_daemon_connection
tests/test_manhole.py::test_locals_after_fork
tests/test_manhole.py::test_socket_path
tests/test_manhole.py::test_with_fork
tests/test_manhole.py::test_with_forkpty
tests/test_manhole.py::test_oneshot_on_usr2_error
# Need the python package signalfd
tests/test_manhole.py::test_sigprocmask
tests/test_manhole.py::test_sigprocmask_negative
tests/test_manhole.py::test_sigmask
# Usually passes but sometimes fails (bug #792225)
tests/test_manhole.py::test_stderr_doesnt_deadlock
# Cannot find a file or directory
tests/test_manhole.py::test_uwsgi
# Broken
tests/test_manhole_cli.py::test_help
)
python_test() {
[[ ${EPYTHON} == pypy3 ]] && \
EPYTEST_DESELECT+=( tests/test_manhole.py::test_log_fh )
distutils-r1_python_test
}

View File

@ -3,12 +3,12 @@
<pkgmetadata>
<!-- maintainer-needed -->
<longdescription lang="en">
Manhole is in-process service that will accept unix domain socket connections and present the stacktraces for all threads and an interactive prompt. It can either work as a python daemon thread waiting for connections at all times or a signal handler (stopping your application and waiting for a connection).
Manhole is in-process service that will accept unix domain socket connections and present the stacktraces for all threads and an interactive prompt. It can either work as a python daemon thread waiting for connections at all times or a signal handler (stopping your application and waiting for a connection).
Access to the socket is restricted to the application's effective user id or root.
Access to the socket is restricted to the application's effective user id or root.
This is just like Twisted's manhole. It's simpler (no dependencies), it only runs on Unix domain sockets (in contrast to Twisted's manhole which can run on telnet or ssh) and it integrates well with various types of applications.
</longdescription>
This is just like Twisted's manhole. It's simpler (no dependencies), it only runs on Unix domain sockets (in contrast to Twisted's manhole which can run on telnet or ssh) and it integrates well with various types of applications.
</longdescription>
<upstream>
<remote-id type="github">ionelmc/python-manhole</remote-id>
<remote-id type="pypi">manhole</remote-id>