Actually, this is in FreeCAD code:
FreeCAD-0.18.3/src/Base/swigpyrun.inl: PyObject *modules = interp->modules;
Change "interp->modules" to "PyImport_GetModuleDict()" there.
On 2019-09-24 16:33, Victor Stinner wrote:
Hi,
It sounds like an issue in SWIG which access directly the
PyInterpreterState structure which became opaque in Python 3.8.
SWIG should use PyImport_GetModuleDict() public function instead, to
access PyImport_GetModuleDict(). In short, it returns interp->modules.
Victor
Le mar. 24 sept. 2019 à 14:57, Richard Shaw <hobbes1...@gmail.com> a écrit :
I maintain FreeCAD for Fedora and there appears to have been a change in the
API for how Python handles thread management in 3.8, specifically
PyInterpreterState which is giving the the following error when trying to build
FreeCAD:
In file included from
/builddir/build/BUILD/FreeCAD-0.18.3/src/Base/swigpyrun.cpp:41:
/builddir/build/BUILD/FreeCAD-0.18.3/src/Base/swigpyrun.inl: In function 'void
Swig_python::cleanupSWIG_T(const char*)':
/builddir/build/BUILD/FreeCAD-0.18.3/src/Base/swigpyrun.inl:75:31: error:
invalid use of incomplete type 'PyInterpreterState' {aka 'struct _is'}
75 | PyObject *modules = interp->modules;
| ^~
In file included from /usr/include/python3.8/genobject.h:11,
from /usr/include/python3.8/Python.h:121,
from
/builddir/build/BUILD/FreeCAD-0.18.3/src/Base/PyExport.h:42,
from
/builddir/build/BUILD/FreeCAD-0.18.3/src/Base/swigpyrun.cpp:25:
/usr/include/python3.8/pystate.h:20:8: note: forward declaration of
'PyInterpreterState' {aka 'struct _is'}
20 | struct _is;
| ^~~
Any tips?
I can provide a full build log or setup a COPR but it's somewhat difficult
since I'm building a whole new stack of some dependencies:
Coin3->Coin4 (in review)
- Which SoQt, SIMVoleon, OpenSceneGraph and Pivy need to be ported to.
Pyside->PySide2 (which implies Qt4->Qt5)
Thanks,
Richard
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org