Skip to content

Commit

Permalink
Py313 and lates libraries compatibility (#347)
Browse files Browse the repository at this point in the history
* update to Py313 and test with latest libraries

* [readme] update

* [test] update pipelines to py313
  • Loading branch information
apalala authored Nov 5, 2024
1 parent fa2df38 commit 3edc18a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 6 deletions.
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

0 comments on commit 3edc18a

Please sign in to comment.