{
 "action": "Replace the old line with the new one; the rest of the code can stay.",
 "alternatives": [
  {
   "action": "Replace the old line with the new one; the rest of the code can stay.",
   "applicability": {
    "exit_code": 0,
    "line": 14,
    "method": "literal_patch",
    "occurrences": 1,
    "output": "same",
    "patched_sha": "8ca03ba80a83",
    "reason": "applied word for word, the patch parses, drops the old names, runs on 8.5.0 and prints what the verified example prints",
    "run_on": "8.5.0",
    "status": "applies"
   },
   "by_notes": true,
   "changelog_ref": {
    "quote": ":class:`Parameter` is now an abstract base class, making explicit",
    "url": "https://github.com/pallets/click/releases/tag/8.4.0"
   },
   "confirmations": 1,
   "detect": [
    "click.Parameter"
   ],
   "equivalence": "same",
   "format": "replace",
   "kind": "behavior_changed",
   "right": "param = click.Option([\"--x\"])",
   "script_right": "import sys\n\nimport click\n\n\ndef show(param):\n    print(param.name)\n    print(param.opts)\n    print(param.human_readable_name)\n\n\ntry:\n    # click.Parameter is abstract in 8.5.0; use the concrete click.Option instead.\n    param = click.Option([\"--x\"])\nexcept NotImplementedError:\n    print(\n        \"note: click.Parameter._parse_decls is not implemented on the base \"\n        \"class; using a minimal direct subclass of click.Parameter instead.\",\n        file=sys.stderr,\n    )\n\n    class MinimalParameter(click.Parameter):\n        def _parse_decls(self, decls, expose_value):\n            decls = list(decls)\n            name = None\n            opts = []\n            for decl in decls:\n                if decl.isidentifier():\n                    name = decl\n                else:\n                    opts.append(decl)\n            if name is None and opts:\n                longest = max(opts, key=lambda o: o.startswith(\"--\"))\n                name = longest.lstrip(\"-\").replace(\"-\", \"_\")\n            return name, opts, []\n\n    param = MinimalParameter([\"--x\"])\n\nshow(param)",
   "script_wrong": "import sys\n\nimport click\n\n\ndef show(param):\n    print(param.name)\n    print(param.opts)\n    print(param.human_readable_name)\n\n\ntry:\n    # A truly bare click.Parameter: its base _parse_decls() is abstract.\n    param = click.Parameter([\"--x\"])\nexcept NotImplementedError:\n    print(\n        \"note: click.Parameter._parse_decls is not implemented on the base \"\n        \"class; using a minimal direct subclass of click.Parameter instead.\",\n        file=sys.stderr,\n    )\n\n    class MinimalParameter(click.Parameter):\n        def _parse_decls(self, decls, expose_value):\n            decls = list(decls)\n            name = None\n            opts = []\n            for decl in decls:\n                if decl.isidentifier():\n                    name = decl\n                else:\n                    opts.append(decl)\n            if name is None and opts:\n                longest = max(opts, key=lambda o: o.startswith(\"--\"))\n                name = longest.lstrip(\"-\").replace(\"-\", \"_\")\n            return name, opts, []\n\n    param = MinimalParameter([\"--x\"])\n\nshow(param)",
   "seen_in_models": [
    "claude-sonnet-5-5"
   ],
   "wrong": "param = click.Parameter([\"--x\"])"
  }
 ],
 "applicability": {
  "exit_code": 0,
  "line": 7,
  "method": "literal_patch",
  "occurrences": 1,
  "output": "same",
  "patched_sha": "c942103aebed",
  "reason": "applied word for word, the patch parses, drops the old names, runs on 8.5.0 and prints what the verified example prints",
  "run_on": "8.5.0",
  "status": "applies"
 },
 "by_notes": true,
 "changelog_ref": {
  "quote": ":class:`Parameter` is now an abstract base class, making explicit",
  "url": "https://github.com/pallets/click/releases/tag/8.4.0"
 },
 "confirmations": {
  "failed": 0,
  "worked": 3
 },
 "detect": [
  "click.Parameter"
 ],
 "ecosystem": "pypi",
 "equivalence": "same",
 "error_kind": "type_error",
 "error_signature": {
  "message": "Can't instantiate abstract class Parameter with abstract methods _parse_decls, add_to_parser",
  "norm": "type_error:",
  "type": "TypeError"
 },
 "first_seen": "2026-10-20T16:11:13+00:00",
 "format": "replace",
 "format_version": 2,
 "id": "pypi/click/8.5.0/0001",
 "kind": "behavior_changed",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "package": "click",
 "proof": {
  "applicability": {
   "exit_code": 0,
   "line": 7,
   "method": "literal_patch",
   "occurrences": 1,
   "output": "same",
   "patched_sha": "c942103aebed",
   "reason": "applied word for word, the patch parses, drops the old names, runs on 8.5.0 and prints what the verified example prints",
   "run_on": "8.5.0",
   "status": "applies"
  },
  "auto_apply": true,
  "auto_apply_reason": "proof.equivalent is true and the patch applies word for word",
  "auto_apply_rule": "Automatic application is allowed only when proof.equivalent is true and proof.applicability.status is applies; otherwise show the correction to the user as a lead and do not apply it on your own.",
  "equivalence": "same",
  "equivalent": true,
  "fails_on": "8.5.0",
  "fixed_on": "8.5.0",
  "level": "differential",
  "method": {
   "fix_on": "8.5.0",
   "name": "stdout_match",
   "normalization": "lines stripped, blank lines dropped, runs of whitespace collapsed; memory addresses, timestamps and temporary paths masked",
   "original_on": "8.3.1",
   "scope": "the observable stdout of one example script; return values, files, other inputs and exception types are not compared, so a match is not a proof of equivalent behaviour"
  },
  "script_right": "import click\nfrom unittest.mock import patch\n\n# Parameter has no declaration parser of its own. Temporarily reuse Click's\n# option-declaration parser while constructing an actual bare Parameter.\nwith patch.object(click.Parameter, \"_parse_decls\", click.Option._parse_decls):\n    parameter = click.Option([\"--x\"])\n\nprint(parameter.name)\nprint(parameter.opts)\nprint(parameter.human_readable_name)",
  "script_wrong": "import click\nfrom unittest.mock import patch\n\n# Parameter has no declaration parser of its own. Temporarily reuse Click's\n# option-declaration parser while constructing an actual bare Parameter.\nwith patch.object(click.Parameter, \"_parse_decls\", click.Option._parse_decls):\n    parameter = click.Parameter([\"--x\"])\n\nprint(parameter.name)\nprint(parameter.opts)\nprint(parameter.human_readable_name)",
  "works_on": "8.3.1"
 },
 "right": "parameter = click.Option([\"--x\"])",
 "seen_in_models": [
  "claude-sonnet-5-5",
  "gpt-6.1-sol"
 ],
 "seq": 1,
 "slug": "click-parameter",
 "source": "pipeline",
 "symbol": "click.Parameter",
 "updated": "2026-10-27T17:20:00+00:00",
 "url": "https://formachines.ai/errata/pypi/click/0001-click-parameter/",
 "variant_confirmations": 2,
 "variant_models": [
  "gpt-6.1-sol"
 ],
 "verified": "sandbox",
 "versions": {
  "changed_in": ">8.3.1,<=8.5.0",
  "fails_on": "8.5.0",
  "works_on": "8.3.1"
 },
 "wrong": "parameter = click.Parameter([\"--x\"])"
}