diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9890192..4644c76 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,27 +7,31 @@ on: - release - workflow_dispatch +# cancel the current workflow if another commit was pushed on the same PR or reference +# uses the GitHub workflow name to avoid collision with other workflows running on the same PR/reference +concurrency: + group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" + cancel-in-progress: true + jobs: # see: https://github.com/fkirc/skip-duplicate-actions skip_duplicate: continue-on-error: true runs-on: ubuntu-latest outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} + should_skip: ${{ steps.skip_duplicate.outputs.should_skip && ! contains(github.ref, 'refs/tags') }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@master with: - concurrent_skipping: "same_content_newer" + concurrent_skipping: "same_content" skip_after_successful_duplicate: "true" do_not_skip: '["pull_request", "workflow_dispatch", "schedule", "release"]' # see: https://github.com/actions/setup-python tests: - # FIXME: https://github.com/fkirc/skip-duplicate-actions/issues/90 - # disable for now because the tests never run... somehow similar config works in Magpie... - # needs: skip_duplicate - # if: ${{ needs.skip_duplicate.outputs.should_skip != 'true' }} + needs: skip_duplicate + if: ${{ needs.skip_duplicate.outputs.should_skip != 'true' }} runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.allow-failure }} env: @@ -42,7 +46,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] allow-failure: [false] test-case: [test-local] include: @@ -62,8 +66,8 @@ jobs: allow-failure: false test-case: docker-test # deprecated versions - - os: ubuntu-20.04 - python-version: 3.6 + - os: ubuntu-latest + python-version: 3.8 # EOL 2024-10 allow-failure: false test-case: test-local steps: @@ -71,7 +75,7 @@ jobs: with: fetch-depth: "0" - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 if: ${{ matrix.python-version != 'None' }} with: python-version: ${{ matrix.python-version }} @@ -83,10 +87,6 @@ jobs: - name: Display Packages if: ${{ matrix.python-version != 'None' }} run: pip freeze - #- name: Setup Environment Variables - # uses: c-py/action-dotenv-to-setenv@v2 - # with: - # env-file: ./ci/weaver.env - name: Display Environment Variables run: | hash -r @@ -97,9 +97,10 @@ jobs: if: ${{ matrix.python-version == 'None' }} run: make docker-stop - name: Upload coverage report - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v4.0.1 if: ${{ success() && matrix.test-case == 'coverage' }} with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage/coverage.xml fail_ci_if_error: true verbose: true @@ -114,9 +115,9 @@ jobs: with: fetch-depth: "0" - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: "3.7" + python-version: "3.11" - name: Build Distribution Package run: make develop dist - name: Push Package to PyPi diff --git a/CHANGES.rst b/CHANGES.rst index f0a386a..b304af5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,13 @@ Changes Unreleased ========== +Changes: + +* Drop Python 3.6, 3.7 support. +* Deprecate Python 3.8 (EOL 2024-10 planed, supported until then). +* Add Python 3.12 support. +* Update docker with latest ``python:3.11-alpine3.20`` base. + 0.9.0 (2023-02-08) ================== diff --git a/Dockerfile b/Dockerfile index bd64a2c..2f69e95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # vim:set ft=dockerfile: -FROM python:3.11-alpine3.17 +FROM python:3.11-alpine3.20 LABEL Description="Twitcher" Vendor="Birdhouse" Maintainer="https://github.com/bird-house/twitcher" # Configure hostname and ports for services diff --git a/requirements.txt b/requirements.txt index ef41545..060a622 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ pyramid>=1.10,<2 webob -requests argcomplete pytz lxml @@ -30,9 +29,9 @@ zope.sqlalchemy>=1.3,!=1.4.* # oauth2 pyramid_oauthlib>=0.4.1 oauthlib<3 +requests>=2.32.2 requests_oauthlib<1.2.0 PyJWT>=2 -# typing extension required for TypedDict -typing_extensions; python_version < "3.8" -setuptools<60; python_version <= "3.6" # pyup: ignore -setuptools>=65.5.1; python_version >= "3.7" +setuptools>=71.0.3 +urllib3>=2.2.2 +zipp>=3.19.1 diff --git a/requirements_dev.txt b/requirements_dev.txt index 3e4cdb8..8893b49 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,3 +1,4 @@ +-r requirements.txt pytest>=5.0.0 pytest-cov WebTest @@ -7,4 +8,4 @@ nbsphinx bump2version twine mock -tornado>=6.3.3; python_version >= "3.8" # not directly required, pinned by Snyk to avoid a vulnerability +tornado>=6.3.3 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/setup.py b/setup.py index c2c2075..6537a70 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,10 @@ exec(f.read(), about) reqs = [line.strip() for line in open('requirements.txt')] -dev_reqs = [line.strip() for line in open('requirements_dev.txt')] +dev_reqs = [ + line.strip() for line in open('requirements_dev.txt') + if not line.startswith("-r ") +] setup(name='pyramid_twitcher', version=about['__version__'], @@ -24,12 +27,11 @@ "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", - "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 :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", ], @@ -42,7 +44,7 @@ include_package_data=True, zip_safe=False, test_suite='twitcher', - python_requires=">=3.6, <4", + python_requires=">=3.8, <4", install_requires=reqs, extras_require={ "dev": dev_reqs, # pip install ".[dev]"