1 Copied from https://git.blender.org/gitweb/gitweb.cgi/blender.git/patch/1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f
2 Fixes <https://bugs.gnu.org/33608>.
4 From 1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f Mon Sep 17 00:00:00 2001
5 From: Campbell Barton <ideasman42@gmail.com>
6 Date: Thu, 12 Jul 2018 08:28:06 +0200
7 Subject: [PATCH] Fix PyRNA class registration w/ Python 3.7
9 In Python3.7 this now raises an error.
11 source/blender/python/intern/bpy_rna.c | 5 +++++
12 1 file changed, 5 insertions(+)
14 diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
15 index 9052b6f580a..80b0aa7a51b 100644
16 --- a/source/blender/python/intern/bpy_rna.c
17 +++ b/source/blender/python/intern/bpy_rna.c
18 @@ -7577,10 +7577,12 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
19 if (!(flag & PROP_REGISTER))
22 + /* TODO(campbell): Use Python3.7x _PyObject_LookupAttr(), also in the macro below. */
23 identifier = RNA_property_identifier(prop);
24 item = PyObject_GetAttrString(py_class, identifier);
28 /* Sneaky workaround to use the class name as the bl_idname */
30 #define BPY_REPLACEMENT_STRING(rna_attr, py_attr) \
31 @@ -7596,6 +7598,9 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
38 } /* intentionally allow else here */
40 if (false) {} /* needed for macro */