From nobody Fri May 10 11:35:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1688556422; cv=none; d=zohomail.com; s=zohoarc; b=AnSSADcCYx76jycKiMCfCTp9D/H7p0qhQmWGEpYDJm1xC970GUzV2NqJoYcuXxREnq4rLVJprGUix8Jc8dTvGnTVAKo3f/6R77L37QvgOc1Bq/KztW7EDftW+rcRz6h//Yp6Em3FZUY1SMzSl9uTTyKaPpsB9p2gWpC0j/X3gMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688556422; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LRiSgzLFaJJeJ6EaNdB1G5P7C2mjdtmSUgXnuWHFD3o=; b=E/3UzNnwVYyuUZ/qiIqMAvLPg3eKQbKaDnN0m4oOOYwCLoW7JI/wka1MyvR5bKlGnDEZIUGHbJbSlO55qPGiKZDN+V2BK7yeYVpnW6yvyjvLcgj9OMcaBLxYhCZ/ac6MYf+P5Ac3HrADonhITNP801nMk1sbe5Cvo5HruZ1IfM8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1688556422962510.6936938651578; Wed, 5 Jul 2023 04:27:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH0dn-0000k2-F3; Wed, 05 Jul 2023 07:25:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH0dl-0000ja-QA for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:25:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH0dk-00075z-BL for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:25:45 -0400 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-349-SJDJagxJPKWtARkmPbKozg-1; Wed, 05 Jul 2023 07:25:41 -0400 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-98df34aa83aso77614566b.1 for ; Wed, 05 Jul 2023 04:25:41 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id j13-20020aa7de8d000000b0051a2c7f5b0fsm13245122edv.88.2023.07.05.04.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688556343; 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=LRiSgzLFaJJeJ6EaNdB1G5P7C2mjdtmSUgXnuWHFD3o=; b=BajZADNLT29tFyyopjq2ciUW1Urv4JFF40t/+1UyMjHC/5z9KdZsJ/aqpzn7dcS7fzaxGO 7WkroKju3syW2Dblee7jacEkAkO15NO1iPBpsVxVOhb7dZIszDVnA1C8G3OvAMNJ1I5bi6 1BozTSmP239jfSQUCeWUIYe6EJhOwlc= X-MC-Unique: SJDJagxJPKWtARkmPbKozg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688556340; x=1691148340; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LRiSgzLFaJJeJ6EaNdB1G5P7C2mjdtmSUgXnuWHFD3o=; b=XIUXJFm1RaJF41GtUwxPC+0yVFK/DDUcIU97HWco3tIOeXGTRnn+IyBbADy3qL+PFO xF1iJpLsq2EABmVTKxuP/bB4cLVIiBeujMvuXmydsSylJrcgj6qa4L3rmdelgGAHoynE QlwmvNs9rVwt0+2uyThag39CEtgGNoB9VRhLAzrKQrwhFM+mCHRdNMB87+QT3+1a4oB6 w2N9iXnJgiYooZrQSVLeE4XVAcbbRB/IK4lVIfMhAoL1AYDKL69fGk2RQiQgwpACZ3Kd Dffry38fntFeLHpx6KwsXZbm8EkncFc/BX0FATCChkINvQrRjgJ+bME9OVbuwPjlQfmv iKdw== X-Gm-Message-State: ABy/qLYVpUbYSooSlU5yMW9DMLOz4wbRazTNsbAXok5mcj8BqF4t6C62 IAyHpdRo6pIMmx2v1EKxuEn4bP2Pdy0UjSDsEv9mHE/Kr85jCoBsjdsZpoJSc9D8zNJxeS40rCj KDj9qqHOYNNKoGJXKL9UG0ORAB32x7A4MKotd/oM20SUFMcWYoJUDpV17kHcM8TFDNdsm57r+zw E= X-Received: by 2002:a17:907:7fa2:b0:96f:94f1:b0a5 with SMTP id qk34-20020a1709077fa200b0096f94f1b0a5mr1995142ejc.8.1688556340395; Wed, 05 Jul 2023 04:25:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlEzBYYWwtwrUeC6S3AxAE86aynV71c/Pn78hGAWFt1Rsu/jFYM5CYFXB4OOt/GU3JStjVfesQ== X-Received: by 2002:a17:907:7fa2:b0:96f:94f1:b0a5 with SMTP id qk34-20020a1709077fa200b0096f94f1b0a5mr1995124ejc.8.1688556340102; Wed, 05 Jul 2023 04:25:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: jsnow@redhat.com Subject: [PATCH 1/2] python: work around mypy false positive Date: Wed, 5 Jul 2023 13:25:35 +0200 Message-ID: <20230705112536.54025-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230705112536.54025-1-pbonzini@redhat.com> References: <20230705112536.54025-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688556423821100003 Content-Type: text/plain; charset="utf-8" mypy 1.4.0 signals an error: qemu/qmp/qmp_tui.py:350: error: Non-overlapping equality check (left operan= d type: "Literal[Runstate.DISCONNECTING]", right operand type: "Literal[Run= state.IDLE]") [comparison-overlap] This is because it does not realiez that self.disconnect() could change the value of self.runstate. Signed-off-by: Paolo Bonzini --- python/qemu/qmp/qmp_tui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/qemu/qmp/qmp_tui.py b/python/qemu/qmp/qmp_tui.py index 83691447231..1b68a71397f 100644 --- a/python/qemu/qmp/qmp_tui.py +++ b/python/qemu/qmp/qmp_tui.py @@ -346,7 +346,8 @@ async def manage_connection(self) -> None: self._set_status('[Disconnected]') await self.disconnect() # check if a retry is needed - if self.runstate =3D=3D Runstate.IDLE: + # mypy bug - doesn't realize self.runstate could change + if self.runstate =3D=3D Runstate.IDLE: # type: ignore continue await self.runstate_changed() =20 --=20 2.41.0 From nobody Fri May 10 11:35:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1688556389; cv=none; d=zohomail.com; s=zohoarc; b=myAP4x64/P2mCuoF19b4aMV5dsIh+n2SDckBcgGFvD2VOSndrki+I0unJFllG/3G9P7Y3Us3Ik8YcxvZop8E0qYdrVKxv9SQB8Sp669gcbmxNb4SgaQgD/cGUe8zMuh0/IAy+wmiPTBaIYHsxgCjIM765AcJZPLoa1etjZsNiBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688556389; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fN1gKUVWYzBXCW4iOosyxGBEgv4p6P8Hh+uRtjqvf2I=; b=mwfqB/OHmsaILFt0Ew5WAufJzfXhZbijRZBbHUzdZ7YIY5le0BYzJM8cNcBMxQEx20i0FGQPr+1wjjv8p8qICel6aVI7J23zY3IMR2M0fshAzpcVzmQw4e4hGb9FM5ILwRUAwhGGeyTntaEAwC8bYp+QAjRl2eNLfx9IkxeasKU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1688556388996416.5187984625758; Wed, 5 Jul 2023 04:26:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH0do-0000kT-MS; Wed, 05 Jul 2023 07:25:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH0dn-0000kC-SD for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:25:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH0dm-00076W-A2 for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:25:47 -0400 Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-461-T-C4F44iNBy206WvagFbqw-1; Wed, 05 Jul 2023 07:25:44 -0400 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2b6997407faso63719511fa.2 for ; Wed, 05 Jul 2023 04:25:44 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id b18-20020aa7d492000000b0051da4b5bc8fsm10113139edr.20.2023.07.05.04.25.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688556345; 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=fN1gKUVWYzBXCW4iOosyxGBEgv4p6P8Hh+uRtjqvf2I=; b=TgCu87yTdwIgWP5Z9YRzw7VEL+MBCqbUS0cyWzFY0vy+TWNJIyPsaNDejs+CLwJQctR5rN xywdIH65lC5CEoqyYXZqx+SOL/Tcn0FBX+4IclbJJ/DliEoda0bHO5sCMuB5czZfHCR3N3 yiODsBhg3ssTwXo8j0uAO/JeNVyAg7A= X-MC-Unique: T-C4F44iNBy206WvagFbqw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688556342; x=1691148342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fN1gKUVWYzBXCW4iOosyxGBEgv4p6P8Hh+uRtjqvf2I=; b=JrMHHB2O/xN04jZq0y/jFVDpVMd1ZQ4gc/LFclqzhsNBukrM1vZN2+K5AbMtJDCroJ 33gt2YDNQW5IhSs6FHaFnKXvGYNZWEsfUwXC6DJbVDyvzaAaydULj7yUYI/IZs5xk7Un LCT9w2PpjY4S/zGyeXD1zuLMI4C9wnNkL2YEYh2gFbPCXVXGBh/UoFov3c3Wq9UhnIre YPvrfhw/1Si8odDoLsJZY4uwLNBSKpSWXWCSnD+qcAv6TLaupzoYwhFUhjdjWWno7rxL oLYHbMiL3XOKDkNq8fthJalpTdkjoec+FRfUkvrGno0Ea8VvBj+DGo0mdcHERUZ24oh4 4dKA== X-Gm-Message-State: ABy/qLYQXB2yE856gcsP/7URFnmSQKatNKn1wmd6h/+oF0jvqgZaoNKB hBAHOWFvNZ0YtZ76k5FNjHHTf24pzUx6mrMzEkFf64Vc6ZCI5veqtbBgVbcXGPh8gMtUhxamSqp rzXp3ZZ/1kHnI2szcwCysvS0iU5nB9MFC3iFJ5RmHraLCNItWUGCZuONjlA7IWniUJ6kZ3IerNx g= X-Received: by 2002:a2e:9059:0:b0:2b3:3175:5d46 with SMTP id n25-20020a2e9059000000b002b331755d46mr10823498ljg.45.1688556342297; Wed, 05 Jul 2023 04:25:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlF6sWqgraO7Gb/e5WyqmwLv9JtvDYIR4+ZIKrNKli+ugYLybneqRT8uCg39GnZEGwe85rtkAw== X-Received: by 2002:a2e:9059:0:b0:2b3:3175:5d46 with SMTP id n25-20020a2e9059000000b002b331755d46mr10823472ljg.45.1688556341903; Wed, 05 Jul 2023 04:25:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: jsnow@redhat.com Subject: [PATCH 2/2] python: bump minimum requirements so they are compatible with 3.12 Date: Wed, 5 Jul 2023 13:25:36 +0200 Message-ID: <20230705112536.54025-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230705112536.54025-1-pbonzini@redhat.com> References: <20230705112536.54025-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688556389749100003 Content-Type: text/plain; charset="utf-8" There are many Python 3.12 issues right now, but a particularly problematic one when debugging them is that one cannot even use minreqs.txt in a Python 3.12 virtual environment to test with locked package versions. Bump the mypy and wrapt versions to fix this, while remaining within the realm of versions compatible with Python 3.7. Signed-off-by: Paolo Bonzini --- python/setup.cfg | 2 +- python/tests/minreqs.txt | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/python/setup.cfg b/python/setup.cfg index 42f0b0be07d..5d7e95f5d24 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -39,7 +39,7 @@ devel =3D flake8 >=3D 5.0.4 fusepy >=3D 2.0.4 isort >=3D 5.1.2 - mypy >=3D 0.780 + mypy >=3D 1.4.0 pylint >=3D 2.17.3 tox >=3D 3.18.0 urwid >=3D 2.1.2 diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt index 1ce72cef6d8..979461be6bb 100644 --- a/python/tests/minreqs.txt +++ b/python/tests/minreqs.txt @@ -28,7 +28,7 @@ avocado-framework=3D=3D90.0 # Linters flake8=3D=3D5.0.4 isort=3D=3D5.1.2 -mypy=3D=3D0.780 +mypy=3D=3D1.4.0 pylint=3D=3D2.17.3 =20 # Transitive flake8 dependencies @@ -37,12 +37,11 @@ pycodestyle=3D=3D2.9.1 pyflakes=3D=3D2.5.0 =20 # Transitive mypy dependencies -mypy-extensions=3D=3D0.4.3 -typed-ast=3D=3D1.4.0 -typing-extensions=3D=3D4.5.0 +mypy-extensions=3D=3D1.0.0 +typing-extensions=3D=3D4.7.1 =20 # Transitive pylint dependencies astroid=3D=3D2.15.4 lazy-object-proxy=3D=3D1.4.0 toml=3D=3D0.10.0 -wrapt=3D=3D1.12.1 +wrapt=3D=3D1.14.0 --=20 2.41.0