mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
Workaround for Python 3.11 breaking sys._xoptions
Apparently in Python-land its acceptable behavior to break backward compatibility with documented interfaces on a whim. Bloody joke. https://github.com/python/cpython/pull/28823 Fixes #5223
This commit is contained in:
parent
5673359be2
commit
f023f047ff
6 changed files with 33 additions and 44 deletions
2
test.py
2
test.py
|
|
@ -36,6 +36,8 @@ def main() -> None:
|
|||
paths = os.environ.get('PATH', '/usr/local/sbin:/usr/local/bin:/usr/bin').split(os.pathsep)
|
||||
path = os.pathsep.join(x for x in paths if not x.startswith(current_home))
|
||||
launcher_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'kitty', 'launcher')
|
||||
if not hasattr(sys, 'kitty_run_data'):
|
||||
setattr(sys, 'kitty_run_data', {'bundle_exe_dir': launcher_dir, 'from_source': True})
|
||||
path = f'{launcher_dir}{os.pathsep}{path}'
|
||||
with TemporaryDirectory() as tdir, env_vars(
|
||||
PYTHONWARNINGS='error', HOME=tdir, USERPROFILE=tdir, PATH=path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue