From 1e7b7bb408d2d1f2c9126ad3939b8341c52ffec4 Mon Sep 17 00:00:00 2001 From: Antonio Cuni Date: Tue, 19 Oct 2021 17:59:40 +0200 Subject: [PATCH 1/8] run tests on py3.11 --- .github/workflows/test.yml | 3 +++ tox.ini | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index baf6afd0..f45f1677 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,6 +41,9 @@ jobs: - python-version: '3.10' toxenv: 'py310-test' + - python-version: '3.11.0-alpha - 3.11' # SemVer's version range syntax + toxenv: 'py311-test' + - python-version: 'pypy-3.7' toxenv: 'pypy3-test' diff --git a/tox.ini b/tox.ini index 9aa4a968..52f4261a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] # nopyx is a special env where Cython is NOT installed, and thus we run # pure-python tests -envlist = py27-test-nopyx,py27-{test,bench},py35-test,py36-test,py37-test,py38-test,py39-test,[y310-test,pypy-{test,bench},pypy3-{test},docs +envlist = py27-test-nopyx,py27-{test,bench},py35-test,py36-test,py37-test,py38-test,py39-test,py310-test,py311-test,pypy-{test,bench},pypy3-{test},docs [testenv] setenv = From 8009c96b5e3ac647bbe99a5298a7a386f1730a7a Mon Sep 17 00:00:00 2001 From: Alecks Gates Date: Fri, 4 Nov 2022 00:15:04 -0500 Subject: [PATCH 2/8] Set minimum cython version to 0.29.30 for python 3.11 support --- .travis.yml | 2 +- setup.py | 2 +- travis/build-wheels.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b874561c..007e10ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,7 +95,7 @@ install: - pip install tox-travis # tox creates the sdist: we need cython to be installed in the env which # creates the sdist, to generate the .c files - - pip install cython>=0.25 + - pip install cython>=0.29.30 script: - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./travis/clone-benchmarks-repo.sh; fi diff --git a/setup.py b/setup.py index c963e31a..b6e3d88f 100644 --- a/setup.py +++ b/setup.py @@ -163,7 +163,7 @@ def getext(fname): if USE_CYTHON: ext_modules = get_cython_extensions() - extra_install_requires = ['cython>=0.25'] + extra_install_requires = ['cython>=0.29.30'] else: ext_modules = [] extra_install_requires = [] diff --git a/travis/build-wheels.sh b/travis/build-wheels.sh index e2897e29..6a914f65 100755 --- a/travis/build-wheels.sh +++ b/travis/build-wheels.sh @@ -13,7 +13,7 @@ PYTHONS=( for pydir in "${PYTHONS[@]}"; do pybin=/opt/python/$pydir/bin - "${pybin}/pip" install 'cython>=0.25' + "${pybin}/pip" install 'cython>=0.29.30' "${pybin}/pip" wheel /capnpy/ -w wheelhouse/ # workaround for this bug: From 4c0365dbfc574afaf9b8b44f5e8e3b73431d6e17 Mon Sep 17 00:00:00 2001 From: Alecks Gates Date: Fri, 4 Nov 2022 00:15:19 -0500 Subject: [PATCH 3/8] Add more build artifacts to .gitignore --- .gitignore | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 82029a54..896c81fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,12 @@ # these are the files produced by cython when building inplace capnpy/*.c capnpy/*.html +capnpy/*.so capnpy/segment/*.c capnpy/segment/*.html -travis/travis.rsa \ No newline at end of file +capnpy/segment/*.so +capnpy.egg-info +travis/travis.rsa + +build +__pycache__ \ No newline at end of file From 20ff677345fc99c3aeb911e6d3c5f2a9bb3fb361 Mon Sep 17 00:00:00 2001 From: Will Ridgers Date: Thu, 13 Jul 2023 10:59:17 +0100 Subject: [PATCH 4/8] Exorcise Python 2.7 https://github.com/actions/setup-python/issues/672 --- .github/workflows/test.yml | 8 +------- Makefile | 4 ++-- tox.ini | 12 ++---------- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f45f1677..bfe008a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,12 +20,6 @@ jobs: strategy: matrix: include: - - python-version: '2.7' - toxenv: 'py27-test-nopyx' - - - python-version: '2.7' - toxenv: 'py27-test' - - python-version: '3.6' toxenv: 'py36-test' @@ -41,7 +35,7 @@ jobs: - python-version: '3.10' toxenv: 'py310-test' - - python-version: '3.11.0-alpha - 3.11' # SemVer's version range syntax + - python-version: '3.11' toxenv: 'py311-test' - python-version: 'pypy-3.7' diff --git a/Makefile b/Makefile index 220f9001..adac80fa 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ annotate: schema: annotate python -m capnpy compile capnpy/schema.capnp --no-pyx --no-convert-case --no-version-check --no-reflection -# run only python2 and python3 tests: this should good enough to be checked +# run only python3 tests: this should good enough to be checked # locally before pushing and run the whole tests on travis test: - tox -e py27-test,py36-test,py37-test,py38-test + tox -e py36-test,py37-test,py38-test diff --git a/tox.ini b/tox.ini index 52f4261a..5a7eb33c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,18 +1,15 @@ [tox] # nopyx is a special env where Cython is NOT installed, and thus we run # pure-python tests -envlist = py27-test-nopyx,py27-{test,bench},py35-test,py36-test,py37-test,py38-test,py39-test,py310-test,py311-test,pypy-{test,bench},pypy3-{test},docs +envlist = py35-test,py36-test,py37-test,py38-test,py39-test,py310-test,py311-test,pypy-{test,bench},pypy3-{test},docs [testenv] setenv = TOX_ENV={envname} deps = - py27: pytest==4.6.11 - !py27: pytest==6.2.5 + pytest==6.2.5 #git+https://github.com/antocuni/pytest-benchmark.git#egg=pytest-benchmark - py27: pkgconfig==1.5.2 - py27: pycapnp==0.6.4 commands = test: py.test {envsitepackagesdir}/capnpy/testing -rs --pyx {posargs} @@ -20,11 +17,6 @@ commands = #bench: py.test {envsitepackagesdir}/capnpy/benchmarks -rs --benchmark-autosave {posargs} -[testenv:py27-test-nopyx] -setenv = - USE_CYTHON=0 - - [testenv:docs] setenv = USE_CYTHON=0 From 35968f4ca9b2baf098484b3a0e75bd2c795ca737 Mon Sep 17 00:00:00 2001 From: Will Ridgers Date: Thu, 13 Jul 2023 11:04:39 +0100 Subject: [PATCH 5/8] Use ubuntu-20.04 instead of ubuntu-latest It seems there's an issue with 3.6 on -latest. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bfe008a4..ed66149e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: tox_tests: name: tox -e ${{ matrix.toxenv }} - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: include: From 6e58d5f58263df9b7da58b5d5fa1dee22b8f157e Mon Sep 17 00:00:00 2001 From: Will Ridgers Date: Thu, 13 Jul 2023 12:44:57 +0100 Subject: [PATCH 6/8] Bump a few more Cython version mentions --- .github/workflows/test.yml | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ed66149e..961b538f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,7 +65,7 @@ jobs: pip install -U pip # so that we can use wheels # tox creates the sdist: we need cython to be installed in the env which # creates the sdist, to generate the .c files - pip install tox cython>=0.29.21 + pip install tox cython>=0.29.30 - name: Run tox run: tox -e ${{ matrix.toxenv }} diff --git a/setup.py b/setup.py index b6e3d88f..f12e02f4 100644 --- a/setup.py +++ b/setup.py @@ -65,8 +65,8 @@ def my_cythonize(extensions): try: import Cython - if Cython.__version__ < '0.29.21': - print ('WARNING: required cython>0.29.21, found %s. The .c files will ' + if Cython.__version__ < '0.29.30': + print ('WARNING: required cython>0.29.30, found %s. The .c files will ' 'NOT be regenerated' % Cython.__version__) raise ImportError from Cython.Build import cythonize From a7a3916746ce1f6f5a533fb129a084e6413f807e Mon Sep 17 00:00:00 2001 From: Will Ridgers Date: Thu, 13 Jul 2023 12:45:15 +0100 Subject: [PATCH 7/8] Add .tox to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 896c81fb..d8974429 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ capnpy.egg-info travis/travis.rsa build -__pycache__ \ No newline at end of file +__pycache__ +.tox From b4bac33e1c7cd62fbdc93edbf2e34dfcc3162df5 Mon Sep 17 00:00:00 2001 From: Will Ridgers Date: Thu, 13 Jul 2023 12:45:25 +0100 Subject: [PATCH 8/8] Pin tox to version 3.28.0 A bit sad but this fixes CI. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 961b538f..55ea34a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,7 +65,7 @@ jobs: pip install -U pip # so that we can use wheels # tox creates the sdist: we need cython to be installed in the env which # creates the sdist, to generate the .c files - pip install tox cython>=0.29.30 + pip install tox==3.28.0 cython>=0.29.30 - name: Run tox run: tox -e ${{ matrix.toxenv }}