get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 61329,
    "url": "http://patches.dpdk.org/api/patches/61329/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/962ddfdf01c3f31d3be5e9996f9633e3f5138cc3.1571245316.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<962ddfdf01c3f31d3be5e9996f9633e3f5138cc3.1571245316.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/962ddfdf01c3f31d3be5e9996f9633e3f5138cc3.1571245316.git.anatoly.burakov@intel.com",
    "date": "2019-10-16T17:03:37",
    "name": "[v3,2/9] buildtools: add script for updating symbols abi version",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0bc36f53c768199896a3cb83405779b5ba6229d7",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/962ddfdf01c3f31d3be5e9996f9633e3f5138cc3.1571245316.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 6889,
            "url": "http://patches.dpdk.org/api/series/6889/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6889",
            "date": "2019-10-16T17:03:35",
            "name": "Implement the new ABI policy and add helper scripts",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/6889/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/61329/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/61329/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3619A1E999;\n\tWed, 16 Oct 2019 19:03:58 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 73A791E871\n\tfor <dev@dpdk.org>; Wed, 16 Oct 2019 19:03:50 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Oct 2019 10:03:49 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.151])\n\tby fmsmga004.fm.intel.com with ESMTP; 16 Oct 2019 10:03:47 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.67,304,1566889200\"; d=\"scan'208\";a=\"220844947\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Pawel Modrak <pawelx.modrak@intel.com>, john.mcnamara@intel.com,\n\tbruce.richardson@intel.com, thomas@monjalon.net,\n\tdavid.marchand@redhat.com",
        "Date": "Wed, 16 Oct 2019 18:03:37 +0100",
        "Message-Id": "<962ddfdf01c3f31d3be5e9996f9633e3f5138cc3.1571245316.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": [
            "<cover.1571245316.git.anatoly.burakov@intel.com>",
            "<cover.1571245316.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1571245316.git.anatoly.burakov@intel.com>",
            "<cover.1571229052.git.anatoly.burakov@intel.com>\n\t<cover.1571245316.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v3 2/9] buildtools: add script for updating\n\tsymbols abi version",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Pawel Modrak <pawelx.modrak@intel.com>\n\nAdd a script that automatically merges all stable ABI's under one\nABI section with the new version, while leaving experimental\nsection exactly as it is.\n\nSigned-off-by: Pawel Modrak <pawelx.modrak@intel.com>\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n\nNotes:\n    v3:\n    - Add comments to regex patterns\n    \n    v2:\n    - Reworked script to be pep8-compliant and more reliable\n\n buildtools/update_version_map_abi.py | 170 +++++++++++++++++++++++++++\n 1 file changed, 170 insertions(+)\n create mode 100755 buildtools/update_version_map_abi.py",
    "diff": "diff --git a/buildtools/update_version_map_abi.py b/buildtools/update_version_map_abi.py\nnew file mode 100755\nindex 0000000000..50283e6a3d\n--- /dev/null\n+++ b/buildtools/update_version_map_abi.py\n@@ -0,0 +1,170 @@\n+#!/usr/bin/env python\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2019 Intel Corporation\n+\n+\"\"\"\n+A Python program to update the ABI version and function names in a DPDK\n+lib_*_version.map file. Called from the buildtools/update_abi.sh utility.\n+\"\"\"\n+\n+from __future__ import print_function\n+import argparse\n+import sys\n+import re\n+\n+\n+def __parse_map_file(f_in):\n+    # match function name, followed by semicolon, followed by EOL, optionally\n+    # with whitespace inbetween each item\n+    func_line_regex = re.compile(r\"\\s*\"\n+                                 r\"(?P<func>[a-zA-Z_0-9]+)\"\n+                                 r\"\\s*\"\n+                                 r\";\"\n+                                 r\"\\s*\"\n+                                 r\"$\")\n+    # match section name, followed by opening bracked, followed by EOL,\n+    # optionally with whitespace inbetween each item\n+    section_begin_regex = re.compile(r\"\\s*\"\n+                                     r\"(?P<version>[a-zA-Z0-9_\\.]+)\"\n+                                     r\"\\s*\"\n+                                     r\"{\"\n+                                     r\"\\s*\"\n+                                     r\"$\")\n+    # match closing bracket, optionally followed by section name (for when we\n+    # inherit from another ABI version), followed by semicolon, followed by\n+    # EOL, optionally with whitespace inbetween each item\n+    section_end_regex = re.compile(r\"\\s*\"\n+                                   r\"}\"\n+                                   r\"\\s*\"\n+                                   r\"(?P<parent>[a-zA-Z0-9_\\.]+)?\"\n+                                   r\"\\s*\"\n+                                   r\";\"\n+                                   r\"\\s*\"\n+                                   r\"$\")\n+\n+    # for stable ABI, we don't care about which version introduced which\n+    # function, we just flatten the list. there are dupes in certain files, so\n+    # use a set instead of a list\n+    stable_lines = set()\n+    # copy experimental section as is\n+    experimental_lines = []\n+    is_experimental = False\n+\n+    # gather all functions\n+    for line in f_in:\n+        # clean up the line\n+        line = line.strip('\\n').strip()\n+\n+        # is this an end of section?\n+        match = section_end_regex.match(line)\n+        if match:\n+            # whatever section this was, it's not active any more\n+            is_experimental = False\n+            continue\n+\n+        # if we're in the middle of experimental section, we need to copy\n+        # the section verbatim, so just add the line\n+        if is_experimental:\n+            experimental_lines += [line]\n+            continue\n+\n+        # skip empty lines\n+        if not line:\n+            continue\n+\n+        # is this a beginning of a new section?\n+        match = section_begin_regex.match(line)\n+        if match:\n+            cur_section = match.group(\"version\")\n+            # is it experimental?\n+            is_experimental = cur_section == \"EXPERIMENTAL\"\n+            continue\n+\n+        # is this a function?\n+        match = func_line_regex.match(line)\n+        if match:\n+            stable_lines.add(match.group(\"func\"))\n+\n+    return stable_lines, experimental_lines\n+\n+\n+def __regenerate_map_file(f_out, abi_version, stable_lines,\n+                          experimental_lines):\n+    # print ABI version header\n+    print(\"DPDK_{} {{\".format(abi_version), file=f_out)\n+\n+    if stable_lines:\n+        # print global section\n+        print(\"\\tglobal:\", file=f_out)\n+        # blank line\n+        print(file=f_out)\n+\n+        # print all stable lines, alphabetically sorted\n+        for line in sorted(stable_lines):\n+            print(\"\\t{};\".format(line), file=f_out)\n+\n+        # another blank line\n+        print(file=f_out)\n+\n+    # print local section\n+    print(\"\\tlocal: *;\", file=f_out)\n+\n+    # end stable version\n+    print(\"};\", file=f_out)\n+\n+    # do we have experimental lines?\n+    if not experimental_lines:\n+        return\n+\n+    # another blank line\n+    print(file=f_out)\n+\n+    # start experimental section\n+    print(\"EXPERIMENTAL {\", file=f_out)\n+\n+    # print all experimental lines as they were\n+    for line in experimental_lines:\n+        # don't print empty whitespace\n+        if not line:\n+            print(\"\", file=f_out)\n+        else:\n+            print(\"\\t{}\".format(line), file=f_out)\n+\n+    # end section\n+    print(\"};\", file=f_out)\n+\n+\n+def __main():\n+    arg_parser = argparse.ArgumentParser(\n+        description='Merge versions in linker version script.')\n+\n+    arg_parser.add_argument(\"map_file\", type=str,\n+                            help='path to linker version script file '\n+                                 '(pattern: *version.map)')\n+    arg_parser.add_argument(\"abi_version\", type=str,\n+                            help='target ABI version (pattern: MAJOR.MINOR)')\n+\n+    parsed = arg_parser.parse_args()\n+\n+    if not parsed.map_file.endswith('version.map'):\n+        print(\"Invalid input file: {}\".format(parsed.map_file),\n+              file=sys.stderr)\n+        arg_parser.print_help()\n+        sys.exit(1)\n+\n+    if not re.match(r\"\\d{1,2}\\.\\d{1,2}\", parsed.abi_version):\n+        print(\"Invalid ABI version: {}\".format(parsed.abi_version),\n+              file=sys.stderr)\n+        arg_parser.print_help()\n+        sys.exit(1)\n+\n+    with open(parsed.map_file) as f_in:\n+        stable_lines, experimental_lines = __parse_map_file(f_in)\n+\n+    with open(parsed.map_file, 'w') as f_out:\n+        __regenerate_map_file(f_out, parsed.abi_version, stable_lines,\n+                              experimental_lines)\n+\n+\n+if __name__ == \"__main__\":\n+    __main()\n",
    "prefixes": [
        "v3",
        "2/9"
    ]
}