diff options
Diffstat (limited to 'meta-python/recipes-devtools/python3-wxgtk4')
-rw-r--r-- | meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-pypubsub-Replace-deprecated-inspect.getargspec.patch | 65 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch | 32 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.1.bb (renamed from meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.0.bb) | 10 |
3 files changed, 37 insertions, 70 deletions
diff --git a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-pypubsub-Replace-deprecated-inspect.getargspec.patch b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-pypubsub-Replace-deprecated-inspect.getargspec.patch deleted file mode 100644 index 9bec4c5ba6..0000000000 --- a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-pypubsub-Replace-deprecated-inspect.getargspec.patch +++ /dev/null @@ -1,65 +0,0 @@ -Upstream-Status: Backport [https://github.com/wxWidgets/Phoenix/commit/9986a0d5] - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - -From 9986a0d5c24b5d45ddf571d60351f68765a8a9be Mon Sep 17 00:00:00 2001 -From: Scott Talbert <swt@techie.net> -Date: Mon, 8 Aug 2022 22:35:58 -0400 -Subject: [PATCH] pypubsub: Replace deprecated inspect.getargspec - -inspect.getargspec was removed in Python 3.11. This is a backport of: -https://github.com/schollii/pypubsub/commit/089c7a73f85c76a3aa22e4b10c71db1bf65a8637 ---- - wx/lib/pubsub/core/callables.py | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) - -diff --git a/wx/lib/pubsub/core/callables.py b/wx/lib/pubsub/core/callables.py -index 65eb1ebe..7e798c54 100644 ---- a/wx/lib/pubsub/core/callables.py -+++ b/wx/lib/pubsub/core/callables.py -@@ -12,7 +12,7 @@ CallArgsInfo regarding its autoTopicArgName data member. -
- """
-
--from inspect import getargspec, ismethod, isfunction
-+from inspect import ismethod, isfunction, signature, Parameter
-
- from .. import py2and3
-
-@@ -133,19 +133,26 @@ class CallArgsInfo: - self.autoTopicArgName = None."""
-
- #args, firstArgIdx, defaultVals, acceptsAllKwargs
-- (allParams, varParamName, varOptParamName, defaultVals) = getargspec(func)
-- if defaultVals is None:
-- defaultVals = []
-- else:
-- defaultVals = list(defaultVals)
-+ allParams = []
-+ defaultVals = []
-+ varParamName = None
-+ varOptParamName = None
-+ for argName, param in signature(func).parameters.items():
-+ if param.default != Parameter.empty:
-+ defaultVals.append(param.default)
-+ if param.kind == Parameter.VAR_POSITIONAL:
-+ varParamName = argName
-+ elif param.kind == Parameter.VAR_KEYWORD:
-+ varOptParamName = argName
-+ else:
-+ allParams.append(argName)
-
- self.acceptsAllKwargs = (varOptParamName is not None)
- self.acceptsAllUnnamedArgs = (varParamName is not None)
--
- self.allParams = allParams
-- del self.allParams[0:firstArgIdx] # does nothing if firstArgIdx == 0
-
- self.numRequired = len(self.allParams) - len(defaultVals)
-+ assert len(self.allParams) >= len(defaultVals)
- assert self.numRequired >= 0
-
- # if listener wants topic, remove that arg from args/defaultVals
--- -2.34.1 - diff --git a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch new file mode 100644 index 0000000000..f8a3061ae0 --- /dev/null +++ b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch @@ -0,0 +1,32 @@ +From b9f95c06b2e7a525f4f93d705976882e8dcba6ab Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 20 Dec 2022 09:46:31 -0800 +Subject: [PATCH] sip: Conditionally use GetAssertStackTrace under + USE_STACKWALKER + +Musl eg. does not implement stack walker ( backtrace ) therefore it gets +disabled for wxwidgets on those systems. This needs to be checked before using +GetAssertStackTrace() + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + sip/cpp/sip_corewxAppTraits.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sip/cpp/sip_corewxAppTraits.cpp b/sip/cpp/sip_corewxAppTraits.cpp +index 9c9f9d5b..1d2d2f90 100644 +--- a/sip/cpp/sip_corewxAppTraits.cpp ++++ b/sip/cpp/sip_corewxAppTraits.cpp +@@ -471,7 +471,11 @@ static PyObject *meth_wxAppTraits_GetAssertStackTrace(PyObject *sipSelf, PyObjec + PyErr_Clear(); + + Py_BEGIN_ALLOW_THREADS ++#if wxUSE_STACKWALKER + sipRes = new ::wxString((sipSelfWasArg ? sipCpp-> ::wxAppTraits::GetAssertStackTrace() : sipCpp->GetAssertStackTrace())); ++#else ++ sipRes = new ::wxString(""); ++#endif + Py_END_ALLOW_THREADS + + if (PyErr_Occurred()) diff --git a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.0.bb b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.1.bb index df23037fc6..fb011cb71b 100644 --- a/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.0.bb +++ b/meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.1.bb @@ -11,11 +11,11 @@ DEPENDS = "python3-attrdict3-native python3-six-native wxwidgets-native \ PYPI_PACKAGE = "wxPython" SRC_URI += "file://add-back-option-build-base.patch \ - file://wxgtk-fixup-build-scripts.patch \ - file://not-overwrite-cflags-cxxflags.patch \ - file://0001-pypubsub-Replace-deprecated-inspect.getargspec.patch \ - " -SRC_URI[sha256sum] = "663cebc4509d7e5d113518865fe274f77f95434c5d57bc386ed58d65ceed86c7" + file://wxgtk-fixup-build-scripts.patch \ + file://not-overwrite-cflags-cxxflags.patch \ + file://0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch \ + " +SRC_URI[sha256sum] = "e48de211a6606bf072ec3fa778771d6b746c00b7f4b970eb58728ddf56d13d5c" S = "${WORKDIR}/wxPython-${PV}" |