Skip to content

Commit 0bf6905

Browse files
ngoldbaumTobiasRzepka
authored andcommitted
chore: Disable pytest-run-parallel testing for now and re-enable CI for 3.13t (gorakhargosh#1129)
* unify test.yml and freethreading_tests.yml * Delete unnecessary thread-unsafe markers * remove pytest-run-parallel CI
1 parent e8159f5 commit 0bf6905

12 files changed

+1
-105
lines changed

.github/workflows/freethreading_tests.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
- "3.11"
6161
- "3.12"
6262
- "3.13"
63+
- "3.13t"
6364
- "pypy-3.9"
6465
exclude:
6566
- os:

requirements-tests.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ eventlet==0.37.0; python_version < "3.13"
22
flaky==3.8.1
33
pytest==8.3.3
44
pytest-cov==6.0.0
5-
pytest-run-parallel==0.4.2
65
pytest-timeout==2.3.1
76
ruff==0.7.1
87
sphinx==7.4.7; python_version <= "3.9"

tests/test_delayed_queue.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99

1010
@pytest.mark.flaky(max_runs=5, min_passes=1)
11-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
1211
def test_delayed_get():
1312
q = DelayedQueue[str](2)
1413
q.put("", delay=True)

tests/test_emitter.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def rerun_filter(exc, *args):
4545

4646

4747
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
48-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
4948
def test_create(p: P, event_queue: TestEventQueue, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
5049
start_watching()
5150
open(p("a"), "a").close()
@@ -66,7 +65,6 @@ def test_create(p: P, event_queue: TestEventQueue, start_watching: StartWatching
6665

6766
@pytest.mark.skipif(not platform.is_linux(), reason="FileClosed*Event only supported in GNU/Linux")
6867
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
69-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
7068
def test_closed(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
7169
with open(p("a"), "a"):
7270
start_watching()
@@ -99,7 +97,6 @@ def test_closed(p: P, event_queue: TestEventQueue, start_watching: StartWatching
9997
platform.is_darwin() or platform.is_windows(),
10098
reason="Windows and macOS enforce proper encoding",
10199
)
102-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
103100
def test_create_wrong_encoding(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
104101
start_watching()
105102
open(p("a_\udce4"), "a").close()
@@ -115,7 +112,6 @@ def test_create_wrong_encoding(p: P, event_queue: TestEventQueue, start_watching
115112

116113

117114
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
118-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
119115
def test_delete(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
120116
mkfile(p("a"))
121117

@@ -129,7 +125,6 @@ def test_delete(p: P, start_watching: StartWatching, expect_event: ExpectEvent)
129125

130126

131127
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
132-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
133128
def test_modify(p: P, event_queue: TestEventQueue, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
134129
mkfile(p("a"))
135130
start_watching()
@@ -150,7 +145,6 @@ def test_modify(p: P, event_queue: TestEventQueue, start_watching: StartWatching
150145

151146

152147
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
153-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
154148
def test_chmod(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
155149
mkfile(p("a"))
156150
start_watching()
@@ -166,7 +160,6 @@ def test_chmod(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -
166160

167161

168162
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
169-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
170163
def test_move(p: P, event_queue: TestEventQueue, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
171164
mkdir(p("dir1"))
172165
mkdir(p("dir2"))
@@ -196,7 +189,6 @@ def test_move(p: P, event_queue: TestEventQueue, start_watching: StartWatching,
196189

197190

198191
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
199-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
200192
def test_case_change(
201193
p: P,
202194
event_queue: TestEventQueue,
@@ -231,7 +223,6 @@ def test_case_change(
231223

232224

233225
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
234-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
235226
def test_move_to(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
236227
mkdir(p("dir1"))
237228
mkdir(p("dir2"))
@@ -247,7 +238,6 @@ def test_move_to(p: P, start_watching: StartWatching, expect_event: ExpectEvent)
247238

248239

249240
@pytest.mark.skipif(not platform.is_linux(), reason="InotifyFullEmitter only supported in Linux")
250-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
251241
def test_move_to_full(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
252242
mkdir(p("dir1"))
253243
mkdir(p("dir2"))
@@ -262,7 +252,6 @@ def test_move_to_full(p: P, event_queue: TestEventQueue, start_watching: StartWa
262252

263253

264254
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
265-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
266255
def test_move_from(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
267256
mkdir(p("dir1"))
268257
mkdir(p("dir2"))
@@ -278,7 +267,6 @@ def test_move_from(p: P, start_watching: StartWatching, expect_event: ExpectEven
278267

279268

280269
@pytest.mark.skipif(not platform.is_linux(), reason="InotifyFullEmitter only supported in Linux")
281-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
282270
def test_move_from_full(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
283271
mkdir(p("dir1"))
284272
mkdir(p("dir2"))
@@ -293,7 +281,6 @@ def test_move_from_full(p: P, event_queue: TestEventQueue, start_watching: Start
293281

294282

295283
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
296-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
297284
def test_separate_consecutive_moves(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
298285
mkdir(p("dir1"))
299286
mkfile(p("dir1", "a"))
@@ -322,7 +309,6 @@ def test_separate_consecutive_moves(p: P, start_watching: StartWatching, expect_
322309

323310
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
324311
@pytest.mark.skipif(platform.is_bsd(), reason="BSD create another set of events for this test")
325-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
326312
def test_delete_self(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
327313
mkdir(p("dir1"))
328314
emitter = start_watching(path=p("dir1"))
@@ -336,7 +322,6 @@ def test_delete_self(p: P, start_watching: StartWatching, expect_event: ExpectEv
336322
platform.is_windows() or platform.is_bsd(),
337323
reason="Windows|BSD create another set of events for this test",
338324
)
339-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
340325
def test_fast_subdirectory_creation_deletion(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
341326
root_dir = p("dir1")
342327
sub_dir = p("dir1", "subdir1")
@@ -369,7 +354,6 @@ def test_fast_subdirectory_creation_deletion(p: P, event_queue: TestEventQueue,
369354

370355

371356
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
372-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
373357
def test_passing_unicode_should_give_unicode(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
374358
start_watching(path=str(p()))
375359
mkfile(p("a"))
@@ -389,7 +373,6 @@ def test_passing_bytes_should_give_bytes(p: P, event_queue: TestEventQueue, star
389373

390374

391375
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
392-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
393376
def test_recursive_on(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
394377
mkdir(p("dir1", "dir2", "dir3"), parents=True)
395378
start_watching()
@@ -416,7 +399,6 @@ def test_recursive_on(p: P, event_queue: TestEventQueue, start_watching: StartWa
416399

417400

418401
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
419-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
420402
def test_recursive_off(
421403
p: P,
422404
event_queue: TestEventQueue,
@@ -461,7 +443,6 @@ def test_recursive_off(
461443

462444

463445
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
464-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
465446
def test_renaming_top_level_directory(
466447
p: P,
467448
event_queue: TestEventQueue,
@@ -514,7 +495,6 @@ def test_renaming_top_level_directory(
514495

515496

516497
@pytest.mark.skipif(platform.is_windows(), reason="Windows create another set of events for this test")
517-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
518498
def test_move_nested_subdirectories(
519499
p: P,
520500
event_queue: TestEventQueue,
@@ -559,7 +539,6 @@ def test_move_nested_subdirectories(
559539
not platform.is_windows(),
560540
reason="Non-Windows create another set of events for this test",
561541
)
562-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
563542
def test_move_nested_subdirectories_on_windows(
564543
p: P,
565544
event_queue: TestEventQueue,
@@ -605,7 +584,6 @@ def test_move_nested_subdirectories_on_windows(
605584

606585
@pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter)
607586
@pytest.mark.skipif(platform.is_bsd(), reason="BSD create another set of events for this test")
608-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
609587
def test_file_lifecyle(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -> None:
610588
start_watching()
611589

tests/test_fsevents.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ def on_thread_stop(self):
228228
observer.unschedule(w)
229229

230230

231-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
232231
def test_converting_cfstring_to_pyunicode(p: P, start_watching: StartWatching, event_queue: TestEventQueue) -> None:
233232
"""See https://github.com/gorakhargosh/watchdog/issues/762"""
234233

@@ -293,7 +292,6 @@ def done(self):
293292
observer.join()
294293

295294

296-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
297295
def test_watchdog_recursive(p: P) -> None:
298296
"""See https://github.com/gorakhargosh/watchdog/issues/706"""
299297
import os.path

tests/test_inotify_c.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def struct_inotify(wd, mask, cookie=0, length=0, name=b"") -> bytes:
4141
return struct.pack(struct_format, wd, mask, cookie, length, name)
4242

4343

44-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
4544
def test_late_double_deletion(helper: Helper, p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
4645
inotify_fd = type("FD", (object,), {})()
4746
inotify_fd.last = 0
@@ -170,7 +169,6 @@ def test_raise_error(error, pattern):
170169
assert exc.value.errno == error
171170

172171

173-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
174172
def test_non_ascii_path(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
175173
"""
176174
Inotify can construct an event for a path containing non-ASCII.
@@ -206,7 +204,6 @@ def test_event_equality(p: P) -> None:
206204
assert event2 != event3
207205

208206

209-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
210207
def test_select_fd(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:
211208
# We open a file 2048 times to ensure that we exhaust 1024 file
212209
# descriptors, the limit of a select() call.

tests/test_inotify_watch_group.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def create_inotify_watch(path: bytes, *, recursive: bool = False, follow_symlink
3737

3838

3939
@pytest.mark.timeout(5)
40-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
4140
def test_move_from(p):
4241
mkdir(p("dir1"))
4342
mkdir(p("dir2"))
@@ -50,7 +49,6 @@ def test_move_from(p):
5049

5150

5251
@pytest.mark.timeout(5)
53-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
5452
def test_move_to(p):
5553
mkdir(p("dir1"))
5654
mkdir(p("dir2"))
@@ -63,7 +61,6 @@ def test_move_to(p):
6361

6462

6563
@pytest.mark.timeout(5)
66-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
6764
def test_move_internal(p):
6865
mkdir(p("dir1"))
6966
mkdir(p("dir2"))
@@ -78,7 +75,6 @@ def test_move_internal(p):
7875

7976

8077
@pytest.mark.timeout(5)
81-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
8278
def test_move_internal_symlink_followed(p):
8379
mkdir(p("dir", "dir1"), parents=True)
8480
mkdir(p("dir", "dir2"))
@@ -94,7 +90,6 @@ def test_move_internal_symlink_followed(p):
9490

9591

9692
@pytest.mark.timeout(10)
97-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
9893
def test_move_internal_batch(p):
9994
n = 100
10095
mkdir(p("dir1"))
@@ -132,7 +127,6 @@ def test_delete_watched_directory(p):
132127

133128

134129
@pytest.mark.timeout(5)
135-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
136130
def test_delete_watched_directory_symlink_followed(p):
137131
mkdir(p("dir", "dir2"), parents=True)
138132
symlink(p("dir"), p("symdir"), target_is_directory=True)
@@ -152,7 +146,6 @@ def test_delete_watched_directory_symlink_followed(p):
152146

153147

154148
@pytest.mark.timeout(5)
155-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
156149
def test_delete_watched_directory_symlink_followed_recursive(p):
157150
mkdir(p("dir"), parents=True)
158151
mkdir(p("dir2", "dir3", "dir4"), parents=True)
@@ -174,7 +167,6 @@ def test_delete_watched_directory_symlink_followed_recursive(p):
174167

175168
@pytest.mark.timeout(5)
176169
@pytest.mark.skipif("GITHUB_REF" not in os.environ, reason="sudo password prompt")
177-
@pytest.mark.thread_unsafe(reason="Uses recwarn")
178170
def test_unmount_watched_directory_filesystem(p):
179171
mkdir(p("dir1"))
180172
mount_tmpfs(p("dir1"))

0 commit comments

Comments
 (0)