get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2197093/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2197093,
    "url": "http://patchwork.ozlabs.org/api/patches/2197093/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260217051112.446957-3-jsnow@redhat.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260217051112.446957-3-jsnow@redhat.com>",
    "list_archive_url": null,
    "date": "2026-02-17T05:11:10",
    "name": "[2/4] python: replace avocado tests with pytest",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8e2ca1df245f853d2c1f98d46a2d6e527883a64b",
    "submitter": {
        "id": 64343,
        "url": "http://patchwork.ozlabs.org/api/people/64343/?format=api",
        "name": "John Snow",
        "email": "jsnow@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260217051112.446957-3-jsnow@redhat.com/mbox/",
    "series": [
        {
            "id": 492370,
            "url": "http://patchwork.ozlabs.org/api/series/492370/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492370",
            "date": "2026-02-17T05:11:08",
            "name": "Python: drop avocado, misc test fixes",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492370/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2197093/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2197093/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=BxF8pBL8;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fFSSB102Pz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 16:12:10 +1100 (AEDT)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vsDMq-0006jE-H1; Tue, 17 Feb 2026 00:11:24 -0500",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <jsnow@redhat.com>) id 1vsDMp-0006iq-Ni\n for qemu-devel@nongnu.org; Tue, 17 Feb 2026 00:11:23 -0500",
            "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <jsnow@redhat.com>) id 1vsDMo-0002JK-3f\n for qemu-devel@nongnu.org; Tue, 17 Feb 2026 00:11:23 -0500",
            "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-199--bXMIQiNNaeXQdPJ3NJzfw-1; Tue,\n 17 Feb 2026 00:11:18 -0500",
            "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id C4D9F1800265\n for <qemu-devel@nongnu.org>; Tue, 17 Feb 2026 05:11:17 +0000 (UTC)",
            "from jsnow-thinkpadp16vgen1.westford.csb (unknown [10.22.88.120])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id BD3D618003F6; Tue, 17 Feb 2026 05:11:16 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771305081;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=IuGfykvuaPWnW+5hdWJzME16NjhM0NzpRBIzZgi4ek4=;\n b=BxF8pBL8XVHeIVgKr6RPA53UT6Kin0/RO2ckMDp1FSzr9/Uvp34f3uCDRA3I5d7b1C1G0m\n /M4sOYjAFt8b/Jtp1kfAkbgCv0Imf0V6B5UC2VSPDSB24NTmlyVAXDl0+tmOEQSoytNwt5\n 6So12B6fAKDYIHvMEZuOdP4UXiFRFuw=",
        "X-MC-Unique": "-bXMIQiNNaeXQdPJ3NJzfw-1",
        "X-Mimecast-MFC-AGG-ID": "-bXMIQiNNaeXQdPJ3NJzfw_1771305078",
        "From": "John Snow <jsnow@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Cleber Rosa <crosa@redhat.com>,\n\tJohn Snow <jsnow@redhat.com>",
        "Subject": "[PATCH 2/4] python: replace avocado tests with pytest",
        "Date": "Tue, 17 Feb 2026 00:11:10 -0500",
        "Message-ID": "<20260217051112.446957-3-jsnow@redhat.com>",
        "In-Reply-To": "<20260217051112.446957-1-jsnow@redhat.com>",
        "References": "<20260217051112.446957-1-jsnow@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111",
        "Received-SPF": "pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com;\n 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,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_PASS=-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.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "Following suit with the rest of this repository, drop avocado and\nreplace it with the Python standard \"pytest\" package.\n\nIn this case, we do not truly need pytest as all we are using it for is\nrunning other python processes formerly launched by shell scripts, but\nthis matches how the standalone python-qemu-qmp package does things,\nwhich keeps things simple on my end.\n\n(pytest version chosen based off of Debian 11's package version as queried by\nrepology; under the assumption that this is the likely the oldest\nversion we currently leverage in testing.)\n\nSigned-off-by: John Snow <jsnow@redhat.com>\n---\n python/Makefile          |  4 +-\n python/setup.cfg         |  1 +\n python/tests/linters.py  | 89 ++++++++++++++++++++++++++++++++++++++++\n python/tests/minreqs.txt |  1 +\n 4 files changed, 93 insertions(+), 2 deletions(-)\n create mode 100644 python/tests/linters.py",
    "diff": "diff --git a/python/Makefile b/python/Makefile\nindex b6c9cd1bce2..42994d39618 100644\n--- a/python/Makefile\n+++ b/python/Makefile\n@@ -105,7 +105,7 @@ develop:\n \n .PHONY: check\n check:\n-\t@avocado --config avocado.cfg run tests/\n+\t@pytest -v tests/*.py\n \n .PHONY: check-tox\n check-tox:\n@@ -113,7 +113,7 @@ check-tox:\n \n .PHONY: check-coverage\n check-coverage:\n-\t@coverage run -m avocado --config avocado.cfg run tests/*.py\n+\t@coverage run -m pytest -v tests/*.py\n \t@coverage combine\n \t@coverage html\n \t@coverage report\ndiff --git a/python/setup.cfg b/python/setup.cfg\nindex c46a95f8d41..03344526730 100644\n--- a/python/setup.cfg\n+++ b/python/setup.cfg\n@@ -43,6 +43,7 @@ devel =\n     mypy >= 1.4.0\n     pylint >= 2.17.3\n     pylint != 3.2.4; python_version<\"3.9\"\n+    pytest >= 6.0.2\n     tox >= 3.18.0\n     sphinx >= 3.4.3\n \ndiff --git a/python/tests/linters.py b/python/tests/linters.py\nnew file mode 100644\nindex 00000000000..28556c09910\n--- /dev/null\n+++ b/python/tests/linters.py\n@@ -0,0 +1,89 @@\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+\n+import os\n+import subprocess\n+import sys\n+\n+\n+def pyrun(*args):\n+    subprocess.run((sys.executable, *args), check=True)\n+\n+\n+class TestLinters:\n+\n+    def test_flake8_pkg(self):\n+        pyrun(\"-m\", \"flake8\", \"qemu/\")\n+\n+    def test_flake8_scripts(self):\n+        pyrun(\"-m\", \"flake8\", \"scripts/\")\n+\n+    def test_flake8_qapi(self):\n+        pyrun(\"-m\", \"flake8\",\n+              \"../scripts/qapi/\",\n+              \"../docs/sphinx/qapidoc.py\",\n+              \"../docs/sphinx/qapi_domain.py\")\n+\n+    def test_isort_pkg(self):\n+        pyrun(\"-m\", \"isort\", \"-c\", \"qemu/\")\n+\n+    def test_isort_scripts(self):\n+        pyrun(\"-m\", \"isort\", \"-c\", \"scripts/\")\n+\n+    def test_isort_qapi(self):\n+        pyrun(\"-m\", \"isort\", \"--sp\", \".\", \"-c\", \"../scripts/qapi/\")\n+\n+    def test_isort_qapi_sphinx(self):\n+        # Force isort to recognize 'compat' as a local module and not\n+        # third-party\n+        pyrun(\"-m\", \"isort\", \"--sp\", \".\", \"-c\", \"-p\", \"compat\",\n+              \"../docs/sphinx/qapi_domain.py\",\n+              \"../docs/sphinx/qapidoc.py\")\n+\n+    def test_mypy_pkg(self):\n+        pyrun(\"-m\", \"mypy\", \"-p\", \"qemu\")\n+\n+    def test_mypy_scripts(self):\n+        pyrun(\"-m\", \"mypy\", \"scripts/\")\n+\n+    def test_mypy_qapi(self):\n+        pyrun(\"-m\", \"mypy\", \"../scripts/qapi\")\n+\n+    def test_mypy_iotests(self):\n+        cwd = os.getcwd()\n+        try:\n+            os.chdir(\"../tests/qemu-iotests/\")\n+            pyrun(\"-m\", \"linters\", \"--mypy\")\n+        finally:\n+            os.chdir(cwd)\n+\n+    # Setuptools v60 introduced the SETUPTOOLS_USE_DISTUTILS=stdlib\n+    # workaround; stdlib distutils was fully removed in Python\n+    # 3.12+. Once we are on >=3.12+ exclusively, this workaround can be\n+    # dropped safely. Until then, it is needed for some versions on\n+    # Fedora/Debian distributions which relied upon distro-patched\n+    # setuptools present in CPython, but not within setuptools itself.\n+\n+    def test_pylint_pkg(self):\n+        os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib'\n+        pyrun(\"-m\", \"pylint\", \"qemu/\")\n+\n+    def test_pylint_scripts(self):\n+        os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib'\n+        pyrun(\"-m\", \"pylint\", \"qemu/\")\n+\n+    def test_pylint_qapi(self):\n+        os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib'\n+        pyrun(\"-m\", \"pylint\",\n+              \"--rcfile=../scripts/qapi/pylintrc\",\n+              \"../scripts/qapi/\",\n+              \"../docs/sphinx/qapidoc.py\",\n+              \"../docs/sphinx/qapi_domain.py\")\n+\n+    def test_pylint_iotests(self):\n+        os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib'\n+        cwd = os.getcwd()\n+        try:\n+            os.chdir(\"../tests/qemu-iotests/\")\n+            pyrun(\"-m\", \"linters\", \"--pylint\")\n+        finally:\n+            os.chdir(cwd)\ndiff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt\nindex 38b17d17e14..19912027076 100644\n--- a/python/tests/minreqs.txt\n+++ b/python/tests/minreqs.txt\n@@ -32,6 +32,7 @@ fusepy==2.0.4\n \n # Test-runners, utilities, etc.\n avocado-framework==90.0\n+pytest==6.0.2\n \n # Linters\n flake8==5.0.4\n",
    "prefixes": [
        "2/4"
    ]
}