After transition python2 -> python3 a crash is experienced when closing kig in case an object is create via python scripting.
Details
- Reviewers
kkofler francopasquarelli narvaez rdieter - Group Reviewers
KDE Edu - Commits
- R331:faec9ac0f6f7: Going back to original Py_Finalize() to maintain compatibility with pithon2 and…
Diff Detail
- Repository
- R331 Kig
- Lint
Lint Skipped - Unit
Unit Tests Skipped
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.)
scripting/python_scripter.cc | ||
---|---|---|
431 | This breaks the build with python2 though. Maybe add a conditional like it's done in https://cgit.kde.org/kig.git/commit/?id=c0aa768f28219ce8b3c275a6d13ad69757e3c7af ? |
scripting/python_scripter.cc | ||
---|---|---|
431 | Actually Py_Finalze() should still work for compatibility reasons in python3, so we could simply |
scripting/python_scripter.cc | ||
---|---|---|
431 | I saw now that Py_FinalizeEx() exists only since python version 3.6. But yes, it's probably best to just switch back to Py_Finalize(), I suppose. The return value is not checked anyway. |
Going back to original Py_Finalize() to maintain compatibility with pithon2 and earlier versions of python3