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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 DD3D7C433F5 for ; Fri, 17 Sep 2021 13:41:07 +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 5736A61152 for ; Fri, 17 Sep 2021 13:41:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5736A61152 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:59970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRE70-0003YW-BR for qemu-devel@archiver.kernel.org; Fri, 17 Sep 2021 09:41:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRE56-0002db-8L for qemu-devel@nongnu.org; Fri, 17 Sep 2021 09:39:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRE53-0005mt-KW for qemu-devel@nongnu.org; Fri, 17 Sep 2021 09:39:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631885944; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FidiCpx8xbxKax6CSqETtQxo8fXigLPLjgBaOucmRxw=; b=Num4AvmNf81d5rZY+coTg2YiVZqW+QWFaUhxd3OOARiclFqYAAQdKHlO3Xdf//1j070hIc cmQxvPBoiskO4vSrAqD74tTtKmiio99TpuxltBMGq3Kwg8hTGrSrvbM0wH5nAX74IlbM2O VWqnJczLhF5buaNvJzju7rX1eu6nCaI= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-491--Zh-UxC0P2ClU6d0VaVi-g-1; Fri, 17 Sep 2021 09:39:03 -0400 X-MC-Unique: -Zh-UxC0P2ClU6d0VaVi-g-1 Received: by mail-wr1-f70.google.com with SMTP id x7-20020a5d6507000000b0015dada209b1so3722336wru.15 for ; Fri, 17 Sep 2021 06:39:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=FidiCpx8xbxKax6CSqETtQxo8fXigLPLjgBaOucmRxw=; b=FvHMN6AgYzF05MivjtgfWv2p6m7kdV9xbOxSllAIx2a6gcrADXREyWn68vqSAy9Q0j CgmqDTWgm0jMSAdjPW+LJJSp1IqHI5ThnlcGclKdgFNruG7FYHYfrL3gHZZZlO4xSLdb FDX+Rwp1X4QQ0kXxyT4Rsm+oBwVqrK/Ir985g3P8Xi9ycSowEGMMu/FchZDRvIc5zZBH ktqzz0qQ9o/U0fZ8vKQC7DeObEI1B1dzPa66LQA5PA/9dOtMmMxQyv+sBT2LR1hWNyKb AEVPsXh0alnS8DggvIsB4aYgleYu/cCt/zBydQEPop171g1dUTILg7E5qUplp0YCpeSc 5Npw== X-Gm-Message-State: AOAM53345e9wjMwetRMr1nXBIIedJYif45sankzzitZbdZ6DUcLpK6DY k8Q2NntiBcQOeIcfxKS1xaTN5uYAr+sTSJ8JKxvVrmX5nqAIfuWSBe4Ukujykcgjh+ge5fTxEav 2lUmhm1C5wMuWZLc= X-Received: by 2002:adf:ce84:: with SMTP id r4mr12348967wrn.107.1631885942168; Fri, 17 Sep 2021 06:39:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSq8N/WkU9XSBbtGb6GB7/8Vw5naDslPOqQW/D9bD6BMYZ2I0bhkYYr+EfzgHj0RgoJkARfw== X-Received: by 2002:adf:ce84:: with SMTP id r4mr12348927wrn.107.1631885941927; Fri, 17 Sep 2021 06:39:01 -0700 (PDT) Received: from dresden.str.redhat.com ([2a02:908:1e48:3780:4451:9a65:d4e9:9bb6]) by smtp.gmail.com with ESMTPSA id i67sm1899518wmi.41.2021.09.17.06.39.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Sep 2021 06:39:01 -0700 (PDT) Subject: Re: [PATCH 08/15] python/aqmp: Create MessageModel and StandaloneModel classes To: John Snow , qemu-devel@nongnu.org References: <20210917054047.2042843-1-jsnow@redhat.com> <20210917054047.2042843-9-jsnow@redhat.com> From: Hanna Reitz Message-ID: Date: Fri, 17 Sep 2021 15:39:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210917054047.2042843-9-jsnow@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=216.205.24.124; envelope-from=hreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) DKIMWL_WL_HIGH=-0.392, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-1.488, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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: Kevin Wolf , Vladimir Sementsov-Ogievskiy , Eduardo Habkost , qemu-block@nongnu.org, Cleber Rosa Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 17.09.21 07:40, John Snow wrote: > This allows 'Greeting' to be subclass of 'Message'. We need the adapter > classes to avoid some typing problems that occur if we try to put too > much into the 'Model' class itself; the exact details of why are left as > an exercise to the reader. > > Why bother? This makes 'Greeting' ⊆ 'Message', which is taxonomically > true; but the real motivation is to be able to inherit and abuse all of > the Mapping dunders so that we can call dict(greeting) or > bytes(greeting), for example. > > Signed-off-by: John Snow > --- > python/qemu/aqmp/models.py | 67 ++++++++++++++++++++++++++++---------- > 1 file changed, 50 insertions(+), 17 deletions(-) (I feel like this is a bit much outside of my scope, so this’ll have to do without my R-b.)