App: fixes #10460: App::PropertyPythonObject is not saving data
Since Py3.11 the methods names __setstate__ and __getstate__ conflict with the method names added to the object class. Thus rename them to 'loads' and 'dumps'
This commit is contained in:
@@ -559,12 +559,12 @@ PyObject* TopoShapePy::importBrepFromString(PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* TopoShapePy::__getstate__(PyObject *args) {
|
||||
PyObject* TopoShapePy::dumps(PyObject *args) {
|
||||
return exportBrepToString(args);
|
||||
}
|
||||
|
||||
|
||||
PyObject* TopoShapePy::__setstate__(PyObject *args) {
|
||||
PyObject* TopoShapePy::loads(PyObject *args) {
|
||||
if (! getTopoShapePtr()) {
|
||||
PyErr_SetString(Base::PyExc_FC_GeneralError,"no c++ object");
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user