Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Py313 and lates libraries compatibility #347

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
fail-fast: false
matrix:
python-version: [
'3.13',
'3.12',
'3.11',
]

steps:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ input, much like the `re`_ module does with regular expressions, or it can gener
|TatSu| supports `left-recursive`_ rules in PEG_ grammars using the
algorithm_ by *Laurent* and *Mens*. The generated AST_ has the expected left associativity.

|TatSu| requires a maintained version of Python (3.11+ at the moment). While no code
|TatSu| requires a maintained version of Python (3.13+ at the moment). While no code
in |TatSu| yet depends on new language or standard library features,
the authors don't want to be constrained by Python version compatibility considerations
when developing features that will be part of future releases.
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
astroid>
astroid
docutils
mypy
pandoc
Expand Down
1 change: 1 addition & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ lint.ignore = [
"SIM114", # if-with-same-arms
"TRY003", # raise-vanilla-args
"TRY300", # try-consider-else
"UP031", # use of % formatting
]
exclude = []

Expand Down
5 changes: 4 additions & 1 deletion tatsu/collections/orderedset.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
T = TypeVar('T')


class OrderedSet(MutableSet[T], Sequence[T]): # noqa: PLW1641
class OrderedSet(MutableSet[T], Sequence[T]):
def __init__(self, iterable: Iterable[T] | None = None):
if iterable is not None:
self._map = dict.fromkeys(iterable)
else:
self._map = {}
self._list_cache: Sequence[T] | None = None

def __hash__(self):
return self._map.__hash__()

def __len__(self):
return len(self._map)

Expand Down
2 changes: 1 addition & 1 deletion tatsu/util/parproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def parallel_proc(payloads, process, *args, **kwargs):
pmap = _pmap if parallel else map
yield from pmap(process, tasks)
except KeyboardInterrupt:
return []
return


def _build_progressbar(total):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py313, py312, py311
envlist = py313, py312
skipsdist = True

[testenv]
Expand Down
Loading