Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python updates and security fixes #136

Merged
merged 17 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -62,16 +66,16 @@ 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:
- uses: actions/checkout@v2
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 }}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
==================

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 4 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pyramid>=1.10,<2
webob
requests
argcomplete
pytz
lxml
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-r requirements.txt
pytest>=5.0.0
pytest-cov
WebTest
Expand All @@ -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
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__'],
Expand All @@ -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",
],
Expand All @@ -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]"
Expand Down
Loading