Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
temp patch multithreading
  • Loading branch information
youknowone committed Jan 31, 2026
commit 98458e564c6a78bf47491cb3be07261051dc5bba
5 changes: 0 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,7 @@ env:
test_yield_from
ENV_POLLUTING_TESTS_COMMON: >-
ENV_POLLUTING_TESTS_LINUX: >-
test.test_multiprocessing_fork.test_processes
test.test_multiprocessing_forkserver.test_processes
test.test_multiprocessing_spawn.test_processes
ENV_POLLUTING_TESTS_MACOS: >-
test.test_multiprocessing_forkserver.test_processes
test.test_multiprocessing_spawn.test_processes
ENV_POLLUTING_TESTS_WINDOWS: >-
# Python version targeted by the CI.
PYTHON_VERSION: "3.14.2"
Expand Down
6 changes: 4 additions & 2 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6592,7 +6592,8 @@ def tearDownClass(cls):
# cycles. Trigger a garbage collection to break these cycles.
test.support.gc_collect()

processes = set(multiprocessing.process._dangling) - set(cls.dangling[0])
# TODO: RUSTPYTHON: Filter out stopped processes since gc.collect() is a no-op
processes = {p for p in multiprocessing.process._dangling if p.is_alive()} - {p for p in cls.dangling[0] if p.is_alive()}
if processes:
test.support.environment_altered = True
support.print_warning(f'Dangling processes: {processes}')
Expand Down Expand Up @@ -6789,7 +6790,8 @@ def tearDownModule():

multiprocessing.set_start_method(old_start_method[0], force=True)
# pause a bit so we don't get warning about dangling threads/processes
processes = set(multiprocessing.process._dangling) - set(dangling[0])
# TODO: RUSTPYTHON: Filter out stopped processes since gc.collect() is a no-op
processes = {p for p in multiprocessing.process._dangling if p.is_alive()} - {p for p in dangling[0] if p.is_alive()}
if processes:
need_sleep = True
test.support.environment_altered = True
Expand Down
17 changes: 0 additions & 17 deletions Lib/test/test_multiprocessing_fork/test_processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,6 @@ def test_args_argument(self): super().test_args_argument() # TODO: RUSTPYTHON
@unittest.skipIf(sys.platform == 'linux', 'TODO: RUSTPYTHON flaky timeout')
def test_process(self): super().test_process() # TODO: RUSTPYTHON

class WithProcessesTestPool(WithProcessesTestPool): # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
sys.platform == 'linux' and 'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_async_timeout(self): super().test_async_timeout() # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
sys.platform == 'linux' and 'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_terminate(self): super().test_terminate() # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
sys.platform == 'linux' and 'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_traceback(self): super().test_traceback() # TODO: RUSTPYTHON

class WithProcessesTestPoolWorkerLifetime(WithProcessesTestPoolWorkerLifetime): # TODO: RUSTPYTHON
@unittest.skipIf(sys.platform == 'linux', 'TODO: RUSTPYTHON flaky timeout')
def test_pool_worker_lifetime(self): super().test_pool_worker_lifetime() # TODO: RUSTPYTHON
Expand Down
22 changes: 0 additions & 22 deletions Lib/test/test_multiprocessing_forkserver/test_processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,11 @@ def test_notify(self): super().test_notify()
def test_notify_n(self): super().test_notify_n()

class WithProcessesTestLock(WithProcessesTestLock): # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_repr_lock(self): super().test_repr_lock() # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
sys.platform == 'linux', # TODO: RUSTPYTHON
'TODO: RUSTPYTHON flaky BrokenPipeError, flaky ConnectionRefusedError, flaky ConnectionResetError, flaky EOFError'
) # TODO: RUSTPYTHON
def test_repr_rlock(self): super().test_repr_rlock() # TODO: RUSTPYTHON

class WithProcessesTestPool(WithProcessesTestPool): # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_async_timeout(self): super().test_async_timeout() # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_terminate(self): super().test_terminate() # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_traceback(self): super().test_traceback() # TODO: RUSTPYTHON

if __name__ == '__main__':
unittest.main()
8 changes: 0 additions & 8 deletions Lib/test/test_multiprocessing_forkserver/test_threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,5 @@

install_tests_in_module_dict(globals(), 'forkserver', only_type="threads")

import os # TODO: RUSTPYTHON
class WithThreadsTestPool(WithThreadsTestPool): # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_terminate(self): super().test_terminate() # TODO: RUSTPYTHON

if __name__ == '__main__':
unittest.main()
22 changes: 0 additions & 22 deletions Lib/test/test_multiprocessing_spawn/test_processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,11 @@ class WithProcessesTestCondition(WithProcessesTestCondition): # TODO: RUSTPYTHO
def test_notify(self): super().test_notify()

class WithProcessesTestLock(WithProcessesTestLock): # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
sys.platform in ('darwin', 'linux') and 'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_repr_lock(self): super().test_repr_lock() # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
sys.platform == 'linux', # TODO: RUSTPYTHON
'TODO: RUSTPYTHON flaky BrokenPipeError, flaky ConnectionRefusedError, flaky ConnectionResetError, flaky EOFError'
) # TODO: RUSTPYTHON
def test_repr_rlock(self): super().test_repr_rlock() # TODO: RUSTPYTHON

class WithProcessesTestPool(WithProcessesTestPool): # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
sys.platform in ('darwin', 'linux') and 'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_async_timeout(self): super().test_async_timeout() # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
sys.platform in ('darwin', 'linux') and 'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_terminate(self): super().test_terminate() # TODO: RUSTPYTHON
@unittest.skipIf( # TODO: RUSTPYTHON
sys.platform in ('darwin', 'linux') and 'RUSTPYTHON_SKIP_ENV_POLLUTERS' in os.environ, # TODO: RUSTPYTHON
'TODO: RUSTPYTHON environment pollution when running rustpython -m test --fail-env-changed due to unknown reason'
) # TODO: RUSTPYTHON
def test_traceback(self): super().test_traceback() # TODO: RUSTPYTHON

if __name__ == '__main__':
unittest.main()