Patch for possible resolution of

Authored by paolini on Thu, Jan 9, 5:44 PM.



After transition python2 -> python3 a crash is experienced when closing kig in case an object is create via python scripting.

Diff Detail

R331 Kig
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
paolini created this revision.Thu, Jan 9, 5:44 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptThu, Jan 9, 5:44 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
paolini requested review of this revision.Thu, Jan 9, 5:44 PM

Looks reasonable.

But I am not sure about the comment, i.e., whether the Kig maintainer(s) want this kind of verbose documentation in the code (as opposed to in the commit history only) or not. (I guess it mostly depends on how likely somebody is to accidentally change it back if the comment is missing.)

paolini updated this revision to Diff 73166.Fri, Jan 10, 12:02 AM

Removed comments

Since I forgot to mention, this is a patch agains bug #416037

wbauer added a subscriber: wbauer.Thu, Jan 16, 7:58 PM
wbauer added inline comments.

This breaks the build with python2 though.

Maybe add a conditional like it's done in ?

paolini added inline comments.Thu, Jan 16, 11:17 PM

Actually Py_Finalze() should still work for compatibility reasons in python3, so we could simply
substitute Py_FinalizeEx() with Py_Finalize()

wbauer added inline comments.Fri, Jan 17, 2:37 PM

I saw now that Py_FinalizeEx() exists only since python version 3.6.
So this should be changed anyway, even if we don't care for python2 anymore.

But yes, it's probably best to just switch back to Py_Finalize(), I suppose. The return value is not checked anyway.

paolini updated this revision to Diff 73809.Sat, Jan 18, 5:43 AM

Going back to original Py_Finalize() to maintain compatibility with pithon2 and earlier versions of python3

This revision was not accepted when it landed; it landed in state Needs Review.Sat, Jan 18, 6:18 AM
This revision was automatically updated to reflect the committed changes.