Summary: | sys-apps/portage: use default asyncio event loop implementation in child processes | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Zac Medico <zmedico> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | zmedico |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://github.com/python/cpython/pull/99769 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 756028, 758719 |
Description
Zac Medico
![]() Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/99c01f37b89ab98d16a0ef0f1e2164f9 https://github.com/gentoo/portage/pull/645 Python v3.6.1 was the first version with the fix for https://bugs.python.org/issue29703: https://github.com/python/cpython/commit/01e5230ef0b28658cf7311be199363eda98808bd Since 3.6.3-r1 was the first stable 3.6.x in gentoo (bug 639070), for portage dependencies it's reasonable ignore the fact that the bug existed in v3.6.0. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=58d8e4f6a917e262596108eb7bed1c2ef981e9de commit 58d8e4f6a917e262596108eb7bed1c2ef981e9de Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-12-06 08:44:20 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-12-07 02:28:28 +0000 Use default asyncio event loop implementation in child processes Use the default asyncio event loop implementation in child processes, instead of portage's internal EventLoop. After fork, force instantiation of a new event loop policy as a workaround for https://bugs.python.org/issue22087, which is necessary for RetryTestCase to succeed. Bug: https://bugs.gentoo.org/758740 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/__init__.py | 4 ++++ lib/portage/util/_eventloop/global_event_loop.py | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a1a30033dd0e79e4678a5a6a8ce8d3ceddf265c commit 6a1a30033dd0e79e4678a5a6a8ce8d3ceddf265c Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-12-07 08:13:48 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-12-07 08:48:09 +0000 sys-apps/portage: Bump to version 3.0.12 #758740 Use default asyncio event loop in child processes #758755 Use default asyncio event loop in API consumer threads Bug: https://bugs.gentoo.org/758740 Bug: https://bugs.gentoo.org/758755 Bug: https://bugs.gentoo.org/756028 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.12.ebuild | 267 +++++++++++++++++++++++++++++++++ 2 files changed, 268 insertions(+) (In reply to Zac Medico from comment #0) > > + # Workaround https://bugs.python.org/issue22087. > > + asyncio.set_event_loop_policy(asyncio.DefaultEventLoopPolicy()) We can skip this set_event_loop_policy call when sys.version_info >= (3, 12) since it was fixed in v3.12.0a2-134-g191708c56cf here: https://github.com/python/cpython/pull/99769 |