From 0560ee2d0d3d89eafa287794c6dd730e8205283f Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Thu, 18 Jul 2024 18:39:50 -0700 Subject: [PATCH 1/2] Remove non-ascii extension from pygments extensions list. --- spyder/config/utils.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spyder/config/utils.py b/spyder/config/utils.py index 6f7738f5a0a..ba1521ad3d8 100644 --- a/spyder/config/utils.py +++ b/spyder/config/utils.py @@ -99,7 +99,16 @@ def _get_pygments_extensions(): lexer_exts = [le for le in lexer_exts if not le.endswith('_*')] extensions = extensions + list(lexer_exts) + list(other_exts) - return sorted(list(set(extensions))) + extensions = list(set(extensions)) + + # A non-ascii file extension causes issues for macOS + # See spyder-ide/spyder#22248 + try: + extensions.remove('.' + chr(128293)) + except ValueError: + pass + + return sorted(extensions) #============================================================================== From d2b4ca5f5faa9f0caaf4079fb7a40a7e76374be1 Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Thu, 18 Jul 2024 18:43:25 -0700 Subject: [PATCH 2/2] Remove unnecessary empty extension --- spyder/config/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spyder/config/utils.py b/spyder/config/utils.py index ba1521ad3d8..65aacab6998 100644 --- a/spyder/config/utils.py +++ b/spyder/config/utils.py @@ -164,7 +164,7 @@ def get_edit_extensions(): supported by the Editor """ edit_filetypes = get_edit_filetypes() - return _get_extensions(edit_filetypes)+[''] + return _get_extensions(edit_filetypes) #==============================================================================