From 4b21e7c9c70d6db279d9b4e39b023472eb412a47 Mon Sep 17 00:00:00 2001 From: Sebastian Fleer Date: Tue, 30 Sep 2025 09:14:21 +0200 Subject: [PATCH] webconfig: Replace str.stripprefix with str.removeprefix str.stripprefix doesn't exist in Python: https://docs.python.org/3/library/stdtypes.html#str.removeprefix Closes #11840 --- CHANGELOG.rst | 1 + share/tools/web_config/webconfig.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 615279551..6eee0418a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,7 @@ This release fixes the following regressions identified in 4.1.0: - Some :doc:`fish_config ` subcommands for prompts and themes were broken in standalone Linux builds (those using the ``embed-data`` cargo feature), which has been fixed (:issue:`11832`). - Our new workaround for WezTerm's `issues with modifyOtherKeys `__ breaking shifted keys was broken on some versions of WezTerm, which has been fixed (:issue:`11204`). +- Fixed a crash when using new underline styles in :doc:`the web-based configuration tool ` (:issue:`11840`). fish 4.1.0 (released September 27, 2025) ======================================== diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 900be101c..16fa92acc 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -243,11 +243,13 @@ def parse_color(color_str): elif comp == "--underline" or comp == "-u": underline = "single" elif comp.startswith("--underline="): - underline = comp.stripprefix("--underline=") + # TODO(python>3.8): use removeprefix + underline = comp[len("--underline=") :] elif comp.startswith( "-u" ): # Multiple short options like "-rucurly" are not yet supported. - underline = comp.stripprefix("-u") + # TODO(python>3.8): use removeprefix + underline = comp[len("-u") :] elif comp == "--italics" or comp == "-i": italics = True elif comp == "--dim" or comp == "-d":