Compare commits

...

1 Commits
1.11.1 ... main

Author SHA1 Message Date
Yurii Serhiichuk a38933d7ab
Drop EOL Python 3.8 support (#249)
* chore: add missing changelog items

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* chore: drop Python 3.8 support

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* chore: add a changelog item on Python 3.8 removal

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* chore: remove mypy-constrains reference as we don't need it anymore

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* chore: Update pre-commit check versions.

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* chore: fix isort pre-commit

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* chore: Use Python 3.12 as base version

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>

---------

Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-06-02 14:58:00 -04:00
9 changed files with 26 additions and 40 deletions

View File

@ -11,7 +11,7 @@ jobs:
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.12'
cache: 'pip' cache: 'pip'
cache-dependency-path: 'requirements/*.txt' cache-dependency-path: 'requirements/*.txt'
- name: Install dev dependencies - name: Install dev dependencies
@ -22,7 +22,7 @@ jobs:
test: test:
strategy: strategy:
matrix: matrix:
python: ['3.8', '3.9', '3.10', '3.11'] python: ['3.9', '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View File

@ -10,7 +10,7 @@ on:
jobs: jobs:
build_dist: build_dist:
name: Build source distribution name: Build source distribution
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -27,7 +27,7 @@ jobs:
- name: Check metadata - name: Check metadata
run: pipx run twine check dist/* run: pipx run twine check dist/*
publish: publish:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
if: github.event_name == 'push' if: github.event_name == 'push'
needs: [ build_dist ] needs: [ build_dist ]
steps: steps:
@ -35,9 +35,9 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.12"
cache: 'pip' cache: 'pip'
- name: Install build dependencies - name: Install build dependencies
run: pip install -U setuptools wheel build run: pip install -U setuptools wheel build

View File

@ -1,22 +1,22 @@
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 rev: v5.0.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-toml - id: check-toml
- repo: https://github.com/pycqa/isort - repo: https://github.com/pycqa/isort
rev: 5.13.2 rev: 6.0.1
hooks: hooks:
- id: isort - id: isort
args: [ "--profile", "black", "--filter-files" ] args: [ "--profile", "black", "--filter-files" ]
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 24.4.2 rev: 25.1.0
hooks: hooks:
- id: black - id: black
language_version: python3.11 language_version: python3.11
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0 rev: v1.16.0
hooks: hooks:
- id: mypy - id: mypy
files: ^(cloudevents/) files: ^(cloudevents/)

View File

@ -6,10 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [1.12.0]
### Changed
- Dropped Python3.8 support while it has reached EOL. ([])
## [1.11.1] ## [1.11.1]
### Fixed ### Fixed
- Kafka `conversion` marshaller and unmarshaller typings ([#240]) - Kafka `conversion` marshaller and unmarshaller typings ([#240])
- Improved public API type annotations and fixed unit test type errors ([#248])
## [1.11.0] ## [1.11.0]
@ -293,3 +300,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#235]: https://github.com/cloudevents/sdk-python/pull/235 [#235]: https://github.com/cloudevents/sdk-python/pull/235
[#236]: https://github.com/cloudevents/sdk-python/pull/236 [#236]: https://github.com/cloudevents/sdk-python/pull/236
[#240]: https://github.com/cloudevents/sdk-python/pull/240 [#240]: https://github.com/cloudevents/sdk-python/pull/240
[#248]: https://github.com/cloudevents/sdk-python/pull/248

View File

@ -12,4 +12,4 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
__version__ = "1.11.1" __version__ = "1.12.0"

View File

@ -1,10 +0,0 @@
# This is a requirements constraint file, see:
# https://pip.pypa.io/en/stable/user_guide/#constraints-files
# sanic stopped supporting 3.8 in 24.12:
# https://sanic.dev/en/release-notes/changelog.html#version-24120-
sanic<24.12.0 ; python_version == '3.8'
# pydantic stopped supporting 3.8 in 2.11.0:
# https://github.com/pydantic/pydantic/releases/tag/v2.11.0
pydantic<2.11.0 ; python_version == '3.8'

View File

@ -1,9 +0,0 @@
# This is a requirements constraint file, see:
# https://pip.pypa.io/en/stable/user_guide/#constraints-files
# Because we run mypy in python 3.8 compatibility mode, dependencies must be
# versions that support 3.8.
# pydantic stopped supporting 3.8 in 2.11.0:
# https://github.com/pydantic/pydantic/releases/tag/v2.11.0
pydantic<2.11.0

View File

@ -65,10 +65,11 @@ if __name__ == "__main__":
"Programming Language :: Python", "Programming Language :: Python",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed", "Typing :: Typed",
], ],
keywords="CloudEvents Eventing Serverless", keywords="CloudEvents Eventing Serverless",

14
tox.ini
View File

@ -1,5 +1,5 @@
[tox] [tox]
envlist = py{38,39,310,311,312},lint,mypy,mypy-samples-{image,json} envlist = py{39,310,311,312,313},lint,mypy,mypy-samples-{image,json}
skipsdist = True skipsdist = True
[testenv] [testenv]
@ -8,12 +8,11 @@ deps =
-r{toxinidir}/requirements/test.txt -r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/publish.txt -r{toxinidir}/requirements/publish.txt
setenv = setenv =
PIP_CONSTRAINT={toxinidir}/requirements/constraints.txt
PYTESTARGS = -v -s --tb=long --cov=cloudevents --cov-report term-missing --cov-fail-under=95 PYTESTARGS = -v -s --tb=long --cov=cloudevents --cov-report term-missing --cov-fail-under=95
commands = pytest {env:PYTESTARGS} {posargs} commands = pytest {env:PYTESTARGS} {posargs}
[testenv:reformat] [testenv:reformat]
basepython = python3.11 basepython = python3.12
deps = deps =
black black
isort isort
@ -22,7 +21,7 @@ commands =
isort cloudevents samples isort cloudevents samples
[testenv:lint] [testenv:lint]
basepython = python3.11 basepython = python3.12
deps = deps =
black black
isort isort
@ -33,9 +32,7 @@ commands =
flake8 cloudevents samples --ignore W503,E731 --extend-ignore E203 --max-line-length 88 flake8 cloudevents samples --ignore W503,E731 --extend-ignore E203 --max-line-length 88
[testenv:mypy] [testenv:mypy]
basepython = python3.11 basepython = python3.12
setenv =
PIP_CONSTRAINT={toxinidir}/requirements/mypy-constraints.txt
deps = deps =
-r{toxinidir}/requirements/mypy.txt -r{toxinidir}/requirements/mypy.txt
# mypy needs test dependencies to check test modules # mypy needs test dependencies to check test modules
@ -43,9 +40,8 @@ deps =
commands = mypy cloudevents commands = mypy cloudevents
[testenv:mypy-samples-{image,json}] [testenv:mypy-samples-{image,json}]
basepython = python3.11 basepython = python3.12
setenv = setenv =
PIP_CONSTRAINT={toxinidir}/requirements/mypy-constraints.txt
mypy-samples-image: SAMPLE_DIR={toxinidir}/samples/http-image-cloudevents mypy-samples-image: SAMPLE_DIR={toxinidir}/samples/http-image-cloudevents
mypy-samples-json: SAMPLE_DIR={toxinidir}/samples/http-json-cloudevents mypy-samples-json: SAMPLE_DIR={toxinidir}/samples/http-json-cloudevents
deps = deps =