From 2882327c8422d099f1601facac2f555f20fb824d Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:34:03 +0200 Subject: [PATCH 01/11] fixed tox issues: * removed pypy env as it just duplicats the default testenv * added github action --- .github/workflows/python-package.yaml | 25 +++++++++++++++++++++++++ tox.ini | 9 +-------- 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/python-package.yaml diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml new file mode 100644 index 0000000..68555fa --- /dev/null +++ b/.github/workflows/python-package.yaml @@ -0,0 +1,25 @@ +name: Python package + +on: + - push + - pull_request + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python: [2.7, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install Tox and any other packages + run: pip install tox + - name: Run Tox + # Run tox using the version of Python in `PATH` + run: tox -e py diff --git a/tox.ini b/tox.ini index 8a63b5b..3465418 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,5 @@ [tox] +envlist=py24,py25,py26,py27,py31,py32,py33,py34,py35,py36,py37,py38,py39,pypy skipsdist=true [testenv] @@ -15,11 +16,3 @@ deps=flake8 commands = {envpython} -V flake8 speedtest.py - -[testenv:pypy] -commands = - pypy -V - pypy -m compileall speedtest.py - pypy speedtest.py - pypy speedtest.py --source 172.17.0.1 - pypy tests/scripts/source.py From e44a4d629a3c3f6c1ad64d34ea2db165fa655664 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:36:51 +0200 Subject: [PATCH 02/11] added remaining python versions to test against --- .github/workflows/python-package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index 68555fa..cb1cfa9 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [2.7, 3.7, 3.8] + python: [2.4, 2.5, 2.6, 2.7, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, pypy] steps: - uses: actions/checkout@v2 From 83a6ae091c124007a6a168def980ef6baad0854d Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:40:34 +0200 Subject: [PATCH 03/11] removed ancient versions --- .github/workflows/python-package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index cb1cfa9..579873a 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [2.4, 2.5, 2.6, 2.7, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, pypy] + python: [2.7, 3.6, 3.7, 3.8, pypy] steps: - uses: actions/checkout@v2 From 55869d5b59d46e01d1d5427225b9741337f57bca Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:42:44 +0200 Subject: [PATCH 04/11] removed even more python versions --- .github/workflows/python-package.yaml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index 579873a..f41c0aa 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [2.7, 3.6, 3.7, 3.8, pypy] + python: [2.7, 3.6, 3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v2 diff --git a/tox.ini b/tox.ini index 3465418..114e22f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py24,py25,py26,py27,py31,py32,py33,py34,py35,py36,py37,py38,py39,pypy +envlist=py27,py36,py37,py38,py39,pypy skipsdist=true [testenv] From a3ae54078b28286a6d665e2666d78a7fd2085138 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:43:53 +0200 Subject: [PATCH 05/11] don't fail fast anymore --- .github/workflows/python-package.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index f41c0aa..5f68eb9 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -9,6 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python: [2.7, 3.6, 3.7, 3.8, 3.9, 3.10] From bacb2c0625100e3cd526c954a1f37e2d80c0a360 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:45:53 +0200 Subject: [PATCH 06/11] added py35 --- .github/workflows/python-package.yaml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index 5f68eb9..2f125a9 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python: [2.7, 3.6, 3.7, 3.8, 3.9, 3.10] + python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v2 diff --git a/tox.ini b/tox.ini index 114e22f..3ac6c44 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py27,py36,py37,py38,py39,pypy +envlist=py27,py35,py36,py37,py38,py39,py310,pypy skipsdist=true [testenv] From 16f2db66233790cc18ad5991cdc814f78e342bac Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:49:46 +0200 Subject: [PATCH 07/11] added flake to tests --- .github/workflows/python-package.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index 2f125a9..7c433ba 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -24,3 +24,5 @@ jobs: - name: Run Tox # Run tox using the version of Python in `PATH` run: tox -e py + - name: Run flake8 + run: tox -e flake8 From 43b755c47c0de760d5abc2b1fbf654bf19a257fe Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:52:32 +0200 Subject: [PATCH 08/11] m/ --- .github/workflows/python-package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index 7c433ba..61c0514 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10] + python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10"] steps: - uses: actions/checkout@v2 From 22b51ebf33e9e20f41c26b4c26f6d8035645969c Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:56:20 +0200 Subject: [PATCH 09/11] removed unsupported python versions --- .github/workflows/python-package.yaml | 9 ++++++++- setup.py | 10 +++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index 61c0514..95b7ee2 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -11,7 +11,14 @@ jobs: strategy: fail-fast: false matrix: - python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10"] + python: + - "2.7" + - "3.5" + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index a617be4..752b0b0 100644 --- a/setup.py +++ b/setup.py @@ -80,17 +80,13 @@ setup( 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.4', - 'Programming Language :: Python :: 2.5', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.1', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', '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', ] ) From baef9f0cb7419185b778b1bcdccc829dad89c850 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 10:58:48 +0200 Subject: [PATCH 10/11] fixed flake8 tests (python2 vs -3) --- speedtest.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/speedtest.py b/speedtest.py index a33296d..381c732 100755 --- a/speedtest.py +++ b/speedtest.py @@ -217,12 +217,12 @@ else: return def write(data): - if not isinstance(data, basestring): + if not isinstance(data, basestring): # noqa data = str(data) # If the file has an encoding, encode unicode with it. encoding = 'utf8' # Always trust UTF-8 for output - if (isinstance(fp, file) and - isinstance(data, unicode) and + if (isinstance(fp, file) and # noqa + isinstance(data, unicode) and # noqa encoding is not None): errors = getattr(fp, "errors", None) if errors is None: @@ -233,13 +233,13 @@ else: want_unicode = False sep = kwargs.pop("sep", None) if sep is not None: - if isinstance(sep, unicode): + if isinstance(sep, unicode): # noqa want_unicode = True elif not isinstance(sep, str): raise TypeError("sep must be None or a string") end = kwargs.pop("end", None) if end is not None: - if isinstance(end, unicode): + if isinstance(end, unicode): # noqa want_unicode = True elif not isinstance(end, str): raise TypeError("end must be None or a string") @@ -247,12 +247,12 @@ else: raise TypeError("invalid keyword arguments to print()") if not want_unicode: for arg in args: - if isinstance(arg, unicode): + if isinstance(arg, unicode): # noqa want_unicode = True break if want_unicode: - newline = unicode("\n") - space = unicode(" ") + newline = unicode("\n") # noqa + space = unicode(" ") # noqa else: newline = "\n" space = " " From ff5a7ce7144fa0d228923a197932fb3c6944263d Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 23 Jun 2021 11:00:48 +0200 Subject: [PATCH 11/11] removed py310 --- .github/workflows/python-package.yaml | 1 - setup.py | 1 - tox.ini | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yaml b/.github/workflows/python-package.yaml index 95b7ee2..c56b1fd 100644 --- a/.github/workflows/python-package.yaml +++ b/.github/workflows/python-package.yaml @@ -18,7 +18,6 @@ jobs: - "3.7" - "3.8" - "3.9" - - "3.10" steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index 752b0b0..591f66d 100644 --- a/setup.py +++ b/setup.py @@ -87,6 +87,5 @@ setup( 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', ] ) diff --git a/tox.ini b/tox.ini index 3ac6c44..3ac4844 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py27,py35,py36,py37,py38,py39,py310,pypy +envlist=py27,py35,py36,py37,py38,py39,pypy skipsdist=true [testenv]