diff --git a/docs/platforms/python/troubleshooting.mdx b/docs/platforms/python/troubleshooting.mdx index ace082a2ccd71..76cb2200ab173 100644 --- a/docs/platforms/python/troubleshooting.mdx +++ b/docs/platforms/python/troubleshooting.mdx @@ -138,9 +138,9 @@ If you need more fine-grained control over the behavior of the socket, check out socket-options. - + -If you're on Python version 3.12 or greater, you might see the following deprecation warning on Linux environments since the SDK spawns several threads. +If you're on Python version 3.12 or 3.13, you might see the following deprecation warning on Linux environments since the SDK spawns several threads. ``` DeprecationWarning: This process is multi-threaded, use of fork() may lead to deadlocks in the child. @@ -157,10 +157,13 @@ import concurrent.futures sentry_sdk.init() if __name__ == "__main__": - multiprocessing.set_start_method("spawn") + multiprocessing.set_start_method("forkserver") # or "spawn" pool = concurrent.futures.ProcessPoolExecutor() pool.submit(sentry_sdk.capture_message, "world") ``` + +`fork` was the default start method on POSIX platforms on Python 3.13 and lower. In Python 3.14, the default start method on POSIX platforms was changed to `forkserver`. On Windows and macOS the default is `spawn`. +