Hi Dmitry, * Dmitry Shachnev <mitya57@debian.org> [2021-11-05 00:28]:
Hi, On Thu, Nov 04, 2021 at 08:49:47PM +0100, Lucas Nussbaum wrote:During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > sip: /usr/lib/python3/dist-packages/PyQt5/bindings/QtCore/QtCoremod.sip:23: syntax errorIt looks like a result of recent pyqt5 update — it broke compatibility with SIP 4.
Agreed, this also affects src:ros-rviz, src:qgis and src:pyqwt3d, in #998561, #998567 and #998595. I didn't reassign the bugs as sip4 is deprecated.
This issue was discussed on PyQt mailing list yesterday [1], but the upstream developer said he is not going to rush to fix this. I don't know what this means, but if there is a fix at least in upstream Vcs or snapshots, I will cherry-pick it.
The easy fix would be to revert the change in /usr/lib/python3/dist-packages/PyQt5/bindings/QtCore/QtCoremod.sip:23 for now, i.e.: - %Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", use_limited_api=True, py_ssize_t_clean=True) + %Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", use_limited_api=True)Alternatively we could add py_ssize_t_clean to the sip4 parser, see the attached patch.
I've verified that both fix ros-rviz. Looking at https://udd.debian.org/cgi-bin/bts-usertags.cgi?user=mitya57%40debian.org&tag=sip5 I guess we want to src:ros-rviz and src:qgis to the list. Do you have any documentation on how to port from sip4 to sip6? Esp how to do code generation like /usr/bin/sip with sip6. Cheers Jochen
diff --git a/sipgen/metasrc/lexer.l b/sipgen/metasrc/lexer.l
--- a/sipgen/metasrc/lexer.l
+++ b/sipgen/metasrc/lexer.l
@@ -174,6 +174,7 @@ SIP_QOBJECT {return TK_QOBJECT;}
<directive>timestamp {return TK_TIMESTAMP;}
<directive>type {return TK_TYPE;}
<directive>use_argument_names {return TK_USEARGNAMES;}
+<directive>py_ssize_t_clean {return TK_PYSSIZETCLEAN;}
<directive>use_limited_api {return TK_USELIMITEDAPI;}
<directive>all_raise_py_exception {return TK_ALLRAISEPYEXC;}
<directive>call_super_init {return TK_CALLSUPERINIT;}
diff --git a/sipgen/metasrc/parser.y b/sipgen/metasrc/parser.y
--- a/sipgen/metasrc/parser.y
+++ b/sipgen/metasrc/parser.y
@@ -389,6 +389,7 @@ static scopedNameDef *fullyQualifiedName(scopedNameDef *snd);
%token TK_TIMESTAMP
%token TK_TYPE
%token TK_USEARGNAMES
+%token TK_PYSSIZETCLEAN
%token TK_USELIMITEDAPI
%token TK_ALLRAISEPYEXC
%token TK_CALLSUPERINIT
@@ -2012,6 +2013,18 @@ module_arg: TK_KWARGS '=' TK_STRING_VALUE {
$$.call_super_init = -1;
$$.def_error_handler = NULL;
}
+ | TK_PYSSIZETCLEAN '=' bool_value {
+ $$.token = TK_PYSSIZETCLEAN;
+
+ $$.c_module = FALSE;
+ $$.kwargs = defaultKwArgs;
+ $$.name = NULL;
+ $$.use_arg_names = FALSE;
+ $$.use_limited_api = FALSE;
+ $$.all_raise_py_exc = FALSE;
+ $$.call_super_init = -1;
+ $$.def_error_handler = NULL;
+ }
| TK_USELIMITEDAPI '=' bool_value {
$$.token = TK_USELIMITEDAPI;
Attachment:
signature.asc
Description: PGP signature