Skip to content

Commit c131895

Browse files
committed
chore!: drop python 3.9 add 3.14
Add support for Python 3.14, and drop support for Python 3.9 as it has reached its end-of-life. BREAKING CHANGE: Python 3.9 is no longer supported. Signed-off-by: JP-Ellis <[email protected]>
1 parent 0e3942f commit c131895

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+121
-93
lines changed

.github/workflows/build-cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2020

2121
env:
22-
STABLE_PYTHON_VERSION: '313'
22+
STABLE_PYTHON_VERSION: '310'
2323
HATCH_VERBOSE: '1'
2424
FORCE_COLOR: '1'
2525
CIBW_BUILD_FRONTEND: build

.github/workflows/build-ffi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2020

2121
env:
22-
STABLE_PYTHON_VERSION: '39'
22+
STABLE_PYTHON_VERSION: '310'
2323
HATCH_VERBOSE: '1'
2424
FORCE_COLOR: '1'
2525
CIBW_BUILD_FRONTEND: build

.github/workflows/test.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,11 @@ jobs:
6262
- ubuntu-latest
6363
- windows-latest
6464
python-version:
65-
- '3.9'
6665
- '3.10'
6766
- '3.11'
6867
- '3.12'
6968
- '3.13'
70-
# Python 3.9 aren't supported on macos-latest (ARM)
71-
exclude:
72-
- os: macos-latest
73-
python-version: '3.9'
74-
include:
75-
- os: macos-13
76-
python-version: '3.9'
69+
- '3.14'
7770

7871
steps:
7972
- name: Checkout code
@@ -144,18 +137,11 @@ jobs:
144137
- ubuntu-latest
145138
- windows-latest
146139
python-version:
147-
- '3.9'
148140
- '3.10'
149141
- '3.11'
150142
- '3.12'
151143
- '3.13'
152-
# Python 3.9 aren't supported on macos-latest (ARM)
153-
exclude:
154-
- os: macos-latest
155-
python-version: '3.9'
156-
include:
157-
- os: macos-13
158-
python-version: '3.9'
144+
- '3.14'
159145

160146
steps:
161147
- name: Checkout code

conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
only be defined in this file.
77
"""
88

9+
from __future__ import annotations
10+
911
import pytest
1012

1113

docs/scripts/other.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
continue silently.
1515
"""
1616

17+
from __future__ import annotations
18+
1719
import subprocess
1820
from pathlib import Path
1921
from typing import TYPE_CHECKING
@@ -77,7 +79,7 @@ def is_binary(buffer: bytes) -> bool:
7779
if str(dest_path) in EDITOR.files:
7880
continue
7981

80-
fi: "io.IOBase"
82+
fi: io.IOBase
8183
with Path(source_path).open("rb") as fi:
8284
buf = fi.read(2048)
8385

examples/http/aiohttp_and_flask/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Use the above links to view additional documentation within.
3636

3737
## Prerequisites
3838

39-
- Python 3.9 or higher
39+
- Python 3.10 or higher
4040
- A dependency manager ([uv](https://docs.astral.sh/uv/) recommended, [pip](https://pip.pypa.io/en/stable/) also works)
4141

4242
## Running the Example

examples/http/aiohttp_and_flask/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name = "example-aiohttp-and-flask"
55
description = "Example of using an aiohttp client and Flask server with Pact Python"
66

77
dependencies = ["aiohttp~=3.0", "flask~=3.0", "typing-extensions~=4.0"]
8-
requires-python = ">=3.9"
8+
requires-python = ">=3.10"
99
version = "1.0.0"
1010

1111
[dependency-groups]

examples/http/aiohttp_and_flask/test_provider.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131

3232
if TYPE_CHECKING:
3333
from pathlib import Path
34-
35-
from typing_extensions import TypeAlias
34+
from typing import TypeAlias
3635

3736
ACTION_TYPE: TypeAlias = Literal["setup", "teardown"]
3837

examples/http/requests_and_fastapi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This example is intended for software engineers and engineering managers who wan
4545

4646
## Prerequisites
4747

48-
- Python 3.9 or higher
48+
- Python 3.10 or higher
4949
- A dependency manager ([uv](https://docs.astral.sh/uv/) recommended, [pip](https://pip.pypa.io/en/stable/) also works)
5050

5151
## Running the Example

examples/http/requests_and_fastapi/provider.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
import logging
3232
from datetime import datetime, timezone
33-
from typing import Any, ClassVar, Optional
33+
from typing import Any, ClassVar
3434

3535
from fastapi import FastAPI, HTTPException, status
3636
from pydantic import BaseModel, Field, field_validator
@@ -53,8 +53,8 @@ class User(BaseModel):
5353
id: int
5454
name: str
5555
created_on: datetime = Field(default_factory=lambda: datetime.now(tz=timezone.utc))
56-
email: Optional[str] = None
57-
ip_address: Optional[str] = None
56+
email: str | None = None
57+
ip_address: str | None = None
5858
hobbies: list[str] = Field(default_factory=list)
5959
admin: bool = False
6060

0 commit comments

Comments
 (0)