pyodide/cpython/patches/0004-Allow-multiprocessing....

32 lines
778 B
Diff

From 3228232e38b3aee5023231b518750d8de38a9de7 Mon Sep 17 00:00:00 2001
From: Hood Chatham <roberthoodchatham@gmail.com>
Date: Mon, 19 Dec 2022 09:09:14 -0800
Subject: [PATCH 4/6] Allow multiprocessing.connection top level import
Upstream PR:
https://github.com/python/cpython/pull/114808
---
Lib/multiprocessing/connection.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py
index dbbf106f68..e92edf6c30 100644
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -19,7 +19,10 @@
import tempfile
import itertools
-import _multiprocessing
+try:
+ import _multiprocessing
+except ModuleNotFoundError:
+ pass
from . import util
--
2.25.1