get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 136388,
    "url": "https://patches.dpdk.org/api/patches/136388/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240205180328.131019-2-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240205180328.131019-2-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240205180328.131019-2-stephen@networkplumber.org",
    "date": "2024-02-05T17:43:29",
    "name": "[v9,01/23] devtools: add script to check for non inclusive naming",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "367e9a161ccc32d5e119c0fb7efebac4b9ec3e0d",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240205180328.131019-2-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31003,
            "url": "https://patches.dpdk.org/api/series/31003/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31003",
            "date": "2024-02-05T17:43:28",
            "name": "Use inclusive naming in DPDK",
            "version": 9,
            "mbox": "https://patches.dpdk.org/series/31003/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/136388/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/136388/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 0B0CF43A3D;\n\tMon,  5 Feb 2024 19:03:46 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E384F40DDA;\n\tMon,  5 Feb 2024 19:03:41 +0100 (CET)",
            "from mail-pl1-f173.google.com (mail-pl1-f173.google.com\n [209.85.214.173])\n by mails.dpdk.org (Postfix) with ESMTP id E906640269\n for <dev@dpdk.org>; Mon,  5 Feb 2024 19:03:39 +0100 (CET)",
            "by mail-pl1-f173.google.com with SMTP id\n d9443c01a7336-1d98fc5ebceso8421225ad.1\n for <dev@dpdk.org>; Mon, 05 Feb 2024 10:03:39 -0800 (PST)",
            "from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])\n by smtp.gmail.com with ESMTPSA id\n x8-20020a170902b40800b001d9b0a15bbfsm144867plr.262.2024.02.05.10.03.38\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 05 Feb 2024 10:03:38 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1707156219;\n x=1707761019; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=0UU5x8eOSKj/KaWrqX6oh+A5NqhkELkaQHAqy20ER9Q=;\n b=JRzLTjWSe9OXwqDsBRotZOFaztHXbbHIiThIgDAYB0G+EKX0R1cUFNYWeAspMP3K1u\n 7f3RnTSmjzgXgs7v4k4ChPukWICpiIhb+vzTqSRfN4+nP/HK04NoJZoqm/qoZx/Iy3vL\n swarv1vX4A1OU7+UZ/flAKfpuHeXvznR2o04fj+gWCtHo/8E5YbAYqaxSHrao8WIn6NN\n n6OBbmxnRifQwXn483UVAsJaQo1zKL0O5ZP1pZVoyWlEGNOJ9/NFNFoVUpVrlQxaHIM9\n RkGrUFPCkcIM9H5uftzLO48cdhGz8fsyCJuohmiCde/1iaxtmX9k66d6skLliq/uRT1R\n fj3A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1707156219; x=1707761019;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=0UU5x8eOSKj/KaWrqX6oh+A5NqhkELkaQHAqy20ER9Q=;\n b=Agzoh1E0P7zWLO9jaupGRAV++4YD2EJXGBdfb1ljglOJ8AjodZSs2BLXIZ9QuN4ry8\n toDTDW3B+Z2tVUwhSrbDey+gxyCQ9xnm5XtUp3jQnGiJmeq+O6aRjrYpEAYLAViYxV06\n at3QSRvdoCvwlQSMEuj1VWdwrz/zOo/jO4kWSCfcK1MRXITE8QN8CQomYx4Dp7q1fKQI\n xV7J04CQBXIJBypJsA2IqyjnmMDSP8NaSIgk1DXuMrMs5XGEPNn5K2sb2LRJQP/cMdq7\n SLmdif+YbvsTQlGi5ErnMgqE4OshONqWzT3lKJwzYgEujJkYvt4lrisPyhBYGpCR6lSn\n WbFA==",
        "X-Gm-Message-State": "AOJu0YxviGC5tTUGbMyn77nV8MKBtVSWQv9Vfq352y2x3fldsPYQiCZF\n 20nZMneG3hIVJdgKigtVxluIZYEslKLOy6FmfLqxsBnM0EEUZ6PCGHzTjez5jfpy04UoOMorO3T\n wP2U=",
        "X-Google-Smtp-Source": "\n AGHT+IHMH29o1LnT9fdZzvqN0SdPi2nT8LDMahhk3atFdr1wwpnHBl0iR4CIusQzR5jpT0QD3f/Bcg==",
        "X-Received": "by 2002:a17:902:cf4a:b0:1d9:5038:f115 with SMTP id\n e10-20020a170902cf4a00b001d95038f115mr342542plg.4.1707156219155;\n Mon, 05 Feb 2024 10:03:39 -0800 (PST)",
        "X-Forwarded-Encrypted": "i=0;\n AJvYcCXT1FtyMkfKr1V+gB7G9IAgVIuZ2JDs8ZVmuZAdlTsS8IBJfWB4kEjZBsHpSfRKm2R2IP0MfXaVb07yByREreVNi1sq",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Thomas Monjalon <thomas@monjalon.net>",
        "Subject": "[PATCH v9 01/23] devtools: add script to check for non inclusive\n naming",
        "Date": "Mon,  5 Feb 2024 09:43:29 -0800",
        "Message-ID": "<20240205180328.131019-2-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240205180328.131019-1-stephen@networkplumber.org>",
        "References": "<0230331200824.195294-1-stephen@networkplumber.org>\n <20240205180328.131019-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Add a new script to find words that should not be used.\nIt is a wrapper around git grep command.\nBy default it prints matches but can also display counts.\n\nUses the word lists from Inclusive Naming Initiative\nsee https://inclusivenaming.org/word-lists/\n\nNote: the JSON list has extra comma at end of list of elements which is not\nvalid in basic JSON but is allowed in user-friendly JSON5 (https://json5.org/)\nTo handle this the tool uses the PyPi package for parsing json5 format.\n\nExamples:\n$ ./devtools/check-inclusive-naming.py -c | head -5\napp/test/test_common.c:1\napp/test/test_eal_flags.c:8\napp/test/test_hash.c:1\napp/test/test_hash_readwrite_lf_perf.c:1\napp/test/test_link_bonding_mode4.c:1\n\n$ ./devtools/check-inclusive-naming.py lib/pcapng\nlib/pcapng/rte_pcapng.c:\t\t/* sanity check that is really a pcapng mbuf */\n\n$ ./devtools/check-inclusive-naming.py -l lib/eal\nlib/eal/common/eal_common_memory.c\nlib/eal/common/eal_common_proc.c\nlib/eal/common/eal_common_trace.c\nlib/eal/common/eal_memcfg.h\nlib/eal/common/rte_malloc.c\nlib/eal/freebsd/eal.c\nlib/eal/linux/eal.c\nlib/eal/windows/eal.c\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n MAINTAINERS                        |   1 +\n devtools/check-inclusive-naming.py | 135 +++++++++++++++++++++++++++++\n 2 files changed, 136 insertions(+)\n create mode 100755 devtools/check-inclusive-naming.py",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 5fb3a73f840e..dbf7ea2d916d 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -88,6 +88,7 @@ F: devtools/check-doc-vs-code.sh\n F: devtools/check-dup-includes.sh\n F: devtools/check-maintainers.sh\n F: devtools/check-forbidden-tokens.awk\n+F: devtools/check-inclusive-naming.py\n F: devtools/check-git-log.sh\n F: devtools/check-spdx-tag.sh\n F: devtools/check-symbol-change.sh\ndiff --git a/devtools/check-inclusive-naming.py b/devtools/check-inclusive-naming.py\nnew file mode 100755\nindex 000000000000..e8989c3c9b79\n--- /dev/null\n+++ b/devtools/check-inclusive-naming.py\n@@ -0,0 +1,135 @@\n+#!/usr/bin/env python3\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright 2023 Stephen Hemminger\n+#\n+# This script scans the source tree and creates list of files\n+# containing words that are recommended to be avoided by the\n+# Inclusive Naming Initiative.\n+# See: https://inclusivenaming.org/word-lists/\n+\n+import argparse\n+import subprocess\n+from urllib.request import urlopen\n+\n+# Need JSON5 to be able to handle extra comma\n+import json5\n+\n+DEFAULT_URL = 'https://inclusivenaming.org/word-lists/index.json'\n+\n+# These give false positives\n+skip_files = [\n+    'doc/guides/rel_notes/', 'doc/guides/contributing/coding_style.rst',\n+    'doc/guides/prog_guide/glossary.rst'\n+]\n+\n+# These are allowed for now\n+allow_words = ['abort']\n+\n+\n+def args_parse():\n+    \"parse arguments and return the argument object back to main\"\n+\n+    parser = argparse.ArgumentParser(\n+        description=\"Identify word usage not aligned with inclusive naming\")\n+    parser.add_argument('-c',\n+                        '--count',\n+                        help=\"Show the number of lines that match\",\n+                        action='store_true')\n+    parser.add_argument('-d',\n+                        '--debug',\n+                        default=False,\n+                        help=\"Debug this script\",\n+                        action='store_true')\n+    parser.add_argument('-l',\n+                        '--files-with-matches',\n+                        help=\"Show only names of files with hits\",\n+                        action='store_true')\n+    # note: tier 0 is \"ok to use\"\n+    parser.add_argument('-t',\n+                        '--tier',\n+                        type=int,\n+                        choices=range(0, 4),\n+                        action='append',\n+                        help=\"Show non-conforming words of particular tier\")\n+    parser.add_argument('-x',\n+                        '--exclude',\n+                        default=skip_files,\n+                        action='append',\n+                        help=\"Exclude path from scan\")\n+    parser.add_argument('-a',\n+                        '--allow',\n+                        default=allow_words,\n+                        action='append',\n+                        help=\"Ignore these words\")\n+    parser.add_argument('--url',\n+                        default=DEFAULT_URL,\n+                        help=\"URL for the non-inclusive naming word list\")\n+    parser.add_argument('paths', nargs='*', help='files and directory to scan')\n+\n+    return parser.parse_args()\n+\n+\n+def fetch_wordlist(url, tiers):\n+    \"Read list of words from inclusivenaming.org\"\n+\n+    # The wordlist is returned as JSON like:\n+    # {\n+    # \"data\" :\n+    #         [\n+    #             {\n+    #                 \"term\": \"abort\",\n+    #                 \"tier\" : \"1\",\n+    #                 \"recommendation\": \"Replace when possible.\",\n+    # ...\n+    with urlopen(url) as response:\n+        entries = json5.loads(response.read())['data']\n+\n+    wordlist = []\n+    for item in entries:\n+        tier = int(item['tier'])\n+        if tiers.count(tier) > 0:\n+            # convert minus sign to minus or space regex\n+            pattern = item['term'].replace('-', '[- ]')\n+            if not pattern in allow_words:\n+                wordlist.append(pattern.lower())\n+\n+    return wordlist\n+\n+\n+def process(args):\n+    \"Find matching words\"\n+\n+    # Default to Tier 1, 2 and 3.\n+    if args.tier:\n+        tiers = args.tier\n+    else:\n+        tiers = list(range(1, 4))\n+\n+    wordlist = fetch_wordlist(args.url, tiers)\n+    if args.debug:\n+        print(f'Matching on {len(wordlist)} words')\n+\n+    cmd = ['git', 'grep', '-i']\n+    if args.files_with_matches:\n+        cmd.append('-l')\n+    if args.count:\n+        cmd.append('-c')\n+    for word in wordlist:\n+        cmd.append('-e')\n+        cmd.append(word)\n+    cmd.append('--')\n+    for path in skip_files:\n+        cmd.append(f':^{path}')\n+    cmd += args.paths\n+    if args.debug:\n+        print(cmd)\n+    subprocess.run(cmd, check=False)\n+\n+\n+def main():\n+    '''program main function'''\n+    process(args_parse())\n+\n+\n+if __name__ == \"__main__\":\n+    main()\n",
    "prefixes": [
        "v9",
        "01/23"
    ]
}