8000 `fish_config browse` throws exception on macOS with Python 3.9 · Issue #12039 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

fish_config browse throws exception on macOS with Python 3.9 #12039

@seg6

Description

@seg6

Fresh install of macOS, installed fish via Homebrew, tried fish_config browse and it throws an exception, and because of this, I can not change the current theme:

$ fish_config browse
Web config started at file:///var/folders/r1/gxv80ts95y16s0ysg17sj7_c0000gn/T/web_configat6ws0hc.html
If that doesn't work, try opening http://localhost:8000/5506a8a320fadb800f8df0196bbaf633/
Hit ENTER to stop.
$ set -L
----------------------------------------
Exception occurred during processing of request from ('::1', 50897, 0, 0)
Traceback (most recent call last):
  [...]
  File "/opt/homebrew/Cellar/fish/4.1.2/share/fish/tools/web_config/webconfig.py", line 262, in parse_color
    current_best: str, i: int, long_opt: str, short_opt: str | None
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
$ fish --version
fish, version 4.1.2
$ python3 --version
Python 3.9.6
$ sw_vers
ProductName:            macOS
ProductVersion:         26.0.1
BuildVersion:           25A362

Problem is webconfig.py line 262 uses str | None syntax which requires Python 3.10+. [0]

Should use typing.Optional[str] instead.

[0] https://www.python.org/dev/peps/pep-0604

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0