Skip to content

Commit 6c43f33

Browse files
authored
Release 020326 (#155)
* Bump minimal python version to 3.11, support python 3.14 (cherry picked from commit e495b41) * Fixed thread shim on 3.14+ (cherry picked from commit 882e8c4)
1 parent 1921cc4 commit 6c43f33

File tree

6 files changed

+216
-252
lines changed

6 files changed

+216
-252
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,34 +61,34 @@ jobs:
6161
matrix:
6262
include:
6363
# Ubuntu
64-
- os: ubuntu-latest
65-
python-version: "3.10"
6664
- os: ubuntu-latest
6765
python-version: "3.11"
6866
- os: ubuntu-latest
6967
python-version: "3.12"
7068
- os: ubuntu-latest
7169
python-version: "3.13"
70+
- os: ubuntu-latest
71+
python-version: "3.14"
7272

7373
# Windows
74-
- os: windows-latest
75-
python-version: "3.10"
7674
- os: windows-latest
7775
python-version: "3.11"
7876
- os: windows-latest
7977
python-version: "3.12"
8078
- os: windows-latest
8179
python-version: "3.13"
80+
- os: windows-latest
81+
python-version: "3.14"
8282

8383
# macOS (arm64)
84-
- os: macos-14
85-
python-version: "3.10"
8684
- os: macos-14
8785
python-version: "3.11"
8886
- os: macos-14
8987
python-version: "3.12"
9088
- os: macos-14
9189
python-version: "3.13"
90+
- os: macos-14
91+
python-version: "3.14"
9292
steps:
9393
- uses: actions/checkout@v4
9494
- uses: ./.github/workflows/actions/prepare

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.10.13
1+
3.11

hstest/common/process_utils.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,27 @@ def _adjust_thread_count(self) -> None:
2020
if self._idle_semaphore.acquire(timeout=0):
2121
return
2222

23-
# When the executor gets lost, the weakref callback will wake up
24-
# the worker threads.
2523
def weakref_cb(_, q=self._work_queue) -> None:
2624
q.put(None)
2725

2826
num_threads = len(self._threads)
2927
if num_threads < self._max_workers:
3028
thread_name = "%s_%d" % (self._thread_name_prefix or self, num_threads)
3129

32-
args = (
33-
weakref.ref(self, weakref_cb),
34-
self._work_queue,
35-
self._initializer,
36-
self._initargs,
37-
)
30+
# Python 3.14+
31+
if hasattr(self, "_create_worker_context"):
32+
args = (
33+
weakref.ref(self, weakref_cb),
34+
self._create_worker_context(),
35+
self._work_queue,
36+
)
37+
else:
38+
args = (
39+
weakref.ref(self, weakref_cb),
40+
self._work_queue,
41+
self._initializer,
42+
self._initargs,
43+
)
3844

3945
t = threading.Thread(name=thread_name, target=_worker, args=args, group=self.group)
4046
t.daemon = True

0 commit comments

Comments
 (0)