Skip to content

Commit 04fb21c

Browse files
authored
fix: drop Python 3.9 support to fix CI (#537)
1 parent 3f7fe4d commit 04fb21c

19 files changed

+73
-126
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
1818
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5
1919
with:
20-
python-version: "3.9"
20+
python-version: "3.10"
2121
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
2222

2323
# Make sure commit messages follow the conventional commits convention:
@@ -36,7 +36,6 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
python-version:
39-
- "3.9"
4039
- "3.10"
4140
- "3.11"
4241
- "3.12"

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
rev: v3.21.0
3737
hooks:
3838
- id: pyupgrade
39-
args: [--py39-plus]
39+
args: [--py310-plus]
4040
- repo: https://github.com/astral-sh/ruff-pre-commit
4141
rev: v0.14.3
4242
hooks:

poetry.lock

Lines changed: 3 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ classifiers = [
1313
"Natural Language :: English",
1414
"Operating System :: OS Independent",
1515
"Topic :: Software Development :: Libraries",
16-
"Programming Language :: Python :: 3.9",
1716
"Programming Language :: Python :: 3.10",
1817
"Programming Language :: Python :: 3.11",
1918
"Programming Language :: Python :: 3.12",
@@ -35,7 +34,7 @@ script = "build_ext.py"
3534
"Changelog" = "https://github.com/bluetooth-devices/dbus-fast/blob/main/CHANGELOG.md"
3635

3736
[tool.poetry.dependencies]
38-
python = ">=3.9"
37+
python = ">=3.10"
3938

4039
# duplicated in docs/requirements.txt for readthedocs compatibility
4140
[tool.poetry.group.docs.dependencies]
@@ -109,7 +108,7 @@ requires = ['setuptools>=65.4.1', 'wheel', 'Cython>=3,<3.3.0', "poetry-core>=1.0
109108
build-backend = "poetry.core.masonry.api"
110109

111110
[tool.ruff]
112-
target-version = "py39"
111+
target-version = "py310"
113112
line-length = 88
114113

115114
[tool.ruff.lint]

src/dbus_fast/_private/marshaller.py

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

3+
from collections.abc import Callable
34
from struct import Struct, error
4-
from typing import Any, Callable
5+
from typing import Any
56

67
from ..signature import SignatureType, Variant, get_signature_tree
78

src/dbus_fast/_private/unmarshaller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import io
66
import socket
77
import sys
8-
from collections.abc import Iterable
8+
from collections.abc import Callable, Iterable
99
from struct import Struct
10-
from typing import TYPE_CHECKING, Any, Callable
10+
from typing import TYPE_CHECKING, Any
1111

1212
from ..constants import MESSAGE_FLAG_MAP, MESSAGE_TYPE_MAP, MessageFlag
1313
from ..errors import InvalidMessageError

src/dbus_fast/_private/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import ast
44
import inspect
5-
from typing import Any, Callable
5+
from collections.abc import Callable
6+
from typing import Any
67

78
from ..signature import SignatureTree, SignatureType, Variant, get_signature_tree
89

src/dbus_fast/aio/message_bus.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
import logging
77
import socket
88
from collections import deque
9+
from collections.abc import Callable
910
from copy import copy
1011
from functools import partial
11-
from typing import Any, Callable
12+
from typing import Any
1213

1314
from .. import introspection as intr
1415
from ..auth import Authenticator, AuthExternal

src/dbus_fast/aio/message_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import logging
44
import socket
5+
from collections.abc import Callable
56
from functools import partial
6-
from typing import Callable
77

88
from .._private.unmarshaller import Unmarshaller
99
from ..message import Message

src/dbus_fast/auth.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import enum
22
import os
3-
from typing import Optional
43

54
from .errors import AuthError
65

@@ -65,10 +64,10 @@ class AuthExternal(Authenticator):
6564
:sealso: https://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol
6665
"""
6766

68-
def __init__(self, uid: Optional[int] = None) -> None:
67+
def __init__(self, uid: int | None = None) -> None:
6968
self.negotiate_unix_fd: bool = False
7069
self.negotiating_fds: bool = False
71-
self.uid: Optional[int] = uid
70+
self.uid: int | None = uid
7271

7372
def _authentication_start(self, negotiate_unix_fd: bool = False) -> str:
7473
self.negotiate_unix_fd = negotiate_unix_fd

0 commit comments

Comments
 (0)