From 438a3bc54dd48ce392f808f4ea48a2087490e956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai=20Limb=C4=83=C8=99an?= Date: Wed, 28 Feb 2024 10:19:38 +0200 Subject: [PATCH 1/2] Catch AttributeError in addition to OSError in pluginhunspell.py to work around Python 3.12.0a4 ctypes.cdll behavior change from https://github.com/python/cpython/commit/101cfe679fe10b9b662e815999dadf81fcc32c9c --- src/Resource_Files/plugin_launchers/python/pluginhunspell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resource_Files/plugin_launchers/python/pluginhunspell.py b/src/Resource_Files/plugin_launchers/python/pluginhunspell.py index 341b434ed0..2ef52a8048 100644 --- a/src/Resource_Files/plugin_launchers/python/pluginhunspell.py +++ b/src/Resource_Files/plugin_launchers/python/pluginhunspell.py @@ -47,7 +47,7 @@ def __init__(self, hunspell_dllpath): try: # First use bundled hunspell location. self.hunspell = cdll[hunspell_dllpath] - except OSError: + except (OSError, AttributeError): # No bundled (or incompatible bundled) libhunspell found. # found. So search for system libhunspell. self.hunspell = None From cd03e70a1a332e0a771fa235eb93445a8e555f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai=20Limb=C4=83=C8=99an?= Date: Wed, 28 Feb 2024 18:45:53 +0200 Subject: [PATCH 2/2] Fix the similar dict-like access in pluginhunspellml.py as well. --- src/Resource_Files/plugin_launchers/python/pluginhunspellml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resource_Files/plugin_launchers/python/pluginhunspellml.py b/src/Resource_Files/plugin_launchers/python/pluginhunspellml.py index c7ce8a981b..aa53787261 100644 --- a/src/Resource_Files/plugin_launchers/python/pluginhunspellml.py +++ b/src/Resource_Files/plugin_launchers/python/pluginhunspellml.py @@ -62,7 +62,7 @@ def __init__(self, hunspell_dllpath): try: # First use bundled hunspell location. self.hunspell = cdll[hunspell_dllpath] - except OSError: + except (OSError, AttributeError): # No bundled (or incompatible bundled) libhunspell found. # found. So search for system libhunspell. self.hunspell = None