Copied from https://git.blender.org/gitweb/gitweb.cgi/blender.git/patch/1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f Fixes . From 1db47a2ccd1e68994bf8140eba6cc2a26a2bc91f Mon Sep 17 00:00:00 2001 From: Campbell Barton 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.20.1 e='range'>range
AgeCommit message (Expand)Author
2023-12-07gnu: xrdp: Update to 0.9.23.1....* gnu/packages/rdesktop.scm (xrdp): Update to 0.9.23.1. Change-Id: If5a01e38dc04bd013118d21ff11a46f3e7dddfd2 Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Andy Tai
2023-10-04gnu: freerdp: Update to 2.11.2....* gnu/packages/rdesktop.scm (freerdp): Update to 2.11.2. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Timotej Lazar
2023-09-25gnu: freerdp: Update to 2.11.1....* gnu/packages/rdesktop.scm (freerdp): Update to 2.11.1. [inputs]: Add pcsc-lite. Signed-off-by: Christopher Baines <mail@cbaines.net> Timotej Lazar
2023-09-04gnu: freerdp: Enable server build....* gnu/packages/rdesktop.scm (freerdp): Enable server build. [phases] (configure-flags): Enable server build flags. [inputs]: Add server build dependencies and additional protocols cairo, dbus, gsm, lame, libxdamage, opencl, openh264, openssl. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Andy Tai
2023-08-12gnu: Add xorgxrdp....* gnu/packages/rdesktop.scm (xorgxrdp): New variable Signed-off-by: Ludovic Courtès <ludo@gnu.org> Andy Tai
2023-08-12gnu: Add xrdp....* gnu/packages/rdesktop.scm (xrdp): New variable Signed-off-by: Ludovic Courtès <ludo@gnu.org> Andy Tai