From a463f25d394ccd7382d4c6cfc7b905b561250b81 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 Aug 2023 15:53:27 +0200 Subject: [PATCH 1/5] Update BACKERS.md [skip ci] --- BACKERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/BACKERS.md b/BACKERS.md index 960141998c..d1a9dd8727 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -31,6 +31,7 @@ This is a list of all the people who are contributing financially to Panda3D. I * Gyedo Jeon * GameDev JONI * Max Rodriguez +* Jethro Schoppenhorst ## Backers From 0bc290eb2cf18ee3201d086a0fbc1cc530b488eb Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 5 Aug 2023 16:37:01 +0200 Subject: [PATCH 2/5] event: Replace _PyGen_FetchStopIterationValue in Python 3.13+ See python/cpython#106320 and python/cpython#107032 Closes #1526 --- panda/src/event/pythonTask.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/panda/src/event/pythonTask.cxx b/panda/src/event/pythonTask.cxx index f214ee73d6..b6f540fbdf 100644 --- a/panda/src/event/pythonTask.cxx +++ b/panda/src/event/pythonTask.cxx @@ -545,7 +545,17 @@ do_python_task() { Py_DECREF(_generator); _generator = nullptr; -#if PY_VERSION_HEX >= 0x03030000 +#if PY_VERSION_HEX >= 0x030D0000 // Python 3.13 + // Python 3.13 does not support _PyGen_FetchStopIterationValue anymore. + if (PyErr_ExceptionMatches(PyExc_StopIteration)) { + PyObject *exc = PyErr_GetRaisedException(); + result = ((PyStopIterationObject *)exc)->value; + if (result == nullptr) { + result = Py_None; + } + Py_INCREF(result); + Py_DECREF(exc); +#elif PY_VERSION_HEX >= 0x03030000 if (_PyGen_FetchStopIterationValue(&result) == 0) { #else if (PyErr_ExceptionMatches(PyExc_StopIteration)) { From 144479d8e4dd67e3e5eafcfb0e5a0e14f712ca96 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 16 Sep 2023 09:48:52 +0200 Subject: [PATCH 3/5] cocoa: squelch secure restorable state warning on macOS 14 --- panda/src/cocoadisplay/cocoaPandaAppDelegate.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/panda/src/cocoadisplay/cocoaPandaAppDelegate.mm b/panda/src/cocoadisplay/cocoaPandaAppDelegate.mm index f64b2be56a..8662dc89af 100644 --- a/panda/src/cocoadisplay/cocoaPandaAppDelegate.mm +++ b/panda/src/cocoadisplay/cocoaPandaAppDelegate.mm @@ -26,6 +26,11 @@ return self; } +- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app { + // Squelches an annoying warning. + return YES; +} + - (void)applicationDidFinishLaunching:(NSNotification *)notification { // This only seems to work when called here. [NSApp activateIgnoringOtherApps:YES]; From 8596207d8ebe51de13ae8786bdd7d3d89f9338c8 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 16 Sep 2023 09:50:55 +0200 Subject: [PATCH 4/5] directnotify: Don't assume presence of softspace attribute --- direct/src/directnotify/RotatingLog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direct/src/directnotify/RotatingLog.py b/direct/src/directnotify/RotatingLog.py index d7b9b06d34..66ba5ed45f 100755 --- a/direct/src/directnotify/RotatingLog.py +++ b/direct/src/directnotify/RotatingLog.py @@ -83,7 +83,8 @@ class RotatingLog: self.closed = self.file.closed self.mode = self.file.mode self.name = self.file.name - self.softspace = self.file.softspace + if hasattr(self.file, 'softspace'): + self.softspace = self.file.softspace #self.encoding = self.file.encoding # Python 2.3 #self.newlines = self.file.newlines # Python 2.3, maybe From 27daecf030259041535c0ffb5cc42316a181769c Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 16 Sep 2023 09:52:55 +0200 Subject: [PATCH 5/5] Add .DS_Store to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8dada724d7..ef35d1b86b 100644 --- a/.gitignore +++ b/.gitignore @@ -48,9 +48,10 @@ cmake_install.cmake install_manifest.txt CTestTestfile.cmake -# Windows +# Operating system Thumbs.db ehthumbs.db +.DS_Store # Python __pycache__/