Skip to content

Commit d7990b7

Browse files
authored
Merge pull request #163 from tharropoulos/chore/drop-python-3.9
chore: drop python 3.9 support
2 parents d0b8990 + 0599f18 commit d7990b7

7 files changed

Lines changed: 27 additions & 325 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Python
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: "3.9"
24+
python-version: "3.13"
2525

2626
- name: Install build dependencies
2727
run: |

‎.github/workflows/test-and-lint.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1515

1616
steps:
1717
- name: Start Typesense

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ If your application cancels many requests, prefer [httpx2](#using-httpx2), which
7878

7979
## Using httpx2
8080

81-
The client sends requests with [httpx](https://www.python-httpx.org/) by default. On Python 3.10+ you can pass an [httpx2](https://github.com/pydantic/httpx2) client instead. httpx2 is Pydantic's maintained continuation of httpx, and it fixes a connection pool leak in httpcore ([encode/httpcore#1093](https://github.com/encode/httpcore/issues/1093)) that can leave an `AsyncClient` failing every request with `PoolTimeout` under load.
81+
The client sends requests with [httpx](https://www.python-httpx.org/) by default. You can pass an [httpx2](https://github.com/pydantic/httpx2) client instead. httpx2 is Pydantic's maintained continuation of httpx, and it fixes a connection pool leak in httpcore ([encode/httpcore#1093](https://github.com/encode/httpcore/issues/1093)) that can leave an `AsyncClient` failing every request with `PoolTimeout` under load.
8282

8383
```
8484
$ pip install "typesense[httpx2]"

‎pyproject.toml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "typesense"
33
description = "Python client for Typesense, an open source and typo tolerant search engine."
44
authors = [{ name = "Typesense", email = "contact@typesense.org" }]
5-
requires-python = ">=3.9"
5+
requires-python = ">=3.10"
66
readme = "README.md"
77
license = { text = "Apache 2.0" }
88
keywords = [
@@ -15,7 +15,6 @@ classifiers = [
1515
"License :: OSI Approved :: Apache Software License",
1616
"Programming Language :: Python",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.9",
1918
"Programming Language :: Python :: 3.10",
2019
"Programming Language :: Python :: 3.11",
2120
"Programming Language :: Python :: 3.12",
@@ -29,7 +28,7 @@ dynamic = ["version"]
2928

3029
[project.optional-dependencies]
3130
# Maintained continuation of httpx; fixes the httpcore pool leak in encode/httpcore#1093.
32-
httpx2 = ["httpx2>=2.6.0; python_version >= '3.10'"]
31+
httpx2 = ["httpx2>=2.6.0"]
3332

3433
[project.urls]
3534
Documentation = "https://typesense.org/"

‎ruff.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ exclude = [
3030
line-length = 88
3131
indent-width = 4
3232

33-
target-version = "py39"
33+
target-version = "py310"
3434

3535
[lint]
3636
select = ["E4", "E7", "E9", "F", "B"]

‎src/typesense/http_backend.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
HTTP backends the Typesense client can send requests with.
33
44
The client builds an ``httpx`` client by default. Users can pass their own client
5-
instead, either from ``httpx`` or from ``httpx2`` (install ``typesense[httpx2]``,
6-
Python 3.10+). ``httpx2`` is Pydantic's maintained continuation of ``httpx``. It
7-
fixes a connection pool leak in ``httpcore`` (encode/httpcore#1093) that can leave
8-
an async client failing every request with ``PoolTimeout``.
5+
instead, either from ``httpx`` or from ``httpx2`` (install ``typesense[httpx2]``).
6+
``httpx2`` is Pydantic's maintained continuation of ``httpx``. It fixes a connection
7+
pool leak in ``httpcore`` (encode/httpcore#1093) that can leave an async client
8+
failing every request with ``PoolTimeout``.
99
1010
``httpx2`` has the same API as ``httpx`` but its own classes, so every
1111
``isinstance`` check and ``except`` clause has to cover both packages. This module
@@ -31,7 +31,7 @@
3131
def _import_httpx2() -> typing.Optional[ModuleType]:
3232
"""Return the ``httpx2`` module, or ``None`` when it is not installed."""
3333
# ``import_module`` is typed as returning a module whether or not httpx2 is
34-
# installed; a plain ``import`` is ``Any`` to mypy when it is missing (Python 3.9).
34+
# installed; a plain ``import`` is ``Any`` to mypy when it is missing.
3535
try:
3636
return importlib.import_module("httpx2")
3737
except ImportError:

0 commit comments

Comments
 (0)