Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(via xdist) Intermittently ending up on non-main thread #96

Closed
boxed opened this issue May 10, 2019 · 18 comments · Fixed by #243
Closed

(via xdist) Intermittently ending up on non-main thread #96

boxed opened this issue May 10, 2019 · 18 comments · Fixed by #243

Comments

@boxed
Copy link

boxed commented May 10, 2019

This issue has been plaguing us for months since we started using xdist. We have a big test suite that extremely rarely fails with ValueError: signal only works in main thread. I have managed to get the full traceback of all threads in a normal run and in this case where it crashes.

Normal:

Thread 0x000070000fd66000 (most recent call first):
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/kazoo/handlers/threading.py", line 192 in _select
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/kazoo/handlers/threading.py", line 178 in select
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/kazoo/protocol/connection.py", line 553 in _connect_attempt
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/kazoo/protocol/connection.py", line 512 in _connect_loop
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/kazoo/retry.py", line 124 in __call__
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/kazoo/protocol/connection.py", line 473 in zk_loop
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864 in run
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x000070000f863000 (most recent call first):
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 295 in wait
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/queue.py", line 164 in get
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/kazoo/handlers/threading.py", line 120 in _thread_worker
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864 in run
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x000070000f360000 (most recent call first):
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 295 in wait
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/queue.py", line 164 in get
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/kazoo/handlers/threading.py", line 120 in _thread_worker
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864 in run
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/usr/local/Cellar/[email protected]/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x000070000ee5d000 (most recent call first):
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 386 in read
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 418 in from_io
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 954 in _thread_receiver
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 213 in run
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 277 in _perform_spawn

Current thread 0x000000011088f5c0 (most recent call first):
  File "/Users/andersh/triresolve/triresolve/matcher/matcher.py", line 1128 in go
  File "/Users/andersh/triresolve/triresolve/matcher/matcher.py", line 3717 in match
  File "/Users/andersh/triresolve/triresolve/matcher/cmdline.py", line 58 in update_match_view
  File "/Users/andersh/triresolve/triresolve/matcher/test/integrationtest/test_3w_linking.py", line 304 in run_end_to_end_3w_linking_one_to_one
  File "/Users/andersh/triresolve/triresolve/matcher/test/integrationtest/test_3w_linking.py", line 271 in test_end_to_end_3w_linking_one_to_one_normal_rec_trades_on_sub_entity
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/python.py", line 166 in pytest_pyfunc_call
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/python.py", line 1425 in runtest
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/runner.py", line 122 in pytest_runtest_call
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/runner.py", line 194 in <lambda>
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/runner.py", line 212 in __init__
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/runner.py", line 196 in call_runtest_hook
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/runner.py", line 172 in call_and_report
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/runner.py", line 92 in runtestprotocol
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/runner.py", line 77 in pytest_runtest_protocol
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__
  File "<remote exec>", line 83 in run_one_test
  File "<remote exec>", line 69 in pytest_runtestloop
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/main.py", line 225 in _main
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/main.py", line 185 in wrap_session
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/_pytest/main.py", line 218 in pytest_cmdline_main
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__
  File "<remote exec>", line 270 in <module>
  File "<string>", line 1 in do_exec
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 1072 in executetask
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 213 in run
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 277 in _perform_spawn
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 259 in integrate_as_primary_thread
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 1047 in serve
  File "/Users/andersh/triresolve/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 1534 in serve
  File "<string>", line 8 in <module>
  File "<string>", line 1 in <module>

Incorrect:

Thread 0x00007fc9108ba700 (most recent call first)://
  File "/tmp/venv/lib/python3.6/site-packages/kazoo/handlers/threading.py", line 192 in _select//
  File "/tmp/venv/lib/python3.6/site-packages/kazoo/handlers/threading.py", line 178 in select//
  File "/tmp/venv/lib/python3.6/site-packages/kazoo/protocol/connection.py", line 553 in _connect_attempt//
  File "/tmp/venv/lib/python3.6/site-packages/kazoo/protocol/connection.py", line 512 in _connect_loop//
  File "/tmp/venv/lib/python3.6/site-packages/kazoo/retry.py", line 124 in __call__//
  File "/tmp/venv/lib/python3.6/site-packages/kazoo/protocol/connection.py", line 473 in zk_loop//
  File "/usr/lib64/python3.6/threading.py", line 864 in run//
  File "/usr/lib64/python3.6/threading.py", line 916 in _bootstrap_inner//
  File "/usr/lib64/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007fc9110bb700 (most recent call first)://
  File "/usr/lib64/python3.6/threading.py", line 295 in wait//
  File "/usr/lib64/python3.6/queue.py", line 164 in get//
  File "/tmp/venv/lib/python3.6/site-packages/kazoo/handlers/threading.py", line 120 in _thread_worker//
  File "/usr/lib64/python3.6/threading.py", line 864 in run//
  File "/usr/lib64/python3.6/threading.py", line 916 in _bootstrap_inner//
  File "/usr/lib64/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007fc9118bc700 (most recent call first)://
  File "/usr/lib64/python3.6/threading.py", line 295 in wait//
  File "/usr/lib64/python3.6/queue.py", line 164 in get//
  File "/tmp/venv/lib/python3.6/site-packages/kazoo/handlers/threading.py", line 120 in _thread_worker//
  File "/usr/lib64/python3.6/threading.py", line 864 in run//
  File "/usr/lib64/python3.6/threading.py", line 916 in _bootstrap_inner//
  File "/usr/lib64/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007fc912ffd700 (most recent call first)://
  File "/usr/lib64/python3.6/threading.py", line 295 in wait//
  File "/usr/lib64/python3.6/queue.py", line 164 in get//
  File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 67 in _worker//
  File "/usr/lib64/python3.6/threading.py", line 864 in run//
  File "/usr/lib64/python3.6/threading.py", line 916 in _bootstrap_inner//
  File "/usr/lib64/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007fc9137fe700 (most recent call first)://
  File "/usr/lib64/python3.6/threading.py", line 295 in wait//
  File "/usr/lib64/python3.6/queue.py", line 164 in get//
  File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 67 in _worker//
  File "/usr/lib64/python3.6/threading.py", line 864 in run//
  File "/usr/lib64/python3.6/threading.py", line 916 in _bootstrap_inner//
  File "/usr/lib64/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007fc913fff700 (most recent call first)://
  File "/usr/lib64/python3.6/threading.py", line 299 in wait//
  File "/usr/lib64/python3.6/threading.py", line 551 in wait//
  File "/usr/lib64/python3.6/threading.py", line 916 in _bootstrap_inner//
  File "/usr/lib64/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007fc918d1e700 (most recent call first)://
  File "/usr/lib64/python3.6/asyncore.py", line 183 in poll2//
  File "/usr/lib64/python3.6/asyncore.py", line 207 in loop//
  File "/tmp/venv/lib/python3.6/site-packages/cassandra/io/asyncorereactor.py", line 119 in loop//
  File "/tmp/venv/lib/python3.6/site-packages/cassandra/io/asyncorereactor.py", line 258 in _run_loop//
  File "/usr/lib64/python3.6/threading.py", line 864 in run//
  File "/usr/lib64/python3.6/threading.py", line 916 in _bootstrap_inner//
  File "/usr/lib64/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007fc921a79700 (most recent call first)://
  File "/usr/lib64/python3.6/threading.py", line 295 in wait//
  File "/usr/lib64/python3.6/queue.py", line 164 in get//
  File "/usr/lib64/python3.6/threading.py", line 916 in _bootstrap_inner//
  File "/usr/lib64/python3.6/threading.py", line 884 in _bootstrap

Current thread 0x00007fc94637f700 (most recent call first)://
  File "/opt/trioptima/triresolve/triresolve/matcher/matcher.py", line 1124 in go//
  File "/opt/trioptima/triresolve/triresolve/matcher/matcher.py", line 3713 in match//
  File "/opt/trioptima/triresolve/triresolve/matcher/cmdline.py", line 58 in update_match_view//
  File "/opt/trioptima/triresolve/triresolve/matcher/test/integrationtest/test_3w_linking.py", line 304 in run_end_to_end_3w_linking_one_to_one
  File "/opt/trioptima/triresolve/triresolve/matcher/test/integrationtest/test_3w_linking.py", line 271 in// test_end_to_end_3w_linking_one_to_one_normal_rec_trades_on_sub_entity//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/python.py", line 166 in pytest_pyfunc_call//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/python.py", line 1425 in runtest//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/runner.py", line 122 in pytest_runtest_call//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/runner.py", line 194 in <lambda>//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/runner.py", line 212 in __init__//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/runner.py", line 196 in call_runtest_hook//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/runner.py", line 172 in call_and_report//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/runner.py", line 92 in runtestprotocol//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/runner.py", line 77 in pytest_runtest_protocol//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__//
  File "<remote exec>", line 83 in run_one_test//
  File "<remote exec>", line 66 in pytest_runtestloop//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/main.py", line 225 in _main//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/main.py", line 185 in wrap_session//
  File "/tmp/venv/lib/python3.6/site-packages/_pytest/main.py", line 218 in pytest_cmdline_main//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187 in _multicall//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 61 in <lambda>//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 67 in _hookexec//
  File "/tmp/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 284 in __call__//
  File "<remote exec>", line 270 in <module>//
  File "<string>", line 1 in do_exec//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 1072 in executetask//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 213 in run//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 277 in _perform_spawn

Thread 0x00007fc946bc0700 (most recent call first)://
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 386 in read//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 418 in from_io//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 954 in _thread_receiver//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 213 in run//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 277 in _perform_spawn

Thread 0x00007fc9484c0740 (most recent call first)://
  File "/usr/lib64/python3.6/threading.py", line 295 in wait//
  File "/usr/lib64/python3.6/threading.py", line 551 in wait//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 255 in integrate_as_primary_thread//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 1047 in serve//
  File "/tmp/venv/lib/python3.6/site-packages/execnet/gateway_base.py", line 1534 in serve//
  File "<string>", line 8 in <module>
  File "<string>", line 1 in <module>mysql strict mode! at least in tests://

Digging through the code it looks to me like _try_send_to_primary_thread fails for some reason, even though we are running in process mode. This is obviously a guess though, as I don't understand this code very well.

Help! :)

@robholt
Copy link

robholt commented Oct 15, 2019

I'm having this same issue and I think I figured it out. It happens for me when I add extra environment variables to a spec. If spec.chdir, spec.nice, or spec.env are set it triggers an extra remote_exec before the xdist remote function is run. This can trigger a race in the WorkerPool (where the _try_send_to_primary_thread is). The race is this:

  1. The first remote_exec is received. The main thread is not busy so it picks this up
  2. Picking it up sets the _primary_thread_task_ready event.
  3. The exec completes, and a reply is sent back to the caller. (Note that the event is not unset yet!)
  4. The master, having received a reply, continues on and calls remote_exec with the xdist remote module.
  5. The worker processes this, and if the _primary_thread_task_ready event has not been unset yet it won't be assigned to the main thread.

The problem lies here:

self._perform_spawn(reply)
# we are concurrent with trigger_shutdown and spawn
with self._running_lock:
if self._shuttingdown:
break
primary_thread_task_ready.clear()

The _perform_spawn method sends the reply back, but the primary_thread_task_ready event is not unset until later, and requires the _running_lock lock to unset it. Processing incoming exec requests also uses the _running_lock lock, and if that thread acquires the lock before the main thread does (so it could unset the event) then the incoming exec is guaranteed to not run on the main thread. I confirmed this by adding time.sleep(1) right after _perform_spawn, with that the issue triggers every time.

I think I know how to fix this, hopefully I will have a PR soon.

@robholt
Copy link

robholt commented Oct 15, 2019

This turned out to be a lot more complicated. What really happens is that the master uses the channel closing to indicate the worker is done executing, and that happens well before the WorkerPool sees the main thread as done. Some changes could be made to decrease this gap, but I don't think it could be eliminated without a significant refactor.

I've been testing out the eventlet execmodel and I believe it will eliminate the problem (since everything will run on the main thread) and signals will work. To use it with xdist you can replace -n NUM with --dist=load --tx='NUM*popen//execmodel=eventlet'

@boxed
Copy link
Author

boxed commented Oct 16, 2019

Great investigating!

@mattgodbolt
Copy link

Hey folks. This is a fairly dormant-looking thread, but I wondered if it might explain a super-intermittant issue we see.

We're using xdist 1.32, and execnet 1.7.1.

In async tests super rarely we get errors saying RuntimeError: There is no current event loop in thread 'Dummy-1' - which I've traced back to the tests not running on the main thread (and thus not having a default event loop). It seems like this is the same issue - a rare case where tests get run on the "wrong" thread.

Would you concur, and do you have any advice for how to work around it? Thanks in advance.

@nicoddemus
Copy link
Member

@mattgodbolt please try updating to 1.8.0: #118 seems to tackle exactly that problem.

@nicoddemus
Copy link
Member

I just confirmed: before 1.8.0, we would get this an error related to dummy threads a few times per week. Since updating to 1.8.0 in late January, we never got the error again.

Closing this as solved now then. All credits go to @graingert for finding the problem and providing a PR. 👍

@nicoddemus
Copy link
Member

nicoddemus commented May 16, 2023

Reopening given the problem still persists:

@nicoddemus nicoddemus reopened this May 16, 2023
@nicoddemus
Copy link
Member

nicoddemus commented May 16, 2023

I wonder if we can create a new configuration option which would cause the remote worker to never open a new thread for remote execution, always executing them serially in the main thread? I think this would solve the problem, at least for pytest-xdist's use case.

@zzzeek
Copy link

zzzeek commented May 16, 2023

yeah why is this spinning up threads, just turning that off would solve the issue we are having

@RonnyPfannschmidt
Copy link
Member

The threads came in when exec Model got introduced in execnet

Before main thread was the default

@nicoddemus
Copy link
Member

nicoddemus commented May 16, 2023

Before main thread was the default

You mean it would always execute the requests serially?

I looked at the other execution models, perhaps it is possible to implement a "dumb" (as in "dumb threads") execution model that executes things immediately, blocking.

@RonnyPfannschmidt
Copy link
Member

problem isnt where the threads are, but configured startup behaviour

aka

def spawn(self, func, *args, **kwargs):

bascially if more than one remote_exec is active due to how xdist starts, then the main thread may or may not be used
its a timing game and every time its lost, xdist runs the worker in a random thread instead of the main thread

@RonnyPfannschmidt
Copy link
Member

rather than changing execmodel again with even more hacks, i'd like to completely remove it instead

before execmodel was introduced, one had to explicitly start up the workerpool
with exexmodel it was started implicitly, and it hasa hack that kinda makes xdist work, but not reliably

@nicoddemus
Copy link
Member

nicoddemus commented May 16, 2023

bascially if more than one remote_exec is active due to how xdist starts, then the main thread may or may not be used
its a timing game and every time its lost, xdist runs the worker in a random thread instead of the main thread

Not sure I was clear, but my point is to have a new exec model which never spawns threads: it would always execute the code immediately, in the main thread.

For example, this is ThreadModel.start:

def start(self, func, args=()):
import _thread
return _thread.start_new_thread(func, args)

My suggestion is a new DumbExecutionModel where start is implemented as:

    def start(self, func, args=()):
         func(*args)

(Or something similar -- I'm sure there's book-keeping being done by the caller to track and retrieve the return value of func)

This is an eagle's eye POV, given I never looked at the execnet code in detail, so it is probable I'm overlooking some details.

rather than changing execmodel again with even more hacks, i'd like to completely remove it instead

I don't have any investment on the existing execution models, does it mean you would remove WorkerPool completely then?

@RonnyPfannschmidt
Copy link
Member

Initially execnet required the workerpool to be explicitly created

It would be enough to return to such a model

We ough not to add a model with fake spawn

@nicoddemus
Copy link
Member

Initially execnet required the workerpool to be explicitly created

So it would execute remote execution requests serially, instead of in parallel using the pool?

@RonnyPfannschmidt
Copy link
Member

Correct

@nicoddemus
Copy link
Member

Related: #150

renovate bot referenced this issue in ixm-one/pytest-cmake-presets May 19, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [pytest-xdist](https://togithub.com/pytest-dev/pytest-xdist)
([changelog](https://pytest-xdist.readthedocs.io/en/latest/changelog.html))
| `3.3.0` -> `3.3.1` |
[![age](https://badges.renovateapi.com/packages/pypi/pytest-xdist/3.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/pytest-xdist/3.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/pytest-xdist/3.3.1/compatibility-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/pytest-xdist/3.3.1/confidence-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pytest-dev/pytest-xdist</summary>

###
[`v3.3.1`](https://togithub.com/pytest-dev/pytest-xdist/blob/HEAD/CHANGELOG.rst#pytest-xdist-331-2023-05-19)

[Compare
Source](https://togithub.com/pytest-dev/pytest-xdist/compare/v3.3.0...v3.3.1)

\===============================

## Bug Fixes

- `#&#8203;907
<https://github.com/pytest-dev/pytest-xdist/issues/907>`\_: Avoid remote
calls during startup as `execnet` by default does not ensure remote
affinity with the
main thread and might accidentally schedule the pytest worker into a
non-main thread, which breaks numerous frameworks,
    for example `asyncio`, `anyio`, `PyQt/PySide`, etc.

A more safe correction will require thread affinity in `execnet`
(`pytest-dev/execnet#&#8203;96
<https://github.com/pytest-dev/execnet/issues/96>`\__).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45NS4xIiwidXBkYXRlZEluVmVyIjoiMzUuOTUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Signed-off-by: Renovate Bot <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
github-actions bot added a commit to luqasz/librouteros that referenced this issue May 22, 2023
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from
3.3.0 to 3.3.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst">pytest-xdist's
changelog</a>.</em></p>
<blockquote>
<h1>pytest-xdist 3.3.1 (2023-05-19)</h1>
<h2>Bug Fixes</h2>
<ul>
<li>
<p><code>[#907](pytest-dev/pytest-xdist#907)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/907&gt;</code>_:
Avoid remote calls during startup as <code>execnet</code> by default
does not ensure remote affinity with the
main thread and might accidentally schedule the pytest worker into a
non-main thread, which breaks numerous frameworks,
for example <code>asyncio</code>, <code>anyio</code>,
<code>PyQt/PySide</code>, etc.</p>
<p>A more safe correction will require thread affinity in
<code>execnet</code> (<code>pytest-dev/execnet#96
&lt;https://github.com/pytest-dev/execnet/issues/96&gt;</code>__).</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/9791021f02ea45198ced023af9984f1a2f010216"><code>9791021</code></a>
Release 3.3.1</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/4e7bd0239e136ef35d28e87838c0bc1b8b7c2189"><code>4e7bd02</code></a>
Avoid unnecessary rinfo calls after creating gateways (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/909">#909</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/52a61434fbb18d980e885ac6a2abfaf23dddadad"><code>52a6143</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/908">#908</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/9efc64eef9214892f7672a3f3b8ed33a7f49ca05"><code>9efc64e</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/906">#906</a>
from nicoddemus/ci-improvements</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/6d39025be3451224e040d39a9643ffdade7256e2"><code>6d39025</code></a>
Use same package in all test runs</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/d8fb60ba7fe56998868a06a69bbcf19715ff5a62"><code>d8fb60b</code></a>
Fix tag creation in deploy workflow</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/4d230b6de761bf5143fe21d6e303f6a125b17dc7"><code>4d230b6</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/905">#905</a>
from pytest-dev/release-3.3.0</li>
<li>See full diff in <a
href="https://github.com/pytest-dev/pytest-xdist/compare/v3.3.0...v3.3.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-xdist&package-manager=pip&previous-version=3.3.0&new-version=3.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
github-merge-queue bot pushed a commit to software-mansion/protostar that referenced this issue May 22, 2023
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from
3.3.0 to 3.3.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst">pytest-xdist's
changelog</a>.</em></p>
<blockquote>
<h1>pytest-xdist 3.3.1 (2023-05-19)</h1>
<h2>Bug Fixes</h2>
<ul>
<li>
<p><code>[#907](pytest-dev/pytest-xdist#907)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/907&gt;</code>_:
Avoid remote calls during startup as <code>execnet</code> by default
does not ensure remote affinity with the
main thread and might accidentally schedule the pytest worker into a
non-main thread, which breaks numerous frameworks,
for example <code>asyncio</code>, <code>anyio</code>,
<code>PyQt/PySide</code>, etc.</p>
<p>A more safe correction will require thread affinity in
<code>execnet</code> (<code>pytest-dev/execnet#96
&lt;https://github.com/pytest-dev/execnet/issues/96&gt;</code>__).</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/9791021f02ea45198ced023af9984f1a2f010216"><code>9791021</code></a>
Release 3.3.1</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/4e7bd0239e136ef35d28e87838c0bc1b8b7c2189"><code>4e7bd02</code></a>
Avoid unnecessary rinfo calls after creating gateways (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/909">#909</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/52a61434fbb18d980e885ac6a2abfaf23dddadad"><code>52a6143</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/908">#908</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/9efc64eef9214892f7672a3f3b8ed33a7f49ca05"><code>9efc64e</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/906">#906</a>
from nicoddemus/ci-improvements</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/6d39025be3451224e040d39a9643ffdade7256e2"><code>6d39025</code></a>
Use same package in all test runs</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/d8fb60ba7fe56998868a06a69bbcf19715ff5a62"><code>d8fb60b</code></a>
Fix tag creation in deploy workflow</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/4d230b6de761bf5143fe21d6e303f6a125b17dc7"><code>4d230b6</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/905">#905</a>
from pytest-dev/release-3.3.0</li>
<li>See full diff in <a
href="https://github.com/pytest-dev/pytest-xdist/compare/v3.3.0...v3.3.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-xdist&package-manager=pip&previous-version=3.3.0&new-version=3.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
folex referenced this issue in fluencelabs/spell Jun 6, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [pytest-xdist](https://togithub.com/pytest-dev/pytest-xdist)
([changelog](https://pytest-xdist.readthedocs.io/en/latest/changelog.html))
| `==2.5.0` -> `==3.3.1` |
[![age](https://badges.renovateapi.com/packages/pypi/pytest-xdist/3.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/pytest-xdist/3.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/pytest-xdist/3.3.1/compatibility-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/pytest-xdist/3.3.1/confidence-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pytest-dev/pytest-xdist</summary>

###
[`v3.3.1`](https://togithub.com/pytest-dev/pytest-xdist/blob/HEAD/CHANGELOG.rst#pytest-xdist-331-2023-05-19)

[Compare
Source](https://togithub.com/pytest-dev/pytest-xdist/compare/v3.3.0...v3.3.1)

\===============================

## Bug Fixes

- `#&#8203;907
<https://github.com/pytest-dev/pytest-xdist/issues/907>`\_: Avoid remote
calls during startup as `execnet` by default does not ensure remote
affinity with the
main thread and might accidentally schedule the pytest worker into a
non-main thread, which breaks numerous frameworks,
    for example `asyncio`, `anyio`, `PyQt/PySide`, etc.

A more safe correction will require thread affinity in `execnet`
(`pytest-dev/execnet#&#8203;96
<https://github.com/pytest-dev/execnet/issues/96>`\__).

###
[`v3.3.0`](https://togithub.com/pytest-dev/pytest-xdist/blob/HEAD/CHANGELOG.rst#pytest-xdist-330-2023-05-12)

[Compare
Source](https://togithub.com/pytest-dev/pytest-xdist/compare/v3.2.1...v3.3.0)

\===============================

## Features

- `#&#8203;555
<https://github.com/pytest-dev/pytest-xdist/issues/555>`\_: Improved
progress output when collecting nodes to be less verbose.

###
[`v3.2.1`](https://togithub.com/pytest-dev/pytest-xdist/blob/HEAD/CHANGELOG.rst#pytest-xdist-321-2023-03-12)

[Compare
Source](https://togithub.com/pytest-dev/pytest-xdist/compare/v3.2.0...v3.2.1)

\===============================

## Bug Fixes

- `#&#8203;884
<https://github.com/pytest-dev/pytest-xdist/issues/884>`\_: Fixed hang
in `worksteal` scheduler.

###
[`v3.2.0`](https://togithub.com/pytest-dev/pytest-xdist/blob/HEAD/CHANGELOG.rst#pytest-xdist-320-2023-02-07)

[Compare
Source](https://togithub.com/pytest-dev/pytest-xdist/compare/v3.1.0...v3.2.0)

\===============================

## Improved Documentation

- `#&#8203;863
<https://github.com/pytest-dev/pytest-xdist/issues/863>`\_: Document
limitations for debugging due to standard I/O of workers not being
forwarded. Also, mention remote debugging as a possible workaround.

## Features

- `#&#8203;855
<https://github.com/pytest-dev/pytest-xdist/issues/855>`\_: Users can
now configure `load` scheduling precision using `--maxschedchunk`
command
    line option.

- `#&#8203;858
<https://github.com/pytest-dev/pytest-xdist/issues/858>`*: New
`worksteal` scheduler, based on the idea of `work stealing
<https://en.wikipedia.org/wiki/Work_stealing>`*. It's similar to `load`
scheduler, but it should handle tests with significantly differing
duration better, and, at the same time, it should provide similar or
better reuse of fixtures.

## Trivial Changes

- `#&#8203;870
<https://github.com/pytest-dev/pytest-xdist/issues/870>`\_: Make the
tests pass even when `$PYTEST_XDIST_AUTO_NUM_WORKERS` is set.

###
[`v3.1.0`](https://togithub.com/pytest-dev/pytest-xdist/blob/HEAD/CHANGELOG.rst#pytest-xdist-310-2022-12-01)

[Compare
Source](https://togithub.com/pytest-dev/pytest-xdist/compare/v3.0.2...v3.1.0)

\===============================

## Features

- `#&#8203;789
<https://github.com/pytest-dev/pytest-xdist/issues/789>`\_: Users can
now set a default distribution mode in their configuration file:

    .. code-block:: ini

        [pytest]
        addopts = --dist loadscope

- `#&#8203;842
<https://github.com/pytest-dev/pytest-xdist/issues/842>`\_: Python 3.11
is now officially supported.

## Removals

- `#&#8203;842
<https://github.com/pytest-dev/pytest-xdist/issues/842>`\_: Python 3.6
is no longer supported.

###
[`v3.0.2`](https://togithub.com/pytest-dev/pytest-xdist/blob/HEAD/CHANGELOG.rst#pytest-xdist-302-2022-10-25)

[Compare
Source](https://togithub.com/pytest-dev/pytest-xdist/compare/v2.5.0...v3.0.2)

\===============================

## Bug Fixes

- `#&#8203;813
<https://github.com/pytest-dev/pytest-xdist/issues/813>`\_: Cancel
shutdown when a crashed worker is restarted.

## Deprecations

- `#&#8203;825
<https://github.com/pytest-dev/pytest-xdist/issues/825>`\_: The
`--rsyncdir` command line argument and `rsyncdirs` config variable are
deprecated.

    The rsync feature will be removed in pytest-xdist 4.0.

- `#&#8203;826
<https://github.com/pytest-dev/pytest-xdist/issues/826>`\_: The
`--looponfail` command line argument and `looponfailroots` config
variable are deprecated.

    The loop-on-fail feature will be removed in pytest-xdist 4.0.

## Improved Documentation

- `#&#8203;791
<https://github.com/pytest-dev/pytest-xdist/issues/791>`\_: Document the
`pytest_xdist_auto_num_workers` hook.

- `#&#8203;796
<https://github.com/pytest-dev/pytest-xdist/issues/796>`\_: Added known
limitations section to documentation.

- `#&#8203;829
<https://github.com/pytest-dev/pytest-xdist/issues/829>`\_: Document the
`-n logical` option.

## Features

- `#&#8203;792
<https://github.com/pytest-dev/pytest-xdist/issues/792>`\_: The
environment variable `PYTEST_XDIST_AUTO_NUM_WORKERS` can now be used to
    specify the default for `-n auto` and `-n logical`.

- `#&#8203;812
<https://github.com/pytest-dev/pytest-xdist/issues/812>`\_: Partially
restore old initial batch distribution algorithm in `LoadScheduling`.

pytest orders tests for optimal sequential execution - i. e. avoiding
unnecessary setup and teardown of fixtures. So executing tests in
consecutive
    chunks is important for optimal performance.

In v1.14, initial test distribution in `LoadScheduling` was changed to
round-robin, optimized for the corner case, when the number of tests is
less
than `2 * number of nodes`. At the same time, it became worse for all
other
    cases.

For example: if some tests use some "heavy" fixture, and these tests fit
into
the initial batch, with round-robin distribution the fixture will be
created
`min(n_tests, n_workers)` times, no matter how many other tests there
are.

With the old algorithm (before v1.14), if there are enough tests not
using
    the fixture, the fixture was created only once.

So restore the old behavior for typical cases where the number of tests
is
much greater than the number of workers (or, strictly speaking, when
there
    are at least 2 tests for every node).

## Removals

- `#&#8203;468
<https://github.com/pytest-dev/pytest-xdist/issues/468>`\_: The
`--boxed` command-line option has been removed. If you still need this
functionality, install `pytest-forked
<https://pypi.org/project/pytest-forked>`\__ separately.

## Trivial Changes

- `#&#8203;468
<https://github.com/pytest-dev/pytest-xdist/issues/468>`\_: The `py`
dependency has been dropped.

- `#&#8203;822
<https://github.com/pytest-dev/pytest-xdist/issues/822>`\_: Replace
internal usage of `py.log` with a custom solution (but with the same
interface).

- `#&#8203;823
<https://github.com/pytest-dev/pytest-xdist/issues/823>`\_: Remove usage
of `py._pydir` as an rsync candidate.

- `#&#8203;824
<https://github.com/pytest-dev/pytest-xdist/issues/824>`\_: Replace
internal usages of `py.path.local` by `pathlib.Path`.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/fluencelabs/spell).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS40MC4wIiwidXBkYXRlZEluVmVyIjoiMzUuOTUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ryankanno pushed a commit to ryankanno/cookiecutter-py that referenced this issue Nov 9, 2023
Bumps the dev group with 4 updates:
[black](https://github.com/psf/black),
[pytest-cov](https://github.com/pytest-dev/pytest-cov),
[pytest-xdist](https://github.com/pytest-dev/pytest-xdist) and
[ruff](https://github.com/astral-sh/ruff).

Updates `black` from 23.10.1 to 23.11.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/psf/black/releases">black's
releases</a>.</em></p>
<blockquote>
<h2>23.11.0</h2>
<h3>Highlights</h3>
<ul>
<li>Support formatting ranges of lines with the new
<code>--line-ranges</code> command-line option
(<a
href="https://redirect.github.com/psf/black/issues/4020">#4020</a>)</li>
</ul>
<h3>Stable style</h3>
<ul>
<li>Fix crash on formatting bytes strings that look like docstrings (<a
href="https://redirect.github.com/psf/black/issues/4003">#4003</a>)</li>
<li>Fix crash when whitespace followed a backslash before newline in a
docstring (<a
href="https://redirect.github.com/psf/black/issues/4008">#4008</a>)</li>
<li>Fix standalone comments inside complex blocks crashing Black (<a
href="https://redirect.github.com/psf/black/issues/4016">#4016</a>)</li>
<li>Fix crash on formatting code like <code>await (a ** b)</code> (<a
href="https://redirect.github.com/psf/black/issues/3994">#3994</a>)</li>
<li>No longer treat leading f-strings as docstrings. This matches
Python's behaviour and
fixes a crash (<a
href="https://redirect.github.com/psf/black/issues/4019">#4019</a>)</li>
</ul>
<h3>Preview style</h3>
<ul>
<li>Multiline dicts and lists that are the sole argument to a function
are now
indented less (<a
href="https://redirect.github.com/psf/black/issues/3964">#3964</a>)</li>
<li>Multiline unpacked dicts and lists as the sole argument to a
function are now also
indented less (<a
href="https://redirect.github.com/psf/black/issues/3992">#3992</a>)</li>
<li>In f-string debug expressions, quote types that are visible in the
final string
are now preserved (<a
href="https://redirect.github.com/psf/black/issues/4005">#4005</a>)</li>
<li>Fix a bug where long <code>case</code> blocks were not split into
multiple lines. Also enable
general trailing comma rules on <code>case</code> blocks (<a
href="https://redirect.github.com/psf/black/issues/4024">#4024</a>)</li>
<li>Keep requiring two empty lines between module-level docstring and
first function or
class definition (<a
href="https://redirect.github.com/psf/black/issues/4028">#4028</a>)</li>
<li>Add support for single-line format skip with other comments on the
same line (<a
href="https://redirect.github.com/psf/black/issues/3959">#3959</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Consistently apply force exclusion logic before resolving symlinks
(<a
href="https://redirect.github.com/psf/black/issues/4015">#4015</a>)</li>
<li>Fix a bug in the matching of absolute path names in
<code>--include</code> (<a
href="https://redirect.github.com/psf/black/issues/3976">#3976</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Fix mypyc builds on arm64 on macOS (<a
href="https://redirect.github.com/psf/black/issues/4017">#4017</a>)</li>
</ul>
<h3>Integrations</h3>
<ul>
<li>Black's pre-commit integration will now run only on git hooks
appropriate for a code
formatter (<a
href="https://redirect.github.com/psf/black/issues/3940">#3940</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/psf/black/blob/main/CHANGES.md">black's
changelog</a>.</em></p>
<blockquote>
<h2>23.11.0</h2>
<h3>Highlights</h3>
<ul>
<li>Support formatting ranges of lines with the new
<code>--line-ranges</code> command-line option
(<a
href="https://redirect.github.com/psf/black/issues/4020">#4020</a>)</li>
</ul>
<h3>Stable style</h3>
<ul>
<li>Fix crash on formatting bytes strings that look like docstrings (<a
href="https://redirect.github.com/psf/black/issues/4003">#4003</a>)</li>
<li>Fix crash when whitespace followed a backslash before newline in a
docstring (<a
href="https://redirect.github.com/psf/black/issues/4008">#4008</a>)</li>
<li>Fix standalone comments inside complex blocks crashing Black (<a
href="https://redirect.github.com/psf/black/issues/4016">#4016</a>)</li>
<li>Fix crash on formatting code like <code>await (a ** b)</code> (<a
href="https://redirect.github.com/psf/black/issues/3994">#3994</a>)</li>
<li>No longer treat leading f-strings as docstrings. This matches
Python's behaviour and
fixes a crash (<a
href="https://redirect.github.com/psf/black/issues/4019">#4019</a>)</li>
</ul>
<h3>Preview style</h3>
<ul>
<li>Multiline dicts and lists that are the sole argument to a function
are now indented
less (<a
href="https://redirect.github.com/psf/black/issues/3964">#3964</a>)</li>
<li>Multiline unpacked dicts and lists as the sole argument to a
function are now also
indented less (<a
href="https://redirect.github.com/psf/black/issues/3992">#3992</a>)</li>
<li>In f-string debug expressions, quote types that are visible in the
final string are
now preserved (<a
href="https://redirect.github.com/psf/black/issues/4005">#4005</a>)</li>
<li>Fix a bug where long <code>case</code> blocks were not split into
multiple lines. Also enable
general trailing comma rules on <code>case</code> blocks (<a
href="https://redirect.github.com/psf/black/issues/4024">#4024</a>)</li>
<li>Keep requiring two empty lines between module-level docstring and
first function or
class definition (<a
href="https://redirect.github.com/psf/black/issues/4028">#4028</a>)</li>
<li>Add support for single-line format skip with other comments on the
same line (<a
href="https://redirect.github.com/psf/black/issues/3959">#3959</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Consistently apply force exclusion logic before resolving symlinks
(<a
href="https://redirect.github.com/psf/black/issues/4015">#4015</a>)</li>
<li>Fix a bug in the matching of absolute path names in
<code>--include</code> (<a
href="https://redirect.github.com/psf/black/issues/3976">#3976</a>)</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Fix mypyc builds on arm64 on macOS (<a
href="https://redirect.github.com/psf/black/issues/4017">#4017</a>)</li>
</ul>
<h3>Integrations</h3>
<ul>
<li>Black's pre-commit integration will now run only on git hooks
appropriate for a code
formatter (<a
href="https://redirect.github.com/psf/black/issues/3940">#3940</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/psf/black/commit/2a1c67e0b2f81df602ec1f6e7aeb030b9709dc7c"><code>2a1c67e</code></a>
Prepare release 23.11.0 (<a
href="https://redirect.github.com/psf/black/issues/4032">#4032</a>)</li>
<li><a
href="https://github.com/psf/black/commit/72e7a2e43eef2aa0c83652bb6725eb004a2a69f3"><code>72e7a2e</code></a>
Remove redundant condition from <code>has_magic_trailing_comma</code>
(<a
href="https://redirect.github.com/psf/black/issues/4023">#4023</a>)</li>
<li><a
href="https://github.com/psf/black/commit/1a7d9c2f58de1ffcbbe6d133f60f283601ba3f54"><code>1a7d9c2</code></a>
Preserve visible quote types for f-string debug expressions (<a
href="https://redirect.github.com/psf/black/issues/4005">#4005</a>)</li>
<li><a
href="https://github.com/psf/black/commit/f4c7be5445c87d9af5eba3d12faea62d2635e3d8"><code>f4c7be5</code></a>
docs: fix minor typo (<a
href="https://redirect.github.com/psf/black/issues/4030">#4030</a>)</li>
<li><a
href="https://github.com/psf/black/commit/2e4fac9d87615e904a49e46a9cab2293e0b13126"><code>2e4fac9</code></a>
Apply force exclude logic before symlink resolution (<a
href="https://redirect.github.com/psf/black/issues/4015">#4015</a>)</li>
<li><a
href="https://github.com/psf/black/commit/66008fda5dc07f5626e5f5d0dcefc476a9c12ab8"><code>66008fd</code></a>
[563] Fix standalone comments inside complex blocks crashing Black (<a
href="https://redirect.github.com/psf/black/issues/4016">#4016</a>)</li>
<li><a
href="https://github.com/psf/black/commit/50ed6221d97b265025abaa66116a7b185f2df5e2"><code>50ed622</code></a>
Fix long case blocks not split into multiple lines (<a
href="https://redirect.github.com/psf/black/issues/4024">#4024</a>)</li>
<li><a
href="https://github.com/psf/black/commit/46be1f8e54ac9a7d67723c0fa28c7bec13a0a2bf"><code>46be1f8</code></a>
Support formatting specified lines (<a
href="https://redirect.github.com/psf/black/issues/4020">#4020</a>)</li>
<li><a
href="https://github.com/psf/black/commit/ecbd9e8cf71f13068c7e6803a534e00363114c91"><code>ecbd9e8</code></a>
Fix crash with f-string docstrings (<a
href="https://redirect.github.com/psf/black/issues/4019">#4019</a>)</li>
<li><a
href="https://github.com/psf/black/commit/e808e61db8c7a8f9c7fd4b2fff2281141f6b2517"><code>e808e61</code></a>
Preview: Keep requiring two empty lines between module-level docstring
and fi...</li>
<li>Additional commits viewable in <a
href="https://github.com/psf/black/compare/23.10.1...23.11.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `pytest-cov` from 4.0.0 to 4.1.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst">pytest-cov's
changelog</a>.</em></p>
<blockquote>
<h2>4.1.0 (2023-05-24)</h2>
<ul>
<li>Updated CI with new Pythons and dependencies.</li>
<li>Removed rsyncdir support. This makes pytest-cov compatible with
xdist 3.0.
Contributed by Sorin Sbarnea in
<code>[#558](pytest-dev/pytest-cov#558)
&lt;https://github.com/pytest-dev/pytest-cov/pull/558&gt;</code>_.</li>
<li>Optimized summary generation to not be performed if no reporting is
active (for example,
when <code>--cov-report=''</code> is used without
<code>--cov-fail-under</code>).
Contributed by Jonathan Stewmon in
<code>[#589](pytest-dev/pytest-cov#589)
&lt;https://github.com/pytest-dev/pytest-cov/pull/589&gt;</code>_.</li>
<li>Added support for JSON reporting.
Contributed by Matthew Gamble in
<code>[#582](pytest-dev/pytest-cov#582)
&lt;https://github.com/pytest-dev/pytest-cov/pull/582&gt;</code>_.</li>
<li>Refactored code to use f-strings.
Contributed by Mark Mayo in
<code>[#572](pytest-dev/pytest-cov#572)
&lt;https://github.com/pytest-dev/pytest-cov/pull/572&gt;</code>_.</li>
<li>Fixed a skip in the test suite for some old xdist.
Contributed by a bunch of people in
<code>[#565](pytest-dev/pytest-cov#565)
&lt;https://github.com/pytest-dev/pytest-cov/pull/565&gt;</code>_.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/2c9f2170d8575b21bafb6402eb30ca7de31e20b9"><code>2c9f217</code></a>
Bump version: 4.0.0 → 4.1.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/4d245df8f75e434a9e1b162b51265d6a45017465"><code>4d245df</code></a>
Update changelog and authors.</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/7b095c84ae521b14058d7d520ef36372849063a8"><code>7b095c8</code></a>
Skip starting from xdist 3.0.2 (where boxed was removed).</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/605d6902b3b3d17aad0bf811b8c580fc895724ca"><code>605d690</code></a>
disabling boxed test if version xdist newer than 2.5.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/76fb2a6cb2c4a4a788a5b62710848daf9c8fb7ce"><code>76fb2a6</code></a>
introduced f-strings</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/0d63ede0d2ca9f4acc8329aa4261a7cec489ffdb"><code>0d63ede</code></a>
Update test config. Reapply some of the changes from PR567 to the right
file ...</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/f3d8d8380f6a4b265353fe7cd509b040702f1e64"><code>f3d8d83</code></a>
Add support for JSON reporter</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/dec02abeb9fa8ee3547baa054bde6006bea530ee"><code>dec02ab</code></a>
Update test deps.</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/88a7d348986bace58e26c88a713ef35f900ce2ef"><code>88a7d34</code></a>
chore: update AUTHORS and CHANGELOG</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/74eb4cc8b684269b89735e31b623f0f9795c5d5c"><code>74eb4cc</code></a>
perf: only call summary when the report will be used</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-cov/compare/v4.0.0...v4.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `pytest-xdist` from 3.2.0 to 3.3.1
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst">pytest-xdist's
changelog</a>.</em></p>
<blockquote>
<h1>pytest-xdist 3.3.1 (2023-05-19)</h1>
<h2>Bug Fixes</h2>
<ul>
<li>
<p><code>[#907](pytest-dev/pytest-xdist#907)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/907&gt;</code>_:
Avoid remote calls during startup as <code>execnet</code> by default
does not ensure remote affinity with the
main thread and might accidentally schedule the pytest worker into a
non-main thread, which breaks numerous frameworks,
for example <code>asyncio</code>, <code>anyio</code>,
<code>PyQt/PySide</code>, etc.</p>
<p>A more safe correction will require thread affinity in
<code>execnet</code> (<code>pytest-dev/execnet#96
&lt;https://github.com/pytest-dev/execnet/issues/96&gt;</code>__).</p>
</li>
</ul>
<h1>pytest-xdist 3.3.0 (2023-05-12)</h1>
<h2>Features</h2>
<ul>
<li><code>[#555](pytest-dev/pytest-xdist#555)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/555&gt;</code>_:
Improved progress output when collecting nodes to be less verbose.</li>
</ul>
<h1>pytest-xdist 3.2.1 (2023-03-12)</h1>
<h2>Bug Fixes</h2>
<ul>
<li><code>[#884](pytest-dev/pytest-xdist#884)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/884&gt;</code>_:
Fixed hang in <code>worksteal</code> scheduler.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/9791021f02ea45198ced023af9984f1a2f010216"><code>9791021</code></a>
Release 3.3.1</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/4e7bd0239e136ef35d28e87838c0bc1b8b7c2189"><code>4e7bd02</code></a>
Avoid unnecessary rinfo calls after creating gateways (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/909">#909</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/52a61434fbb18d980e885ac6a2abfaf23dddadad"><code>52a6143</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/908">#908</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/9efc64eef9214892f7672a3f3b8ed33a7f49ca05"><code>9efc64e</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/906">#906</a>
from nicoddemus/ci-improvements</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/6d39025be3451224e040d39a9643ffdade7256e2"><code>6d39025</code></a>
Use same package in all test runs</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/d8fb60ba7fe56998868a06a69bbcf19715ff5a62"><code>d8fb60b</code></a>
Fix tag creation in deploy workflow</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/4d230b6de761bf5143fe21d6e303f6a125b17dc7"><code>4d230b6</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/905">#905</a>
from pytest-dev/release-3.3.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/f5b4a5d6edea6a9eb016730f5de0aae8cbc9930e"><code>f5b4a5d</code></a>
Configure 'test' workflow to cancel running jobs for the branch</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/657ba9ac7fe5f58930f7ed39c359893469c65936"><code>657ba9a</code></a>
Only test on-push for master and a specific branch name</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/fa08e0987bea6a094deb48fda6b61d37373b4520"><code>fa08e09</code></a>
Add check-package step also to 'test' workflow</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-xdist/compare/v3.2.0...v3.3.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `ruff` from 0.1.3 to 0.1.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>v0.1.5</h2>
<h2>Changes</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>flake8-bandit</code>] Implement <code>mako-templates</code>
(<code>S702</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8533">#8533</a>)</li>
<li>[<code>flake8-trio</code>] Implement <code>TRIO105</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8490">#8490</a>)</li>
<li>[<code>flake8-trio</code>] Implement <code>TRIO109</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8534">#8534</a>)</li>
<li>[<code>flake8-trio</code>] Implement <code>TRIO110</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8537">#8537</a>)</li>
<li>[<code>flake8-trio</code>] Implement <code>TRIO115</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8486">#8486</a>)</li>
<li>[<code>refurb</code>] Implement <code>type-none-comparison</code>
(<code>FURB169</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8487">#8487</a>)</li>
<li>Flag all comparisons against builtin types in <code>E721</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8491">#8491</a>)</li>
<li>Make <code>SIM118</code> fix as safe when the expression is a known
dictionary (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8525">#8525</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix multiline lambda expression statement formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8466">#8466</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Add hidden <code>--extension</code> to override inference of source
type from file extension (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8373">#8373</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Account for selector specificity when merging
<code>extend_unsafe_fixes</code> and <code>override
extend_safe_fixes</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8444">#8444</a>)</li>
<li>Add support for disabling cache with <code>RUFF_NO_CACHE</code>
environment variable (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8538">#8538</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>E721</code>] Flag comparisons to <code>memoryview</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8485">#8485</a>)</li>
<li>Allow collapsed-ellipsis bodies in other statements (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8499">#8499</a>)</li>
<li>Avoid <code>D301</code> autofix for <code>u</code> prefixed strings
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8495">#8495</a>)</li>
<li>Only flag <code>flake8-trio</code> rules when <code>trio</code>
import is present (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8550">#8550</a>)</li>
<li>Reject more syntactically invalid Python programs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8524">#8524</a>)</li>
<li>Avoid raising <code>TRIO115</code> violations for
<code>trio.sleep(...)</code> calls with non-number values (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8532">#8532</a>)</li>
<li>Fix <code>F841</code> false negative on assignment to multiple
variables (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8489">#8489</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Fix link to isort <code>known-first-party</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8562">#8562</a>)</li>
<li>Add notes on fix safety to a few rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8500">#8500</a>)</li>
<li>Add missing toml config tabs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8512">#8512</a>)</li>
<li>Add instructions for configuration of Emacs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8488">#8488</a>)</li>
<li>Improve detail link contrast in dark mode (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8548">#8548</a>)</li>
<li>Fix typo in example (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8506">#8506</a>)</li>
<li>Added tabs for configuration files in the documentation (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8480">#8480</a>)</li>
<li>Recommend <code>project.requires-python</code> over
<code>target-version</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8513">#8513</a>)</li>
<li>Add singleton escape hatch to <code>B008</code> documentation (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8501">#8501</a>)</li>
<li>Fix tab configuration docs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8502">#8502</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.1.5</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>flake8-bandit</code>] Implement <code>mako-templates</code>
(<code>S702</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8533">#8533</a>)</li>
<li>[<code>flake8-trio</code>] Implement <code>TRIO105</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8490">#8490</a>)</li>
<li>[<code>flake8-trio</code>] Implement <code>TRIO109</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8534">#8534</a>)</li>
<li>[<code>flake8-trio</code>] Implement <code>TRIO110</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8537">#8537</a>)</li>
<li>[<code>flake8-trio</code>] Implement <code>TRIO115</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8486">#8486</a>)</li>
<li>[<code>refurb</code>] Implement <code>type-none-comparison</code>
(<code>FURB169</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8487">#8487</a>)</li>
<li>Flag all comparisons against builtin types in <code>E721</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8491">#8491</a>)</li>
<li>Make <code>SIM118</code> fix as safe when the expression is a known
dictionary (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8525">#8525</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix multiline lambda expression statement formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8466">#8466</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Add hidden <code>--extension</code> to override inference of source
type from file extension (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8373">#8373</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>Account for selector specificity when merging
<code>extend_unsafe_fixes</code> and <code>override
extend_safe_fixes</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8444">#8444</a>)</li>
<li>Add support for disabling cache with <code>RUFF_NO_CACHE</code>
environment variable (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8538">#8538</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>E721</code>] Flag comparisons to <code>memoryview</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8485">#8485</a>)</li>
<li>Allow collapsed-ellipsis bodies in other statements (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8499">#8499</a>)</li>
<li>Avoid <code>D301</code> autofix for <code>u</code> prefixed strings
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8495">#8495</a>)</li>
<li>Only flag <code>flake8-trio</code> rules when <code>trio</code>
import is present (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8550">#8550</a>)</li>
<li>Reject more syntactically invalid Python programs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8524">#8524</a>)</li>
<li>Avoid raising <code>TRIO115</code> violations for
<code>trio.sleep(...)</code> calls with non-number values (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8532">#8532</a>)</li>
<li>Fix <code>F841</code> false negative on assignment to multiple
variables (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8489">#8489</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Fix link to isort <code>known-first-party</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8562">#8562</a>)</li>
<li>Add notes on fix safety to a few rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8500">#8500</a>)</li>
<li>Add missing toml config tabs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8512">#8512</a>)</li>
<li>Add instructions for configuration of Emacs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8488">#8488</a>)</li>
<li>Improve detail link contrast in dark mode (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8548">#8548</a>)</li>
<li>Fix typo in example (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8506">#8506</a>)</li>
<li>Added tabs for configuration files in the documentation (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8480">#8480</a>)</li>
<li>Recommend <code>project.requires-python</code> over
<code>target-version</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8513">#8513</a>)</li>
<li>Add singleton escape hatch to <code>B008</code> documentation (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8501">#8501</a>)</li>
<li>Fix tab configuration docs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8502">#8502</a>)</li>
</ul>
<h2>0.1.4</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/3956f38999ff7c036e9d1ac9410b3eff834cb158"><code>3956f38</code></a>
Prepare release 0.1.5 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8570">#8570</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/fe9727ac38db6d3b8ab3efcbf4e1766eb2ec9736"><code>fe9727a</code></a>
Add <code>rooster</code> release management configuration and
instructions (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8567">#8567</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/3ebaca52464e1db3d808adca9c3de09b90dabfaf"><code>3ebaca5</code></a>
Doc: Fix link to isort <code>known-first-party</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8562">#8562</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/7391f74cbcf24b9c09244a3376bbb2a0ca8929d4"><code>7391f74</code></a>
Add hidden <code>--extension</code> to override inference of source type
from file exten...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/71e93a9fa40d98414c7859b827dac7d6eda7d523"><code>71e93a9</code></a>
Only flag flake8-trio rule when trio is present (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8550">#8550</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e2c7b1ece6db83af919c4c2e006bf00496d7fa73"><code>e2c7b1e</code></a>
[TRIO] Add TRIO109 rule (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8534">#8534</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/621e98f4523267526391947154bb9f64fdb8c9c6"><code>621e98f</code></a>
Improve detail link contrast in dark mode (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8548">#8548</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0126f74c29c5647295bebf4b42d79f12b7ffd8e4"><code>0126f74</code></a>
Add TRIO110 rule (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8537">#8537</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/fce9f634180989089d6f761913b34d7219a10138"><code>fce9f63</code></a>
[<code>flake8-bandit</code>] Implement <code>mako-templates</code>
(<code>S702</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8533">#8533</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/ce549e75bc93e200f82b3bde48167efb60f8f750"><code>ce549e7</code></a>
Update pre-commit documentation (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8545">#8545</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.1.3...v0.1.5">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
yarnabrina pushed a commit to sktime/sktime that referenced this issue Nov 17, 2023
….4,>=3.3 to >=3.3,<3.5 (#5551)

Updates the requirements on
[pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to permit the
latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst">pytest-xdist's
changelog</a>.</em></p>
<blockquote>
<h1>pytest-xdist 3.4.0 (2023-11-11)</h1>
<h2>Features</h2>
<ul>
<li>
<p><code>[#963](pytest-dev/pytest-xdist#963)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/963&gt;</code>_:
Wait for workers to finish reporting when test run stops early.</p>
<p>This makes sure that the results of in-progress tests are displayed.
Previously these reports were being discarded, losing information about
the
test run.</p>
</li>
<li>
<p><code>[#965](pytest-dev/pytest-xdist#965)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/965&gt;</code>_:
Added support for Python 3.12.</p>
</li>
</ul>
<h1>pytest-xdist 3.3.1 (2023-05-19)</h1>
<h2>Bug Fixes</h2>
<ul>
<li>
<p><code>[#907](pytest-dev/pytest-xdist#907)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/907&gt;</code>_:
Avoid remote calls during startup as <code>execnet</code> by default
does not ensure remote affinity with the
main thread and might accidentally schedule the pytest worker into a
non-main thread, which breaks numerous frameworks,
for example <code>asyncio</code>, <code>anyio</code>,
<code>PyQt/PySide</code>, etc.</p>
<p>A more safe correction will require thread affinity in
<code>execnet</code> (<code>pytest-dev/execnet#96
&lt;https://github.com/pytest-dev/execnet/issues/96&gt;</code>__).</p>
</li>
</ul>
<h1>pytest-xdist 3.3.0 (2023-05-12)</h1>
<h2>Features</h2>
<ul>
<li><code>[#555](pytest-dev/pytest-xdist#555)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/555&gt;</code>_:
Improved progress output when collecting nodes to be less verbose.</li>
</ul>
<h1>pytest-xdist 3.2.1 (2023-03-12)</h1>
<h2>Bug Fixes</h2>
<ul>
<li><code>[#884](pytest-dev/pytest-xdist#884)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/884&gt;</code>_:
Fixed hang in <code>worksteal</code> scheduler.</li>
</ul>
<h1>pytest-xdist 3.2.0 (2023-02-07)</h1>
<p>Improved Documentation</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/a6b56112f9b686aed7a354e0d50ecc26ad2d9dfe"><code>a6b5611</code></a>
Update CHANGELOG</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/64f9388f4164e9f64d98a7580933e958ea4a09d5"><code>64f9388</code></a>
Add support for Python 3.12</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/230ba6ad1057574c9f3d42a97f890788cd9ec6c3"><code>230ba6a</code></a>
Properly wait for workers when test run terminates early (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/963">#963</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/93ca202b400eecc62919bcd9b0bab001e3f3f7ef"><code>93ca202</code></a>
fix typo index -&gt; instead</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/8f3d1ad92f02a251bcae5dc648a70c3f30ece364"><code>8f3d1ad</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/ab3d6a9ee5aa4145fde339823ab1605c02f28ba4"><code>ab3d6a9</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/955">#955</a>
from pytest-dev/pre-commit-ci-update-config</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/a5210d41034b2f48f2df05d2b62b0fb3495f346f"><code>a5210d4</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/0b6b9c3c3858d05c353a14b29c58c8c3f63ae437"><code>0b6b9c3</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/954">#954</a>
from pytest-dev/pre-commit-ci-update-config</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/838434c269a225bef167fa4314df905b97b9e958"><code>838434c</code></a>
Install requirements.txt while building docs</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/b85a4717f96e2b40910aaa289428671779cb6ecb"><code>b85a471</code></a>
Add docs/requirements.txt</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-xdist/compare/v3.3.0...v3.4.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
mhils pushed a commit to mitmproxy/mitmproxy that referenced this issue Dec 2, 2023
)

Updates the requirements on
[pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to permit the
latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst">pytest-xdist's
changelog</a>.</em></p>
<blockquote>
<h1>pytest-xdist 3.5.0 (2023-11-21)</h1>
<h2>Features</h2>
<ul>
<li><code>[#632](pytest-dev/pytest-xdist#632)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/632&gt;</code>_:
<code>--dist=loadscope</code> now sorts scopes by number of tests to
assign largest scopes early -- in many cases this should improve overall
test session running time, as there is less chance of a large scope
being left to be processed near the end of the session, leaving other
workers idle.</li>
</ul>
<h1>pytest-xdist 3.4.0 (2023-11-11)</h1>
<h2>Features</h2>
<ul>
<li>
<p><code>[#963](pytest-dev/pytest-xdist#963)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/963&gt;</code>_:
Wait for workers to finish reporting when test run stops early.</p>
<p>This makes sure that the results of in-progress tests are displayed.
Previously these reports were being discarded, losing information about
the
test run.</p>
</li>
<li>
<p><code>[#965](pytest-dev/pytest-xdist#965)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/965&gt;</code>_:
Added support for Python 3.12.</p>
</li>
</ul>
<h1>pytest-xdist 3.3.1 (2023-05-19)</h1>
<h2>Bug Fixes</h2>
<ul>
<li>
<p><code>[#907](pytest-dev/pytest-xdist#907)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/907&gt;</code>_:
Avoid remote calls during startup as <code>execnet</code> by default
does not ensure remote affinity with the
main thread and might accidentally schedule the pytest worker into a
non-main thread, which breaks numerous frameworks,
for example <code>asyncio</code>, <code>anyio</code>,
<code>PyQt/PySide</code>, etc.</p>
<p>A more safe correction will require thread affinity in
<code>execnet</code> (<code>pytest-dev/execnet#96
&lt;https://github.com/pytest-dev/execnet/issues/96&gt;</code>__).</p>
</li>
</ul>
<h1>pytest-xdist 3.3.0 (2023-05-12)</h1>
<h2>Features</h2>
<ul>
<li><code>[#555](pytest-dev/pytest-xdist#555)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/555&gt;</code>_:
Improved progress output when collecting nodes to be less verbose.</li>
</ul>
<h1>pytest-xdist 3.2.1 (2023-03-12)</h1>
<p>Bug Fixes</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/95b309e980796a261045d770f69c016ca741473d"><code>95b309e</code></a>
Release 3.5.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/3fe877bc6d7211f31e55d2d561803f76ea95b935"><code>3fe877b</code></a>
LoadScope scheduler: Sort scopes by number of tests to assign biggest
scopes ...</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/f36ea25cb53cb960037f4a8510816b81fa313035"><code>f36ea25</code></a>
Create GitHub release after deploy (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/973">#973</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/d81f57508d064915fc16ace5dea4d43406db2ba0"><code>d81f575</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/969">#969</a>
from pytest-dev/pre-commit-ci-update-config</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/1d2616418c046d0e6f059b8f76e35a0627409616"><code>1d26164</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/5f43575b42d6d4c0078de807880b8b0791b75823"><code>5f43575</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/966">#966</a>
from pytest-dev/release-3.4.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/a6b56112f9b686aed7a354e0d50ecc26ad2d9dfe"><code>a6b5611</code></a>
Update CHANGELOG</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/64f9388f4164e9f64d98a7580933e958ea4a09d5"><code>64f9388</code></a>
Add support for Python 3.12</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/230ba6ad1057574c9f3d42a97f890788cd9ec6c3"><code>230ba6a</code></a>
Properly wait for workers when test run terminates early (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/963">#963</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/93ca202b400eecc62919bcd9b0bab001e3f3f7ef"><code>93ca202</code></a>
fix typo index -&gt; instead</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-xdist/compare/v2.1.0...v3.5.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
zmedico added a commit to zmedico/portage that referenced this issue Feb 14, 2024
Since pytest-xdist workers crash intermittently for the multiprocessing
spawn start method, use pytest-rerunfailures to detect and handle this
case. Only use pytest-rerunfailures for the spawn start-method since
that is the only case where we've observed intermittent pytest-xdist
worker crashes, and use --only-rerun 'worker .* crashed while running'
to ensure that rerun only triggers for worker crashes.

Bug: https://bugs.gentoo.org/924416
See: pytest-dev/execnet#96
Signed-off-by: Zac Medico <[email protected]>
zmedico added a commit to zmedico/execnet that referenced this issue Feb 15, 2024
In order to prevent tasks from running in a non-main thread,
wait for the previous task inside _try_send_to_primary_thread,
then schedule the next task.

Closes: pytest-dev#96
zmedico added a commit to zmedico/execnet that referenced this issue Feb 16, 2024
In order to prevent tasks from running in a non-main thread,
wait for the previous task inside _try_send_to_primary_thread,
then schedule the next task. Add a main_thread_only execmodel
to distinguish this new behavior from the existing thread
execmodel, since users of the thread execmodel expect that
tasks can run in multiple threads concurrently.

Closes: pytest-dev#96
zmedico added a commit to zmedico/execnet that referenced this issue Feb 16, 2024
In order to prevent tasks from running in a non-main thread,
wait for the previous task inside _try_send_to_primary_thread,
then schedule the next task. Add a main_thread_only execmodel
to distinguish this new behavior from the existing thread
execmodel, since users of the thread execmodel expect that
tasks can run in multiple threads concurrently.

Closes: pytest-dev#96
zmedico added a commit to zmedico/execnet that referenced this issue Feb 16, 2024
In order to prevent tasks from running in a non-main thread,
wait for the previous task inside _try_send_to_primary_thread,
then schedule the next task. Add a main_thread_only execmodel
to distinguish this new behavior from the existing thread
execmodel, since users of the thread execmodel expect that
tasks can run in multiple threads concurrently.

Closes: pytest-dev#96
zmedico added a commit to zmedico/execnet that referenced this issue Feb 16, 2024
In order to prevent tasks from running in a non-main thread,
wait for the previous task inside _try_send_to_primary_thread,
then schedule the next task. Add a main_thread_only execmodel
to distinguish this new behavior from the existing thread
execmodel, since users of the thread execmodel expect that
tasks can run in multiple threads concurrently.

Closes: pytest-dev#96
zmedico added a commit to zmedico/execnet that referenced this issue Feb 16, 2024
In order to prevent tasks from running in a non-main thread,
wait for the previous task inside _try_send_to_primary_thread,
then schedule the next task. Add a main_thread_only execmodel
to distinguish this new behavior from the existing thread
execmodel, since users of the thread execmodel expect that
tasks can run in multiple threads concurrently.

Closes: pytest-dev#96
zmedico added a commit to zmedico/execnet that referenced this issue Feb 16, 2024
In order to prevent tasks from running in a non-main thread,
wait for the previous task inside _try_send_to_primary_thread,
then schedule the next task. Add a main_thread_only execmodel
to distinguish this new behavior from the existing thread
execmodel, since users of the thread execmodel expect that
tasks can run in multiple threads concurrently.

Closes: pytest-dev#96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants