Skip to content

Commit

Permalink
Minimal maintenance to support Python 3.12 (and drop 3.5 and 3.6)
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknw committed Jan 24, 2024
1 parent 85be7ad commit d70d110
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 39 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install build dependencies
run: python -m pip install setuptools wheel
- name: Build wheel
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@v1.8
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
32 changes: 10 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,21 @@ jobs:
matrix:
os: ["ubuntu-latest"]
python-version:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "pypy-3.6"
- "3.12"
- "pypy-3.7"
- "pypy-3.8"
- "pypy-3.9"
- "pypy-3.10"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -42,23 +41,12 @@ jobs:
pytest bench/
pep8 --ignore="E731,W503,E402" --exclude=conf.py,tests,examples,bench -r --show-source .
- name: Coverage
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version}}
COVERALLS_PARALLEL: true
if: (! contains(matrix.python-version, 'pypy'))
run: |
coverage xml
coverage report --show-missing --fail-under=100
pip install coveralls
coverage report --show-missing
coveralls --service=github
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
- name: codecov
if: (! contains(matrix.python-version, 'pypy'))
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ This builds a standard wordcount function from pieces within ``toolz``:
Dependencies
------------

``toolz`` supports Python 3.5+ with a common codebase.
``toolz`` supports Python 3.7+ with a common codebase.
It is pure Python and requires no dependencies beyond the standard
library.

Expand Down Expand Up @@ -124,9 +124,9 @@ Community
See our `mailing list <https://groups.google.com/forum/#!forum/pytoolz>`__.
We're friendly.

.. |Build Status| image:: https://github.com/pytoolz/toolz/workflows/Test/badge.svg
.. |Build Status| image:: https://github.com/pytoolz/toolz/actions/workflows/test.yml/badge.svg?branch=master
:target: https://github.com/pytoolz/toolz/actions
.. |Coverage Status| image:: https://coveralls.io/repos/pytoolz/toolz/badge.svg?branch=master
:target: https://coveralls.io/r/pytoolz/toolz
.. |Coverage Status| image:: https://codecov.io/gh/pytoolz/toolz/graph/badge.svg?token=4ZFc9dwKqY
:target: https://codecov.io/gh/pytoolz/toolz
.. |Version Status| image:: https://badge.fury.io/py/toolz.svg
:target: https://badge.fury.io/py/toolz
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@
long_description=(open('README.rst').read() if exists('README.rst')
else ''),
zip_safe=False,
python_requires=">=3.5",
python_requires=">=3.7",
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"])
9 changes: 4 additions & 5 deletions toolz/_signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,12 @@
lambda *iterables: None],
izip_longest=[
(0, lambda *iterables: None, ('fillvalue',))],
pairwise=[
lambda iterable: None],
permutations=[
(0, lambda iterable, r=0: None)],
product=[
(0, lambda *iterables: None, ('repeat',))],
repeat=[
(0, lambda object, times=0: None)],
starmap=[
Expand All @@ -324,11 +328,6 @@
(0, lambda *iterables: None, ('fillvalue',))],
)

module_info[itertools].update(
product=[
(0, lambda *iterables: None, ('repeat',))],
)


module_info[operator] = dict(
__abs__=[
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[tox]
envlist =
py35
py36
py37
py38
py39
py310
py311
py312
pypy3

skip_missing_interpreters = true
Expand Down

0 comments on commit d70d110

Please sign in to comment.