[arch-commits] Commit in canorus/trunk (python-3.7.patch)
Evgeniy Alekseev
arcanis at archlinux.org
Tue Sep 4 11:53:27 UTC 2018
Date: Tuesday, September 4, 2018 @ 11:53:27
Author: arcanis
Revision: 376616
upgpkg: canorus 0.7.3rc3-2
allow deprecation warning instead of patching (see FS#59760)
Deleted:
canorus/trunk/python-3.7.patch
------------------+
python-3.7.patch | 126 -----------------------------------------------------
1 file changed, 126 deletions(-)
Deleted: python-3.7.patch
===================================================================
--- python-3.7.patch 2018-09-04 11:52:28 UTC (rev 376615)
+++ python-3.7.patch 2018-09-04 11:53:27 UTC (rev 376616)
@@ -1,126 +0,0 @@
-diff -ruN canorus-0.7.3rc3-orig/src/scripting/swigpython.cpp canorus-0.7.3rc3/src/scripting/swigpython.cpp
---- canorus-0.7.3rc3-orig/src/scripting/swigpython.cpp 2018-07-25 14:59:07.105433821 +0300
-+++ canorus-0.7.3rc3/src/scripting/swigpython.cpp 2018-07-25 15:01:53.615606426 +0300
-@@ -81,13 +81,14 @@
- PyEval_ReleaseLock();
-
- // my section with thread initialization
--PyEval_AcquireLock();
-+ PyThreadState *state = nullptr;
-+PyEval_AcquireThread(state);
- PyInterpreterState * mainInterpreterState = mainThreadState->interp;
-
- pycliThreadState = PyThreadState_New(mainInterpreterState);
- PyThreadState_Swap(mainThreadState);
-
--PyEval_ReleaseLock();
-+PyEval_ReleaseThread(state);
- }
-
- /*!
-@@ -136,7 +137,8 @@
- QString moduleName = fileName.left(fileName.lastIndexOf(".py"));
- moduleName = moduleName.remove(0, moduleName.lastIndexOf("/")+1);
-
-- PyEval_AcquireLock();
-+ PyThreadState *state = nullptr;
-+ PyEval_AcquireThread(state);
-
- PyObject *pyModule;
- if (autoReload) {
-@@ -152,11 +154,11 @@
- } else {
- pyModule = PyImport_ImportModule((char*)moduleName.toStdString().c_str());
- }
-- if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return NULL; }
-+ if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); return NULL; }
-
- // Get function object
- PyObject *pyFunction = PyObject_GetAttrString(pyModule, (char*)function.toStdString().c_str());
-- if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return NULL; }
-+ if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); return NULL; }
-
- // Call the actual function
- PyObject *ret;
-@@ -164,7 +166,7 @@
- ret = PyEval_CallObject(pyFunction, pyArgs);
- else
- ret = PyEval_CallObject(pyFunction, NULL);
-- if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return NULL; }
-+ if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); return NULL; }
-
- // Py_DECREF(pyFunction); // -Matevz
- // Py_DECREF(pyModule); // -Matevz
-@@ -172,7 +174,7 @@
- // for (int i=0; i<args.size(); i++)
- // Py_DECREF(args[i]); // -Matevz
-
-- PyEval_ReleaseLock();
-+ PyEval_ReleaseThread(state);
- return ret;
- }
-
-@@ -189,7 +191,8 @@
- void *CASwigPython::callPycli(void*) {
-
-
-- PyEval_AcquireLock();
-+ PyThreadState *state = nullptr;
-+ PyEval_AcquireThread(state);
- PyThreadState_Swap(pycliThreadState);
-
- QString fileName = thr_fileName;
-@@ -208,20 +211,20 @@
-
- PyObject *pyModule = PyImport_ImportModule((char*)moduleName.toStdString().c_str());
-
-- if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return NULL; }
-+ if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); return NULL; }
-
- // Get function object
-
- //PyObject *pyFunction = PyObject_GetAttrString(pyModule, "pycli");
- PyObject *pyFunction = PyObject_GetAttrString(pyModule, (char*)function.toStdString().c_str());
-
-- if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return NULL; }
-+ if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); return NULL; }
-
- // Call the actual function
- //
- PyObject *ret;
- ret = PyEval_CallObject(pyFunction, pyArgs);
-- if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return NULL; }
-+ if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); return NULL; }
-
- // Py_DECREF(pyFunction); // -Matevz
- // Py_DECREF(pyArgs); /// \todo Crashes if uncommented?!d
-@@ -231,7 +234,7 @@
-
-
- PyThreadState_Swap(mainThreadState);
-- PyEval_ReleaseLock();
-+ PyEval_ReleaseThread(state);
-
- // pthread_exit((void*)NULL);
- return ret;
-diff -ruN canorus-0.7.3rc3-orig/src/widgets/pyconsole.cpp canorus-0.7.3rc3/src/widgets/pyconsole.cpp
---- canorus-0.7.3rc3-orig/src/widgets/pyconsole.cpp 2018-07-25 15:07:33.211427602 +0300
-+++ canorus-0.7.3rc3/src/widgets/pyconsole.cpp 2018-07-25 15:12:44.513167871 +0300
-@@ -305,14 +305,15 @@
-
- // blocking operation;
- PyThreadState_Swap(CASwigPython::mainThreadState);
--PyEval_ReleaseLock();
-+PyEval_ReleaseThread(CASwigPython::mainThreadState);
-
- //Py_BEGIN_ALLOW_THREADS
- _thrWaitMut->lock();
- _thrWait->wait(_thrWaitMut);
- //Py_END_ALLOW_THREADS
-
--PyEval_AcquireLock();
-+PyThreadState *state = nullptr;
-+PyEval_AcquireThread(state);
- PyThreadState_Swap(CASwigPython::pycliThreadState);
-
- QString *str = new QString(_bufSend); //put contents of _bufSend into buffer \todo: synch
More information about the arch-commits
mailing list