File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
1111# ANY KIND, either express or implied. See the License for the specific
1212# language governing permissions and limitations under the License.
13+ import multiprocessing
1314import os
1415import shutil
1516import signal
@@ -80,7 +81,15 @@ def test_non_file_like_obj(self):
8081class TestBaseManager (unittest .TestCase ):
8182 def create_pid_manager (self ):
8283 class PIDManager (BaseManager ):
83- pass
84+ def __init__ (self ):
85+ # Python 3.14 changed the non-macOS POSIX default to forkserver
86+ # but the code in this module does not work with it
87+ # See https://github.com/python/cpython/issues/125714
88+ if multiprocessing .get_start_method () == 'forkserver' :
89+ ctx = multiprocessing .get_context (method = 'fork' )
90+ else :
91+ ctx = multiprocessing .get_context ()
92+ super ().__init__ (ctx = ctx )
8493
8594 PIDManager .register ('getpid' , os .getpid )
8695 return PIDManager ()
You can’t perform that action at this time.
0 commit comments