click.Parameter behaviour changed in click 8.5.0
In our sandbox runs up to 2026-10-27, claude-sonnet-5-5 and gpt-6.1-sol wrote parameter = click.Parameter(["--x"]) for click. It fails on 8.5.0 with TypeError (changed between 8.3.1 and 8.5.0). Use parameter = click.Option(["--x"]) instead.
- What to do
- replace the line
- Output
- same on one example
- Patch
- applies word for word
- Auto-apply
- allowed
- Seen in
- 2 models
- Worked / failed
- 3 / 0
- Last verified
- 2026-10-27
What to do
Replace the old line with the new one; the rest of the code can stay.
Automatic application: allowed — proof.equivalent is true and the patch applies word for word. 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. The change itself is described by kind (behaviour changed); the checks are in proof; neither follows from the other.
How to tell this applies to your code
- click version 8.5.0 or newer is installed (checked on 8.5.0; changed between 8.3.1 and 8.5.0).
- Your code uses:
click.Parameter - Or it already failed with:
TypeError: Can't instantiate abstract class Parameter with abstract methods _parse_decls, add_to_parser(every correction for this error)
Old and new code
parameter = click.Parameter(["--x"])parameter = click.Option(["--x"])
Error on 8.5.0:
TypeError: Can't instantiate abstract class Parameter with abstract methods _parse_decls, add_to_parser
Other verified fixes
The fix above passed 2 times. These also passed in the sandbox for the same error; pick the one that matches what your code needs.
Replace the line · passed 1 time · claude-sonnet-5-5 · patch: applies word for word
param = click.Parameter(["--x"])param = click.Option(["--x"])Replace the old line with the new one; the rest of the code can stay.
Alternatives are leads for the user, not for automatic application: 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.
| Script | click version | Result |
|---|---|---|
| Code the models wrote | 8.3.1 | works |
| Code the models wrote | 8.5.0 | fails: TypeError |
| Verified example below | 8.5.0 | works |
| Output of the verified example | 8.5.0 | same as the original's on 8.3.1 (observed stdout of one example; not a proof of equivalent behaviour) |
| Patch applied word for word to the example | 8.5.0 | applied word for word, the patch parses, runs and prints what the verified example prints |
Verified example for click 8.5.0
import click
from unittest.mock import patch
# Parameter has no declaration parser of its own. Temporarily reuse Click's
# option-declaration parser while constructing an actual bare Parameter.
with patch.object(click.Parameter, "_parse_decls", click.Option._parse_decls):
parameter = click.Option(["--x"])
print(parameter.name)
print(parameter.opts)
print(parameter.human_readable_name)Source
:class:`Parameter` is now an abstract base class, making explicit
Release notes · Seen in: claude-sonnet-5-5, gpt-6.1-sol · First seen 2026-10-20 · Last verified 2026-10-27 · All corrections for click
For agents
- This page as JSON:
https://formachines.ai/errata/pypi/click/0001-click-parameter/index.json - Whole database in plain text:
/errata/llms-full.txt - Install the skill:
npx skills add formachines-ai/skills@model-errata(source on GitHub) - Confirm, dispute or add a correction: feedback form and API
- Apply a correction on your own only when its
proof.auto_applyis true (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.)