We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are two issues to support latest version of Python. Python header include is hard-coded:
PyScModule.cpp:9:30: fatal error: python3.6/Python.h: No such file or directory 9: #include <python3.6/Python.h>
Changing it to the following makes this independent of Python version:
9: #include <Python.h>
In PyScModule constructor, I get the following warnings:
PyScModule.cpp: In constructor ‘scc::PyScModule::PyScModule(PyObject*, const sc_core::sc_module_name&)’: PyScModule.cpp:22:11: warning: ‘int PyEval_ThreadsInitialized()’ is deprecated (declared at /opt/tools/wh/dtd/RHE64-7/python/3.9.2/include/python3.9/ceval.h:129) [-Wdeprecated-declarations] if (! PyEval_ThreadsInitialized()) ^ PyScModule.cpp:22:37: warning: ‘int PyEval_ThreadsInitialized()’ is deprecated (declared at /opt/tools/wh/dtd/RHE64-7/python/3.9.2/include/python3.9/ceval.h:129) [-Wdeprecated-declarations] if (! PyEval_ThreadsInitialized()) ^ PyScModule.cpp:23:9: warning: ‘void PyEval_InitThreads()’ is deprecated (declared at /opt/tools/wh/dtd/RHE64-7/python/3.9.2/include/python3.9/ceval.h:130) [-Wdeprecated-declarations] PyEval_InitThreads(); ^ PyScModule.cpp:23:28: warning: ‘void PyEval_InitThreads()’ is deprecated (declared at /opt/tools/wh/dtd/RHE64-7/python/3.9.2/include/python3.9/ceval.h:130) [-Wdeprecated-declarations] PyEval_InitThreads();
PyEval_InitThreads is deprecated since 3.9 and "Changed in version 3.9: The function now does nothing." https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads
Changing the constructor to the following would get rid of the problem.
scc::PyScModule::PyScModule(PyObject* self, const sc_core::sc_module_name& nm) : sc_core::sc_module(nm) , self(self) { #if PY_MAJOR_VERSION < 3 || PY_MINOR_VERSION < 7 if (! PyEval_ThreadsInitialized()) PyEval_InitThreads(); #endif Py_INCREF(self); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There are two issues to support latest version of Python. Python header include is hard-coded:
Changing it to the following makes this independent of Python version:
In PyScModule constructor, I get the following warnings:
PyEval_InitThreads is deprecated since 3.9 and "Changed in version 3.9: The function now does nothing."
https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads
Changing the constructor to the following would get rid of the problem.
The text was updated successfully, but these errors were encountered: