commit: f0084472c04f93c7a28b881ebc1c18edb42fde83 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sat Nov 22 19:18:26 2025 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Thu Nov 27 05:16:24 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f0084472
elog/messages.py: Replace lazyimport with function local import Bug: https://bugs.gentoo.org/951146 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> lib/portage/elog/messages.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/portage/elog/messages.py b/lib/portage/elog/messages.py index 3ec9dd80e0..3afdf2cec8 100644 --- a/lib/portage/elog/messages.py +++ b/lib/portage/elog/messages.py @@ -1,14 +1,7 @@ # elog/messages.py - elog core functions -# Copyright 2006-2020 Gentoo Authors +# Copyright 2006-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -import portage - -portage.proxy.lazyimport.lazyimport( - globals(), - "portage.output:colorize", - "portage.util:writemsg", -) from portage.const import EBUILD_PHASES from portage.localization import _ @@ -34,6 +27,8 @@ def collect_ebuild_messages(path): """Collect elog messages generated by the bash logging function stored at 'path'. """ + from portage.util import writemsg + mylogfiles = None try: mylogfiles = os.listdir(path) @@ -107,6 +102,7 @@ def _elog_base(level, msg, phase="other", key=None, color=None, out=None): """Backend for the other messaging functions, should not be called directly. """ + from portage.output import colorize # TODO: Have callers pass in a more unique 'key' parameter than a plain # cpv, in order to ensure that messages are properly grouped together
