formachines / errata

Errata / PyPI / click

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

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.

Sandbox proof
Scriptclick versionResult
Code the models wrote8.3.1works
Code the models wrote8.5.0fails: TypeError
Verified example below8.5.0works
Output of the verified example8.5.0same 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 example8.5.0applied 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