From 9010b6b90cd520b076f8a8947b92d5e00d35026d Mon Sep 17 00:00:00 2001 From: Mikhail Korobov Date: Mon, 30 May 2022 00:46:42 +0500 Subject: [PATCH 1/4] fix compatibility with recent Cython? --- src/dawg.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dawg.pyx b/src/dawg.pyx index 6dba921..37258d9 100644 --- a/src/dawg.pyx +++ b/src/dawg.pyx @@ -569,7 +569,7 @@ cdef class BytesDAWG(CompletionDAWG): self._completer.length(), b64_decoder_storage ) - results.push_back(string(b64_decoder_storage, key_len)) + results.push_back(string(b64_decoder_storage, key_len)) return results From b53ccc15aec0138f1c17f2b45a3c4d5706446a1a Mon Sep 17 00:00:00 2001 From: Mikhail Korobov Date: Mon, 30 May 2022 00:47:13 +0500 Subject: [PATCH 2/4] drop Python 3.5 support, declare 3.9 and 3.10 support --- setup.py | 3 ++- tox.ini | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 16a2dc8..db92a8e 100755 --- a/setup.py +++ b/setup.py @@ -30,10 +30,11 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', '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 :: Implementation :: CPython', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Scientific/Engineering :: Information Analysis', diff --git a/tox.ini b/tox.ini index 6f12e09..0935529 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,14 @@ [tox] -envlist = py27,py35,py35-locale,py36,py37,py38 +envlist = py27,py36,py36-locale,py37,py38,py39,py310 [testenv] +changedir = {envtmpdir} deps = pytest commands= - python setup.py install - py.test [] + py.test {toxinidir}/tests -[testenv:py35-locale] -basepython = python3.5 +[testenv:py36-locale] +basepython = python3.6 setenv = LC_ALL=C From d43d887b874bd0dc7e127784bf6c9f535eab79e3 Mon Sep 17 00:00:00 2001 From: Mikhail Korobov Date: Mon, 30 May 2022 00:49:37 +0500 Subject: [PATCH 3/4] try enabling github actions --- .github/workflows/tests.yml | 42 +++++++++++++++++++++++++++++++++++++ tox.ini | 13 ++++++++++-- 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..0e53464 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: tests + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + tests: + name: "Python ${{ matrix.python-version }} ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + + strategy: + matrix: + python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"] + os: [ubuntu-latest, macos-latest, windows-latest] + exclude: + - os: windows-latest + python-version: "2.7" + fail-fast: false + + steps: + - uses: "actions/checkout@v2" + with: + submodules: true + - uses: "actions/setup-python@v2" + with: + python-version: "${{ matrix.python-version }}" + - name: "Install dependencies" + run: | + python -VV + python -m site + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade virtualenv tox tox-gh-actions + python -m pip install --upgrade cython + + - name: "Rebuild CPP files using Cython" + run: "./update_cpp.sh" + + - name: "Run tox targets for ${{ matrix.python-version }}" + run: "python -m tox" \ No newline at end of file diff --git a/tox.ini b/tox.ini index 0935529..4028884 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,21 @@ [tox] envlist = py27,py36,py36-locale,py37,py38,py39,py310 +[gh-actions] +python = + 2.7: py27 + 3.6: py36-locale + 3.7: py37 + 3.8: py38 + 3.9: py39 + 3.10: py310 + [testenv] changedir = {envtmpdir} deps = pytest -commands= - py.test {toxinidir}/tests +commands = + py.test {toxinidir}/tests {posargs} [testenv:py36-locale] basepython = python3.6 From a656feecf9ddb810de49d557f94374fb2e7f9916 Mon Sep 17 00:00:00 2001 From: Mikhail Korobov Date: Mon, 30 May 2022 00:58:39 +0500 Subject: [PATCH 4/4] trying to make update_cpp.sh work on Windows --- update_cpp.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/update_cpp.sh b/update_cpp.sh index 7f771a7..8f6508a 100755 --- a/update_cpp.sh +++ b/update_cpp.sh @@ -1,2 +1 @@ -#!/bin/sh cython src/*.pyx src/*.pxd -a --cplus -2