Skip to content

Commit f4da150

Browse files
committed
Drop support for Python 3.9
1 parent bfcbabc commit f4da150

File tree

11 files changed

+24
-211
lines changed

11 files changed

+24
-211
lines changed

.github/workflows/docs_publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- published
66
workflow_dispatch:
77
env:
8-
PYTHON_VERSION: "3.12"
8+
PYTHON_VERSION: "3.13"
99
jobs:
1010
deploy:
1111
runs-on: ubuntu-latest

.github/workflows/nightly_testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
# Set with UTC time
66
- cron: "0 5 * * *"
77
env:
8-
PYTHON_VERSION: "3.12"
8+
PYTHON_VERSION: "3.13"
99
jobs:
1010
random-test-order:
1111
strategy:

.github/workflows/pypi_publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
types:
55
- published
66
env:
7-
PYTHON_VERSION: "3.12"
7+
PYTHON_VERSION: "3.13"
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest

.github/workflows/testing.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
pull_request:
88
env:
9-
PYTHON_VERSION: "3.9"
9+
PYTHON_VERSION: "3.10"
1010
jobs:
1111
linting:
1212
runs-on: ubuntu-latest
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
35+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
3636
runs-on: ubuntu-latest
3737
steps:
3838
- uses: actions/checkout@v5
@@ -61,7 +61,7 @@ jobs:
6161
strategy:
6262
fail-fast: false
6363
matrix:
64-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
64+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
6565
runs-on: ubuntu-latest
6666
steps:
6767
- uses: actions/checkout@v5
@@ -79,7 +79,6 @@ jobs:
7979
- name: Install Dependencies
8080
run: just install
8181
- name: Install truststore
82-
if: ${{ ! startsWith(matrix.python-version, '3.9') }}
8382
run: uv pip install truststore
8483
- name: Install ssl requirements
8584
run: |
@@ -102,7 +101,7 @@ jobs:
102101
strategy:
103102
fail-fast: false
104103
matrix:
105-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
104+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
106105
runs-on: ubuntu-latest
107106
steps:
108107
- uses: actions/checkout@v5
@@ -131,7 +130,7 @@ jobs:
131130
strategy:
132131
fail-fast: false
133132
matrix:
134-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
133+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
135134
runs-on: ubuntu-latest
136135
steps:
137136
- uses: actions/checkout@v5
@@ -149,7 +148,6 @@ jobs:
149148
- name: Install Dependencies
150149
run: just install
151150
- name: Install truststore
152-
if: ${{ ! startsWith(matrix.python-version, '3.9') }}
153151
run: uv pip install truststore
154152
- name: Install ssl requirements
155153
run: |
@@ -171,7 +169,7 @@ jobs:
171169
strategy:
172170
fail-fast: false
173171
matrix:
174-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
172+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
175173
runs-on: ubuntu-latest
176174
steps:
177175
- uses: actions/checkout@v5

meilisearch_python_sdk/_http_requests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from __future__ import annotations
22

33
import gzip
4+
from collections.abc import Callable
45
from functools import lru_cache
5-
from typing import Any, Callable
6+
from typing import Any
67

78
from httpx import (
89
AsyncClient,

meilisearch_python_sdk/decorators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from __future__ import annotations
22

33
import asyncio
4+
from collections.abc import Callable
45
from functools import wraps
5-
from typing import Any, Callable, NamedTuple
6+
from typing import Any, NamedTuple
67

78
from meilisearch_python_sdk import AsyncClient, Client
89
from meilisearch_python_sdk._utils import use_task_groups
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from datetime import datetime
2-
from typing import Union
32

43
from camel_converter.pydantic_base import CamelBase
54

65

76
class Version(CamelBase):
87
commit_sha: str
9-
commit_date: Union[datetime, str]
8+
commit_date: datetime | str
109
pkg_version: str

meilisearch_python_sdk/types.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
from __future__ import annotations
22

33
from collections.abc import MutableMapping
4-
from typing import TYPE_CHECKING, Any, Union
4+
from typing import Any, TypeAlias
55

6-
if TYPE_CHECKING: # pragma: no cover
7-
import sys
8-
9-
if sys.version_info >= (3, 10):
10-
from typing import TypeAlias
11-
else:
12-
from typing_extensions import TypeAlias
13-
14-
Filter: TypeAlias = Union[str, list[Union[str, list[str]]]]
6+
Filter: TypeAlias = str | list[str | list[str]]
157
JsonDict: TypeAlias = dict[str, Any]
168
JsonMapping: TypeAlias = MutableMapping[str, Any]

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ build-backend = "hatchling.build"
66
name = "meilisearch-python-sdk"
77
description = "A Python client providing both async and sync support for the Meilisearch API"
88
authors = [ { name = "Paul Sanders", email = "[email protected]" } ]
9-
requires-python = ">=3.9"
9+
requires-python = ">=3.10"
1010
license = { file = "LICENSE" }
1111
readme = "README.md"
1212
keywords = ["meilisearch", "async", "python", "client", "sdk"]
1313
classifiers=[
1414
"Development Status :: 5 - Production/Stable",
1515
"Intended Audience :: Developers",
16-
"Programming Language :: Python :: 3.9",
1716
"Programming Language :: Python :: 3.10",
1817
"Programming Language :: Python :: 3.11",
1918
"Programming Language :: Python :: 3.12",
@@ -27,8 +26,6 @@ dynamic = ["version"]
2726
dependencies = [
2827
"aiofiles>=0.7",
2928
"camel-converter[pydantic]>=1.0.0",
30-
# allows pydantic to use pipe instead of Union
31-
"eval-type-backport>=0.2.0; python_version < '3.10'",
3229
"httpx[http2]>=0.17",
3330
"pydantic>=2.0.0",
3431
"PyJWT>=2.3.0",
@@ -88,7 +85,7 @@ ignore_missing_imports = true
8885

8986
[tool.ruff]
9087
line-length = 100
91-
target-version = "py39"
88+
target-version = "py310"
9289
fix = true
9390

9491
[tool.ruff.lint]

tests/conftest.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import csv
33
import json
44
import ssl
5-
import sys
65
from logging import warning
76
from pathlib import Path
87
from uuid import uuid4
@@ -55,10 +54,7 @@ def ssl_verify(http2_enabled):
5554
return truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) if http2_enabled else True
5655
return True # recommended default
5756
else: # truststore isn't installed
58-
if sys.version_info >= (3, 10): # should be available in 3.10+
59-
warning("truststore not installed, your environment may be broken run uv sync")
60-
# without truststore we can't verify the ssl (and when http2 is enabled, verification must be disabled)
61-
return not http2_enabled
57+
warning("truststore not installed, your environment may be broken run uv sync")
6258

6359

6460
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)