From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C372B158089 for ; Thu, 2 Nov 2023 14:58:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 18E922BC013; Thu, 2 Nov 2023 14:58:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 037292BC013 for ; Thu, 2 Nov 2023 14:58:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4B226335D1E for ; Thu, 2 Nov 2023 14:58:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D5ED0AA6 for ; Thu, 2 Nov 2023 14:58:37 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1698937089.cc7c40199850acb3d36f0a6452987231d592c360.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/__init__.py X-VCS-Directories: lib/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: cc7c40199850acb3d36f0a6452987231d592c360 X-VCS-Branch: master Date: Thu, 2 Nov 2023 14:58:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1d4149f9-edb5-41fe-8a1d-20cf9e827753 X-Archives-Hash: eed24ed59993b16e0e1fd3d9cb3b5a6c commit: cc7c40199850acb3d36f0a6452987231d592c360 Author: Zac Medico gentoo org> AuthorDate: Wed Nov 1 05:00:13 2023 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Nov 2 14:58:09 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cc7c4019 Use documented os.register_at_fork function The multiprocessing.util.register_after_fork function is undocumented, so use the documented os.register_at_fork function instead. Signed-off-by: Zac Medico gentoo.org> lib/portage/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py index b26d0cfd53..aa81bdb4c2 100644 --- a/lib/portage/__init__.py +++ b/lib/portage/__init__.py @@ -16,7 +16,7 @@ try: if not hasattr(errno, "ESTALE"): # ESTALE may not be defined on some systems, such as interix. errno.ESTALE = -1 - import multiprocessing.util + import functools import re import types import platform @@ -421,7 +421,7 @@ class _ForkWatcher: _ForkWatcher.hook(_ForkWatcher) -multiprocessing.util.register_after_fork(_ForkWatcher, _ForkWatcher.hook) +os.register_at_fork(after_in_child=functools.partial(_ForkWatcher.hook, _ForkWatcher)) def getpid():