From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AB02C11F64 for ; Mon, 28 Jun 2021 20:30:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BFDCC61CCE for ; Mon, 28 Jun 2021 20:30:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFDCC61CCE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxxtk-0002YI-Ia for qemu-devel@archiver.kernel.org; Mon, 28 Jun 2021 16:30:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxxsP-0001JL-VJ for qemu-devel@nongnu.org; Mon, 28 Jun 2021 16:29:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxxsL-0005Po-Og for qemu-devel@nongnu.org; Mon, 28 Jun 2021 16:29:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624912140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=divCttqqlu5eYqlApQA5QQQltA4Zns6BUZyLxD3qVHs=; b=CZR6Yv3epIX9XeEwTrHcPW6qOgBNnezgUzcxHjUJJZLOqnQNAKe/d8+Sv9evYTxZm9Hrgy xDfJO30WziQgDNZ9n5FWe5LPEzg+DVG+Az075GnE5LJX/52+Jze8iFZwwe9WBR5avn99fe GXmI12nfWplT10Ihwy6xV+PqcTcNgIg= Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-76-fJsfkTL3Omy3BM46qXIV9A-1; Mon, 28 Jun 2021 16:28:58 -0400 X-MC-Unique: fJsfkTL3Omy3BM46qXIV9A-1 Received: by mail-oi1-f199.google.com with SMTP id t22-20020a0568081596b029023a41b03dc9so8264130oiw.1 for ; Mon, 28 Jun 2021 13:28:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=divCttqqlu5eYqlApQA5QQQltA4Zns6BUZyLxD3qVHs=; b=EdKP/m3dr6b3y5qTiZ5YJ2Pfp33XbUrFLmqWvNvLPWcJ5uNdsiQaX3+U8L9qat90Ml CUO3JFe7+2Lc/dFzGvfiEOt12l/Rbc9IDOSV60Bdt3MvWFd2LTgRV5EoaBCUXRT4uLk3 28bCNIqmWBke8zu3N7L/SsyKGUSISosTzK9XpwARCQnI7Emrtu/Ha8k+67WkktL+Ooq9 Nhq3qrYeqWswDcPQKL3cRHdRCVG/6W8+/5Hu/oesg8eeEZDSWw/oDxmJgEh63NL624Ga A4MCaxatRv02KB4NPzxXOzDrj7bU3KeqAE3xqc+wpzX8pRCrrrqGYzqpzfo3SZTiQc9m RM1w== X-Gm-Message-State: AOAM531BNBNCX3hxO6HGdzSXyMBOSZ/9o5vAcP1Clob4/bLF7ZVv3jRc /vYiVncAznAyiv57hECB7Tixb4qr+6/GcuUdWHPU2V3B9VQZeQST6+jZOfDp4BwpWVpAJUL7zIT jQzhjYZKoWA+heso5Wls/syQFjAhwpNQ= X-Received: by 2002:aca:2212:: with SMTP id b18mr11916981oic.52.1624912137421; Mon, 28 Jun 2021 13:28:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoOtg7VU3a89kRh9VqSD4/Qx8k0zttcJ1ZkfE06H7ykRYn+Z+EFsurAWkZ17N4YtekHiWKczqaRvf3rg4IIHE= X-Received: by 2002:aca:2212:: with SMTP id b18mr11916972oic.52.1624912137295; Mon, 28 Jun 2021 13:28:57 -0700 (PDT) MIME-Version: 1.0 References: <20210625154540.783306-1-jsnow@redhat.com> <20210625154540.783306-2-jsnow@redhat.com> <0550dc79-de0a-f6e4-8e85-38a22a0e19da@redhat.com> In-Reply-To: <0550dc79-de0a-f6e4-8e85-38a22a0e19da@redhat.com> From: John Snow Date: Mon, 28 Jun 2021 16:28:46 -0400 Message-ID: Subject: Re: [PATCH 01/11] python: expose typing information via PEP 561 To: wainersm@redhat.com Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000bc28f905c5d9568d" Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.375, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Eduardo Habkost , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , qemu-devel@nongnu.org, Willian Rampazzo , Cleber Rosa , =?UTF-8?B?QWxleCBCZW5uw6ll?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000bc28f905c5d9568d Content-Type: text/plain; charset="UTF-8" On Mon, Jun 28, 2021 at 4:12 PM Wainer dos Santos Moschetta < wainersm@redhat.com> wrote: > Hi, > > On 6/25/21 12:45 PM, John Snow wrote: > > https://www.python.org/dev/peps/pep-0561/#specification > > Create 'py.typed' files in each subpackage that indicate to mypy that > > this is a typed module, so that users of any of these packages can use > > mypy to check their code as well. > > > > Note: Theoretically it's possible to ditch MANIFEST.in in favor of using > > package_data in setup.cfg, but I genuinely could not figure out how to > > get it to include things from the *source root* into the *package root*; > > only how to include things from each subpackage. I tried! > > > > Signed-off-by: John Snow > > --- > > python/qemu/machine/py.typed | 0 > > python/qemu/qmp/py.typed | 0 > > python/qemu/utils/py.typed | 0 > > python/setup.cfg | 4 ++++ > > 4 files changed, 4 insertions(+) > > create mode 100644 python/qemu/machine/py.typed > > create mode 100644 python/qemu/qmp/py.typed > > create mode 100644 python/qemu/utils/py.typed > > Just double-checking that you did not add a single py.typed on the root > "python" dir, so that all modules inherit from it, because this is a > namespace package. Right? > Yes, that's right. Each sub-package here can technically be typed or not independently from one another, even though the packaging script I have written at the moment will bundle all three of these packages together. Complying with PEP 561 requires package-level information. (So far as I am aware at-present, anyway.) > Anyway, > > Reviewed-by: Wainer dos Santos Moschetta > Thanks! --js --000000000000bc28f905c5d9568d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jun 28, 2021 at 4:12 PM Waine= r dos Santos Moschetta <wainersm@= redhat.com> wrote:
Hi,

On 6/25/21 12:45 PM, John Snow wrote:
> https://www.python.org/dev/peps/pep-0561= /#specification
> Create 'py.typed' files in each subpackage that indicate to my= py that
> this is a typed module, so that users of any of these packages can use=
> mypy to check their code as well.
>
> Note: Theoretically it's possible to ditch MANIFEST.in in favor of= using
> package_data in setup.cfg, but I genuinely could not figure out how to=
> get it to include things from the *source root* into the *package root= *;
> only how to include things from each subpackage. I tried!
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>=C2=A0 =C2=A0python/qemu/machine/py.typed | 0
>=C2=A0 =C2=A0python/qemu/qmp/py.typed=C2=A0 =C2=A0 =C2=A0| 0
>=C2=A0 =C2=A0python/qemu/utils/py.typed=C2=A0 =C2=A0| 0
>=C2=A0 =C2=A0python/setup.cfg=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0| 4 ++++
>=C2=A0 =C2=A04 files changed, 4 insertions(+)
>=C2=A0 =C2=A0create mode 100644 python/qemu/machine/py.typed
>=C2=A0 =C2=A0create mode 100644 python/qemu/qmp/py.typed
>=C2=A0 =C2=A0create mode 100644 python/qemu/utils/py.typed

Just double-checking that you did not add a single py.typed on the root "python" dir, so that all modules inherit from it, because this i= s a
namespace package. Right?

Yes, tha= t's right. Each sub-package here can technically be typed=20 or not independently from one another, even though the packaging script I have written at the moment will bundle all three of these packages=20 together. Complying with PEP 561 requires package-level information.
<= div>
(So far as I am aware at-present, anyway.)
=C2=A0
Anyway,

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>

Thanks!
--js
=C2=A0
--000000000000bc28f905c5d9568d--