community/mysql-workbench to 8.0.27-3

This commit is contained in:
Kevin Mihelich 2021-12-12 23:53:42 +00:00
parent 008ee9bba7
commit 6c32c4d8e2
2 changed files with 56 additions and 2 deletions

View file

@ -0,0 +1,49 @@
diff --git a/library/grt/src/python_context.cpp b/library/grt/src/python_context.cpp
index 49ea3ce..a6f59f2 100644
--- a/library/grt/src/python_context.cpp
+++ b/library/grt/src/python_context.cpp
@@ -31,7 +31,6 @@
#include "base/wb_memory.h"
// python internals
-#include <node.h>
#include <errcode.h>
#include <token.h>
#include <frameobject.h>
@@ -1598,7 +1597,7 @@ int PythonContext::run_file(const std::string &file, bool interactive) {
If line_buffer is null, the passed buffer will be expected to contain complete code.
*/
int PythonContext::run_buffer(const std::string &buffer, std::string *line_buffer) {
- node *n;
+ PyObject *n;
PyObject *result;
PyObject *mainmod;
PyObject *globals;
@@ -1617,8 +1616,16 @@ int PythonContext::run_buffer(const std::string &buffer, std::string *line_buffe
WillEnterPython lock;
- n = PyParser_SimpleParseStringFlags(line_buffer ? line_buffer->c_str() : buffer.c_str(),
- line_buffer ? Py_single_input : Py_file_input, 0);
+ /* The changelog says:
+ A call to PyParser_SimpleParseStringFlags followed by PyNode_Compile can
+ be replaced by calling Py_CompileString().
+
+ We do not have PyNode_Compile()... But looks like `n` is not used anyway.
+
+ https://docs.python.org/3/whatsnew/3.10.html#changes-in-the-c-api */
+
+ n = Py_CompileString(line_buffer ? line_buffer->c_str() : buffer.c_str(), NULL,
+ line_buffer ? Py_single_input : Py_file_input);
if (n && (!buffer.empty() && (buffer[0] == ' ' || buffer[0] == '\t')) && line_buffer) {
return 0; // continued line
@@ -1651,7 +1658,7 @@ int PythonContext::run_buffer(const std::string &buffer, std::string *line_buffe
return -1;
}
- PyNode_Free(n);
+ Py_DECREF(n);
PyErr_Clear();
// command is supposedly complete, try to execute it

View file

@ -14,7 +14,7 @@ buildarch=12
pkgname=mysql-workbench
pkgver=8.0.27
pkgrel=2
pkgrel=3
_mysql_version=${pkgver}
_connector_version=${pkgver}
_gdal_version=3.3.1
@ -39,6 +39,7 @@ source=("https://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community
'0002-disable-unsupported-operating-system-warning.patch'
'0001-fix-buiild-for-32-bit.patch'
'atomic.patch'
'0003-python-3-10-parser.patch'
'arch_linux_profile.xml')
sha256sums=('fd7c821e61ed559f3d280199b441785723c4b79ae41afb9f68ad3b5cc8f3e124'
'SKIP'
@ -52,6 +53,7 @@ sha256sums=('fd7c821e61ed559f3d280199b441785723c4b79ae41afb9f68ad3b5cc8f3e124'
'2d0f6dcf38f22e49ef7ab9de0230484f1ffac41b7ac40feaf5ef4538ae2f7a18'
'719501bbd1de673767007c429feed2fc48d1176d456161c4ba69cf3165c0438a'
'17294a67637ab7ffff5c39262208e63d21acac72cc2492f616ef1d8e0ae9ac02'
'9de0ceba08037f15c12f730e4764d08a03813b5c59ed4c8b4d0cfbbcb82d1738'
'3a59b46ac2e7c6a0a72733d71ca33ec85146e8399a3f23871cb3a965cd8e749e')
prepare() {
@ -64,6 +66,10 @@ prepare() {
# disable unsupported operating system warning
patch -Np1 < "${srcdir}"/0002-disable-unsupported-operating-system-warning.patch
# Python 3.10 removed the parser module, which was deprecated in 3.9 due
# to the switch to the new PEG parser...
patch -Np1 < "${srcdir}"/0003-python-3-10-parser.patch
# remove '-Werror'
sed -i '/^\s*set/s| -Werror||' CMakeLists.txt
@ -184,4 +190,3 @@ package() {
install -D -m 0644 "${srcdir}"/arch_linux_profile.xml \
"${pkgdir}"/usr/share/mysql-workbench/mysql.profiles/Arch_Linux_\(MariaDB\).xml
}