[{"id":22067,"web_url":"https://patchwork.libcamera.org/comment/22067/","msgid":"<YfHMlxzuwD2RMnvA@pendragon.ideasonboard.com>","date":"2022-01-26T22:35:03","subject":"Re: [libcamera-devel] [PATCH v1] utils: ipc: Add __init__.py for\n\tlocal module utils/ipc/generators","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Han-Lin,\n\nThank you for the patch.\n\nOn Thu, Jan 27, 2022 at 02:18:07AM +0800, Han-Lin Chen wrote:\n> It's to fix build errors with mojom in ChromeOS chroot. The reason is that\n> ChromeOS recently moves native mojom generators module into site-packages,\n> which has higher import precedence than the local namespace package and shadows\n> the local package of the same. Add __init__.py to make it an explicit package\n> to avoid shadowing.\n> \n> Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>\n\nThat's interesting. It led me to try and understand how python searches\nfor modules. A directory with an __init__.py file is considered to be a\nregular package, while a directory without such a file is a namespace\npackage. The same search order is used for both, but namespace packages\nare only considered if no regular package can be found. This is\ndescribed in https://www.python.org/dev/peps/pep-0420/#specification.\n\nTested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  utils/ipc/generators/__init__.py | 0\n>  1 file changed, 0 insertions(+), 0 deletions(-)\n>  create mode 100644 utils/ipc/generators/__init__.py\n> \n> diff --git a/utils/ipc/generators/__init__.py b/utils/ipc/generators/__init__.py\n> new file mode 100644\n> index 00000000..e69de29b","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id F1861BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 Jan 2022 22:35:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 29F09609B0;\n\tWed, 26 Jan 2022 23:35:24 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D9D7609A9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Jan 2022 23:35:23 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 97160478;\n\tWed, 26 Jan 2022 23:35:22 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Re9g9NOR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1643236522;\n\tbh=UVUBW7Kr1WqK/vMui8Q4/pAabyXFPnut7BUEpKbWlu8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Re9g9NORDn0n1r6LMgoDdjCkGVbqRLX2ykDKKK4Zo3ANrkRLry6eXT6er+l8SiJ8B\n\tEynFp0CTVeWzSAK9HPREC+LcIxpKj4Jt2o9bp2olU71eo/GWq2zAYD5l2gOnRXFvQV\n\tmlz6dBPlsnNJIk80N59muCUCRZhXlHJbefYISe40=","Date":"Thu, 27 Jan 2022 00:35:03 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Han-Lin Chen <hanlinchen@chromium.org>","Message-ID":"<YfHMlxzuwD2RMnvA@pendragon.ideasonboard.com>","References":"<20220126181807.3022258-1-hanlinchen@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220126181807.3022258-1-hanlinchen@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH v1] utils: ipc: Add __init__.py for\n\tlocal module utils/ipc/generators","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22068,"web_url":"https://patchwork.libcamera.org/comment/22068/","msgid":"<20220127035506.GM4255@pyrite.rasen.tech>","date":"2022-01-27T03:55:06","subject":"Re: [libcamera-devel] [PATCH v1] utils: ipc: Add __init__.py for\n\tlocal module utils/ipc/generators","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Han-Lin,\n\nOn Thu, Jan 27, 2022 at 02:18:07AM +0800, Han-Lin Chen wrote:\n> It's to fix build errors with mojom in ChromeOS chroot. The reason is that\n> ChromeOS recently moves native mojom generators module into site-packages,\n> which has higher import precedence than the local namespace package and shadows\n> the local package of the same. Add __init__.py to make it an explicit package\n> to avoid shadowing.\n> \n> Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>\n\nReviewed-by: Paul ELder <paul.elder@ideasonboard.com>\n\n> ---\n>  utils/ipc/generators/__init__.py | 0\n>  1 file changed, 0 insertions(+), 0 deletions(-)\n>  create mode 100644 utils/ipc/generators/__init__.py\n> \n> diff --git a/utils/ipc/generators/__init__.py b/utils/ipc/generators/__init__.py\n> new file mode 100644\n> index 00000000..e69de29b\n> -- \n> 2.35.0.rc0.227.g00780c9af4-goog\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6E6E7BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Jan 2022 03:55:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 837CD609AD;\n\tThu, 27 Jan 2022 04:55:17 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2A69560180\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jan 2022 04:55:15 +0100 (CET)","from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp\n\t[175.177.42.148])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CFFD849C;\n\tThu, 27 Jan 2022 04:55:13 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"l4k5gvhW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1643255714;\n\tbh=YSC0y2ieUwJbqzjRyg+3WNbh/tJtAYHo902XISUft0Y=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=l4k5gvhWKlwNn4Gddz+5OTZ4wco7U12K80PfTRV3/QQPOtTXLSddrXIlh78bHciT4\n\tTXhL76kXFtMX/31qT/hHuzzcbXtlo8d7O1A/nuZ3UhJsc7I1NIdysA+kBpZWQ/8dSB\n\tB6B7NBEQLmzouF+rNFsX5O6Vwxgw4Mm2YY3me+ss=","Date":"Thu, 27 Jan 2022 12:55:06 +0900","From":"paul.elder@ideasonboard.com","To":"Han-Lin Chen <hanlinchen@chromium.org>","Message-ID":"<20220127035506.GM4255@pyrite.rasen.tech>","References":"<20220126181807.3022258-1-hanlinchen@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220126181807.3022258-1-hanlinchen@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH v1] utils: ipc: Add __init__.py for\n\tlocal module utils/ipc/generators","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]