Skip to content

[rejected AI] privatize convert_type - #3862

Closed
mahesh-desu wants to merge 1 commit into
pallets:mainfrom
mahesh-desu:fix/click-3847-privatize
Closed

[rejected AI] privatize convert_type#3862
mahesh-desu wants to merge 1 commit into
pallets:mainfrom
mahesh-desu:fix/click-3847-privatize

Conversation

@mahesh-desu

Copy link
Copy Markdown

Closes #3847.

Renames \click.types.convert_type\ to _convert_type; the old name remains as a deprecated shim emitting \DeprecationWarning\ (removed in Click 9.0). Internal callers in \ ypes.py\ (\Choice.get_metavar, \Tuple), \core.py\ (\Parameter, \Option), and \ ermui.py\ (\prompt) now use _convert_type.

\FuncParamType\ audit: no top-level import in \click/init.py, left unchanged to keep scope minimal.

Tests:

  • New regression \ est_convert_type_privatized_with_deprecated_alias\ in \ ests/test_types/test_convert_type.py: watched FAIL before fix (\hasattr(click.types, '_convert_type')\ AssertionError), PASS after.
  • Existing behavior tests switched to canonical _convert_type\ (required: pytest \ ilterwarnings=error).
  • \pytest tests\ (PYTHONPATH=src): 1976 passed, 108 skipped, 1 xfailed.

  • uff check\ +
    uff format --check: clean. \mypy\ (strict): no errors in touched files (7 pre-existing errors in untouched _termui_impl.py/\ esting.py, identical on baseline).

Note: run with \PYTEST_DISABLE_PLUGIN_AUTOLOAD=1\ + \PYTHONPATH=src\ because the sandbox interpreter has a broken global pytest plugin (langsmith/pydantic-core mismatch) and a non-editable click 8.5.0 install.

@davidism

Copy link
Copy Markdown
Member

@davidism davidism closed this Sep 10, 2026
@davidism davidism added the rejected AI Contribution rejected because of its untrustworthy AI origin label Sep 10, 2026
@davidism davidism changed the title fix: privatize convert_type (fixes #3847) [rejected AI] privatize convert_type Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rejected AI Contribution rejected because of its untrustworthy AI origin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More private utilities that need to be marked and public api deprecated

2 participants