diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 1014fd6..017692e 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -20,11 +20,11 @@ jobs: check: [rufflint, ruffformatcheck, doc8, docs, rstcheck, build-check] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: - python-version: '3.12' + python-version: '3.x' - name: Install tox run: | pip install --upgrade pip @@ -40,12 +40,12 @@ jobs: max-parallel: 6 matrix: os: [ubuntu-latest] - python-version: [3.8, 3.9, '3.10', 3.11, 3.12] + python-version: ['3.10', 3.11, 3.12, 3.13, 3.14] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e91f896..56e8072 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,12 +13,12 @@ jobs: id-token: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: - python-version: '3.12' + python-version: '3.x' - name: Install build run: pip install build diff --git a/README.rst b/README.rst index ba74b8c..25e134f 100644 --- a/README.rst +++ b/README.rst @@ -112,8 +112,8 @@ Features - Feature-rich (e.g. get the five largest keys in a sorted dict: d.keys()[-5:]) - Pragmatic design (e.g. SortedSet is a Python set with a SortedList index) - Developed on Python 3.10 -- Tested with CPython 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 and PyPy3 -- Tested on Linux, Mac OSX, and Windows +- Tested with CPython 3.10, 3.11, 3.12, 3.13, 3.14 and PyPy3 +- Tested on Linux, macOS, and Windows .. image:: https://github.com/grantjenks/python-sortedcontainers/workflows/integration/badge.svg :target: http://www.grantjenks.com/docs/sortedcontainers/ diff --git a/docs/conf.py b/docs/conf.py index 54598bf..f486b24 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -176,8 +176,7 @@ 'SortedContainers Documentation', author, 'SortedContainers', - 'Python sorted collections library:' - ' sorted list, sorted dict, and sorted set.', + 'Python sorted collections library: sorted list, sorted dict, and sorted set.', 'Miscellaneous', ), ] diff --git a/pyproject.toml b/pyproject.toml index e135023..579594a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ authors = [ {"name" = "Grant Jenks", "email" = "contact@grantjenks.com"}, ] readme = "README.rst" -requires-python = ">=3.2" +requires-python = ">=3.10" license = {"text" = "Apache 2.0"} classifiers = [ "Development Status :: 5 - Production/Stable", diff --git a/src/sortedcontainers/sorteddict.py b/src/sortedcontainers/sorteddict.py index 273c9ce..0be576e 100644 --- a/src/sortedcontainers/sorteddict.py +++ b/src/sortedcontainers/sorteddict.py @@ -191,7 +191,7 @@ def iloc(self): return self._iloc except AttributeError: warnings.warn( - 'sorted_dict.iloc is deprecated.' ' Use SortedDict.keys() instead.', + 'sorted_dict.iloc is deprecated. Use SortedDict.keys() instead.', DeprecationWarning, stacklevel=2, ) diff --git a/src/sortedcontainers/sortedlist.py b/src/sortedcontainers/sortedlist.py index aecf787..b86afce 100644 --- a/src/sortedcontainers/sortedlist.py +++ b/src/sortedcontainers/sortedlist.py @@ -668,7 +668,7 @@ def _build_index(self): head = iter(row0) tail = iter(head) - row1 = list(starmap(add, zip(head, tail))) + row1 = list(starmap(add, zip(head, tail, strict=False))) if len(row0) & 1: row1.append(row0[-1]) @@ -685,7 +685,7 @@ def _build_index(self): while len(tree[-1]) > 1: head = iter(tree[-1]) tail = iter(head) - row = list(starmap(add, zip(head, tail))) + row = list(starmap(add, zip(head, tail, strict=False))) tree.append(row) reduce(iadd, reversed(tree), self._index) @@ -1466,7 +1466,7 @@ def comparer(self, other): if seq_op is ne: return True - for alpha, beta in zip(self, other): + for alpha, beta in zip(self, other, strict=False): if alpha != beta: return seq_op(alpha, beta) @@ -2467,9 +2467,9 @@ def _check(self): # Check _keys matches _key mapped to _lists. - for val_sublist, key_sublist in zip(self._lists, self._keys): + for val_sublist, key_sublist in zip(self._lists, self._keys, strict=False): assert len(val_sublist) == len(key_sublist) - for val, key in zip(val_sublist, key_sublist): + for val, key in zip(val_sublist, key_sublist, strict=False): assert self._key(val) == key # Check _maxes index is the last value of each sublist. diff --git a/tox.ini b/tox.ini index 35f51b2..fc012be 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=rufflint,ruffformatcheck,doc8,docs,rstcheck,build-check,py{38,39,310,311,312,py3} +envlist=rufflint,ruffformatcheck,doc8,docs,rstcheck,build-check,py{310,311,312,313,314,py3} skip_missing_interpreters=True [testenv]