Skip to content

Commit

Permalink
Target Python 3.11 (Talon 0.4) (#1880)
Browse files Browse the repository at this point in the history
Our previous Python 3.9 target matched up with Talon 0.3.

Since
#1757 (comment)
(merged into #1738), cursorless-talon depends on Python 3.10 features.
Attempting to use cursorless-talon with Talon 0.3.1 results in the
following error:

```
2023-09-09 23:17:40 ERROR user.cursorless-talon.src.spoken_forms import failed
   13:                lib/python3.9/threading.py:937* # loader thread
   12:                lib/python3.9/threading.py:980*
   11:                lib/python3.9/threading.py:917*
   10:                   app/resources/loader.py:894|
    9:                   app/resources/loader.py:830|
    8:                   app/resources/loader.py:648|
    7:                   app/resources/loader.py:684|
    6:                   app/resources/loader.py:738|
    5:                   app/resources/loader.py:432| # [stack splice]
    4:       lib/python3.9/importlib/__init__.py:127|
    3:                   app/resources/loader.py:253|
    2:                   app/resources/loader.py:248|
    1: user/cursorless-talon/src/spoken_forms.py:3  | from typing import Callable, Concatenate, ParamSpec, TypeVar
ImportError: cannot import name 'Concatenate' from 'typing' (/Applications/Talon.app/Contents/Resources/python/lib/python39.zip/typing.pyc)
```

Talon 0.4 has Python 3.11. This bumps our target to match latest public
Talon.

## Checklist

- [ ] ~I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)~
- [ ] ~I have updated the
[docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and
[cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)~
- [ ] I have not broken the cheatsheet
- [ ] I have run the Talon tests

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Pokey Rule <[email protected]>
  • Loading branch information
3 people authored Dec 18, 2023
1 parent 77cc4b2 commit 8983a1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.black]
target-version = ["py39"]
target-version = ["py311"]
force-exclude = '''
(
^/vendor/
Expand All @@ -9,8 +9,8 @@ force-exclude = '''

[tool.ruff]
select = ["E", "F", "C4", "I001", "UP", "SIM"]
ignore = ["E501", "SIM105", "UP035"]
target-version = "py39"
ignore = ["E501", "SIM105", "UP007", "UP035"]
target-version = "py311"
extend-exclude = ["vendor", "data/playground/**/*.py"]

[tool.pyright]
Expand Down

0 comments on commit 8983a1e

Please sign in to comment.