From da81b1e8ab96b22ed81e6414099aba066633f3ff Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 22 Apr 2021 00:20:24 -0500 Subject: [PATCH 1/2] Support Python 3.10 by adding `anext` signature. Fixes #512 --- .travis.yml | 3 ++- toolz/_signatures.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d496be0..352e03de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,8 @@ python: - "3.6" - "3.7" - "3.8" - - "3.9-dev" + - "3.9" + - "nightly" - "pypy3.5-7.0" - "pypy3.6-7.1.1" diff --git a/toolz/_signatures.py b/toolz/_signatures.py index 328cea91..3ce1616a 100644 --- a/toolz/_signatures.py +++ b/toolz/_signatures.py @@ -45,6 +45,9 @@ lambda x: None], all=[ lambda iterable: None], + anext=[ + lambda aiterator: None, + lambda aiterator, default: None], any=[ lambda iterable: None], apply=[ From aa62bea6946ef65fc1c57ff66467de1fe6efff55 Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 22 Apr 2021 00:35:55 -0500 Subject: [PATCH 2/2] Don't use nose anymore (use pytest) Also, we really need to switch to GithubActions soon! --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 352e03de..9787dfcc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,14 +25,13 @@ install: # To skip pypy: - if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then DOSTUFF ; fi script: - export MAJOR_PYTHON_VERSION=`echo $TRAVIS_PYTHON_VERSION | cut -c 1` - - coverage run --source=toolz $(which nosetests) - --with-doctest toolz/ + - coverage run --source=toolz $(which pytest) + --doctest-modules toolz/ - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage report --show-missing --fail-under=100 ; fi - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pep8 --ignore=$PEP8_IGNORE --exclude=conf.py,tests,examples,bench -r --show-source . ; fi # For convenience, make sure simple test commands work - python setup.py develop - - py.test - - nosetests + - pytest # load coverage status to https://coveralls.io after_success: