Rename `clai2` outliers to its naming conventions: `SignInRequiredError`, `build_spinner`, `UISpan`, and un-prefixed modules
Fixes #11326
Applies the clai2 naming sweep from #11326, following the issue's alias strategy: the two documented public names keep deprecated aliases, UiSpan keeps one too (maintainer decision), and everything else is renamed directly.
[!WARNING]
Compatibility impact: Code that imports pydantic_clai2.builtin_plugins.pylon.PylonConfig, pydantic_clai2.ui.rendering.grep_output.GrepArguments, pydantic_clai2.ui.rendering.tool_output.DisplayArguments, or any of the 18 _-prefixed clai2 modules (e.g. pydantic_clai2._app, pydantic_clai2.runtime._session) needs the new name. SignInRequired, make_spinner, and UiSpan still work and emit PydanticAIDeprecationWarning.
Why this can ship in a minor release: #11326 classifies these as clai2 internals (the _ modules are private by name; the three renamed classes are only used inside clai2) and settles that they are renamed without aliases; only the documented plugin API (SignInRequired, make_spinner) keeps one, plus UiSpan, which the issue's table marks public, at the maintainer's request.
Migration: UiSpan → UISpan, PylonConfig → PylonSource, GrepArguments → GrepArgs, DisplayArguments → DisplayArgs, SignInRequired → SignInRequiredError, make_spinner → build_spinner; drop the leading _ from module paths (pydantic_clai2._app → pydantic_clai2.app).
New public surface
SignInRequiredError, build_spinner, UISpan, PylonSource, GrepArgs, DisplayArgs, and the un-prefixed module paths (renames, not new behavior).
User-visible behavior
None at runtime. mcp/_client.py, which main added after the issue, keeps its name (its imports move to the new names); renaming it is left for a follow-up. Also renamed: except ... as error → exc, secs → remaining_seconds, _emitting → _EMITTING, _NotSetUp → _NotSetUpError, _DirectUrl → _DirectURL. Items 9 (int in aoe.py) and 24 (vars in reloading.py) are skipped: those lines call the builtins, so nothing shadows them.
Verification
- New tests:
test_renamed_modules_are_not_underscore_prefixed,test_sign_in_required_error_keeps_its_deprecated_name,test_make_spinner_is_a_deprecated_alias_of_build_spinner,test_ui_span_is_a_deprecated_alias_of_ui_span_class; each fails onmainand passes here. tests/clai2(excluding browser tests, which were not run locally): 4422 passed, 3 skipped after rebasing ontomain.ruff,pyrighton changed files,pre-commit, andcheck_api_compatibility.py --against v2.62.0(with the waivers this PR adds).
What changes for existing users
Nothing at runtime; imports of the renamed clai2 internals need the new names.
Checklist
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
- PR title is fit for the release changelog.