From 37b68d3278d6cbb6812ece561b0eb1d88d591d24 Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Tue, 16 Mar 2021 09:59:47 +0100 Subject: [PATCH 1/4] - add support for Python 3.9 and parallelized tox runs --- .github/workflows/testing.yml | 3 +++ .gitignore | 2 ++ news/164.feature | 2 ++ setup.py | 2 ++ src/plone/recipe/zope2instance/ctl.py | 3 ++- tox.ini | 7 +++++++ 6 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 news/164.feature diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b6ab5f87..436bd3b6 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -11,6 +11,7 @@ jobs: - "3.6" - "3.7" - "3.8" + - "3.9" zope-version: - "zope-4" - "zope-5" @@ -22,6 +23,8 @@ jobs: python-version: "2.7" - zope-version: "zope-5" python-version: "2.7" + - zope-version: "zope-4" + python-version: "3.9" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index 7c98ef7f..3ae8b35d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,9 @@ parts pip-selfcheck.json pyvenv.cfg /.coverage +/.coverage.* /.installed.cfg /.tox /coverage.xml +/default.profraw /htmlcov diff --git a/news/164.feature b/news/164.feature new file mode 100644 index 00000000..ea72001b --- /dev/null +++ b/news/164.feature @@ -0,0 +1,2 @@ +Added support for Python 3.9 +[dataflake] diff --git a/setup.py b/setup.py index 6dbc7ab3..7f53da68 100644 --- a/setup.py +++ b/setup.py @@ -34,12 +34,14 @@ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", ], packages=find_packages('src'), include_package_data=True, package_dir={'': 'src'}, namespace_packages=['plone', 'plone.recipe'], + python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*', install_requires=[ 'zc.buildout', 'setuptools', diff --git a/src/plone/recipe/zope2instance/ctl.py b/src/plone/recipe/zope2instance/ctl.py index 35ecd90d..75ae39c0 100644 --- a/src/plone/recipe/zope2instance/ctl.py +++ b/src/plone/recipe/zope2instance/ctl.py @@ -955,7 +955,8 @@ def main(args=None): if (os.environ.get('PLONE_ENV')): PLONE_ENV = os.environ.get('PLONE_ENV') - load_dotenv(os.path.join(options.directory, '..', '..', '.env.{}'.format(PLONE_ENV))) + load_dotenv(os.path.join(options.directory, + '..', '..', '.env.{}'.format(PLONE_ENV))) # Run the right command depending on whether we have ZServer options.interpreter = os.path.join(options.directory, 'bin', 'interpreter') diff --git a/tox.ini b/tox.ini index c2cf9175..8381dbaf 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ envlist = py36, py37, py38, + py39, flake8, coverage @@ -25,6 +26,12 @@ setenv = basepython = python2.7 skip_install = true deps = coverage +depends = + py27 + py36 + py37 + py38 + py39 setenv = COVERAGE_FILE=.coverage commands = From 68bb2e64c26c4a5a59d8dff58ad83bb26061fca5 Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Tue, 16 Mar 2021 10:07:33 +0100 Subject: [PATCH 2/4] - install wheel during test runs to minimize self-compiling --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 436bd3b6..67bc50cf 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -42,7 +42,7 @@ jobs: ${{ runner.os }}-test - name: Install dependencies run: | - pip install -U pip + pip install -U pip wheel pip install -r requirements-testing-${{ matrix.zope-version }}.txt - name: Run Tests run: | From b46a4fca448c392f48c9208c95dfb768319cc7ed Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Tue, 16 Mar 2021 16:13:30 +0100 Subject: [PATCH 3/4] - restore support for Python 3.5, which is needed for full Zope 4 support --- .github/workflows/testing.yml | 3 +++ README.rst | 5 +++-- news/164.feature | 2 +- setup.py | 1 + tox.ini | 2 ++ 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 67bc50cf..913e23d8 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -8,6 +8,7 @@ jobs: matrix: python-version: - "2.7" + - "3.5" - "3.6" - "3.7" - "3.8" @@ -23,6 +24,8 @@ jobs: python-version: "2.7" - zope-version: "zope-5" python-version: "2.7" + - zope-version: "zope-5" + python-version: "3.5" - zope-version: "zope-4" python-version: "3.9" runs-on: ${{ matrix.os }} diff --git a/README.rst b/README.rst index 6597ce9e..592523cd 100644 --- a/README.rst +++ b/README.rst @@ -27,8 +27,9 @@ You can use it with a part like this:: zcml = my.distribution .. ATTENTION:: - This release is targeted at Plone 5.2, ZODB 5, Zope 4, and Python 2.7, 3.6 or 3.7. - If you are using this recipe with earlier versions, you should use one of the releases from the 4.x series. + This release is targeted at Plone 5.2, ZODB 5, Zope 4 and Zope 5, and + Python 2.7 and 3.5-3.9. If you are using this recipe with earlier versions, + you should use one of the releases from the 4.x series. .. contents:: **Contents** diff --git a/news/164.feature b/news/164.feature index ea72001b..c4ef3af3 100644 --- a/news/164.feature +++ b/news/164.feature @@ -1,2 +1,2 @@ -Added support for Python 3.9 +Added support for Python 3.9 and restored support for Python 3.5 (needed for Zope 4) [dataflake] diff --git a/setup.py b/setup.py index 7f53da68..cd647d81 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ "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", diff --git a/tox.ini b/tox.ini index 8381dbaf..fa62b552 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = py27, + py35, py36, py37, py38, @@ -28,6 +29,7 @@ skip_install = true deps = coverage depends = py27 + py35 py36 py37 py38 From 1ce67814ddca1bfaf8d00726b1fa7bc6460d0faa Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Tue, 16 Mar 2021 16:44:36 +0100 Subject: [PATCH 4/4] - remove GitHub Actions test for Python 3.5 as experiment --- .github/workflows/testing.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 913e23d8..67bc50cf 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -8,7 +8,6 @@ jobs: matrix: python-version: - "2.7" - - "3.5" - "3.6" - "3.7" - "3.8" @@ -24,8 +23,6 @@ jobs: python-version: "2.7" - zope-version: "zope-5" python-version: "2.7" - - zope-version: "zope-5" - python-version: "3.5" - zope-version: "zope-4" python-version: "3.9" runs-on: ${{ matrix.os }}