summaryrefslogtreecommitdiff
path: root/libre/blender/python37.patch
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2018-09-08 14:49:37 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2018-09-08 14:49:37 -0500
commit4ef519ea0d0f82f5c889e144e58ffc59c139027f (patch)
tree209c69a5b10cd5f0b8fb876a232cd65e463acdfb /libre/blender/python37.patch
parent5f200f77b72d8c31642296124a7cc1edf10b6e4b (diff)
downloadabslibre-4ef519ea0d0f82f5c889e144e58ffc59c139027f.tar.gz
abslibre-4ef519ea0d0f82f5c889e144e58ffc59c139027f.tar.bz2
abslibre-4ef519ea0d0f82f5c889e144e58ffc59c139027f.zip
blender-17:2.79.b.git3.32432d91-5.parabola1: rebuild
Diffstat (limited to 'libre/blender/python37.patch')
-rw-r--r--libre/blender/python37.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/libre/blender/python37.patch b/libre/blender/python37.patch
new file mode 100644
index 000000000..b3ce220b0
--- /dev/null
+++ b/libre/blender/python37.patch
@@ -0,0 +1,40 @@
+From 1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f Mon Sep 17 00:00:00 2001
+From: Campbell Barton <ideasman42@gmail.com>
+Date: Thu, 12 Jul 2018 08:28:06 +0200
+Subject: [PATCH] Fix PyRNA class registration w/ Python 3.7
+
+In Python3.7 this now raises an error.
+---
+ source/blender/python/intern/bpy_rna.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
+index 9052b6f580a..80b0aa7a51b 100644
+--- a/source/blender/python/intern/bpy_rna.c
++++ b/source/blender/python/intern/bpy_rna.c
+@@ -7577,10 +7577,12 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
+ if (!(flag & PROP_REGISTER))
+ continue;
+
++ /* TODO(campbell): Use Python3.7x _PyObject_LookupAttr(), also in the macro below. */
+ identifier = RNA_property_identifier(prop);
+ item = PyObject_GetAttrString(py_class, identifier);
+
+ if (item == NULL) {
++ PyErr_Clear();
+ /* Sneaky workaround to use the class name as the bl_idname */
+
+ #define BPY_REPLACEMENT_STRING(rna_attr, py_attr) \
+@@ -7596,6 +7598,9 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
+ } \
+ Py_DECREF(item); \
+ } \
++ else { \
++ PyErr_Clear(); \
++ } \
+ } /* intentionally allow else here */
+
+ if (false) {} /* needed for macro */
+--
+2.18.0
+