/pydeprecate:prunefrom pydeprecate
Retires pyDeprecate compatibility wrappers due for removal in a specified Python package release. Use for scheduled deprecation cleanup, not arbitrary deletion.
Ships in pydeprecate. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Verified against pyDeprecate >=0.12 (the three most recent minor releases plus the development line); check deprecate.__version__ first — identifiers newer than the floor carry a since-note, and older releases lack them.
Retire only compatibility due in the requested release. An expired record identifies a candidate, not which definition to delete.
deprecate.__version__.python -m deprecate status <package> --version "<target_release>" (requires [audit], plus [cli] before v0.15) lists every wrapper with its Current Status.💥 Past Removal Date.🔔 Remove Before Release are due only when the target release is the RC of that remove_in base and the user is preparing that final release.Version: line equals the requested release before trusting the column (see the coercion note below).find_deprecation_wrappers(..., recursive=True, include_members=True) and get_deprecation_config (since v0.13; on older releases read the wrapper's __deprecated__ attribute directly).pydeprecate expiry --static <package_dir> --version "<target_release>" (since v0.16; earlier releases have no import-free mode) reads the source without importing it.not statically resolvable gaps, not findings, and are not audited.remove_in <= target_release under PEP 440 ordering.
remove_in with the same base release as an explicitly requested RC target when the user is preparing that final release.pyDeprecate[audit]).2.0rc1 precedes 2.0; use a final version only if the user actually requests final-release preparation.Summarize each candidate before any edit: source location, symbol/layer, mode, deadline, replacement, affected callers/exports, intended edit. Apply an explicit removal request within its existing authorization; obey repository approval requirements.
Present that inventory and stop before the first edit. Proceed only after the user confirms the candidate list.
Beyond that confirmation, ask only for unresolved decisions that change the public contract. Do not turn a preview into a cleanup.
For import-free Python inventory, use deprecate.audit.find_deprecation_wrappers_static. It returns a frozen StaticScanResult with .wrappers, ordered .gaps strings and an optional .version (both since v0.16, like pydeprecate expiry --static).
Pass the result to validate_deprecation_expiry with the original explicit target release, or to validate_deprecation_policy and generate_deprecation_table, without importing or rescanning.
Always read .gaps before treating empty .wrappers or validator results as clean. Dynamic forms can remain invisible without a gap.
Rows are source approximations, not edit instructions. Never call a row's synthetic target, which raises TypeError.
Older releases have no import-free audit. Use import-mode find_deprecation_wrappers only when the import-safety condition in step 4 permits it. Otherwise inventory from source and report incomplete coverage.
Preserve the source cross-checks and candidate confirmation above.
| Due compatibility | Required edit |
|---|---|
| Obsolete forwarding function/class/object alias | Remove old entry point and obsolete exports; preserve replacement |
ARGS_REMAP on a surviving function or constructor | Remove due mapping/decorator and obsolete parameter/fallback; retain live callable and new signature |
ATTRS_REMAP on a surviving class | Remove due alias/mapping; preserve class, new attributes and unrelated proxy behavior |
| Stacked wrappers with different deadlines | Remove only due layer; retain later layers and valid decorator order |
| Warn-only function, property or class | Determine whether symbol is retired; migrate owned callers — those inside the step 1 package/source scope — before removing it |
| Deprecated module | Preserve needed implementation in replacement; remove obsolete module/export/import path only within scope |
Trace replacement chains before deleting a target still used by a retained wrapper. Preserve remaining mappings, args_extra, skip_if and proxy behavior unless their migration is explicitly due.
Do not replace an old wrapper with a permanent silent alias when the old entry point is meant to disappear. Updating local callers does not establish compatibility for unknown downstream users.
Callers outside the step 1 scope — sibling packages, vendored trees, other repositories — need their own request.
Update active docs, imports, exports and tests. Preserve historical changelog entries. Do not delete useful tests merely to make the suite pass; replace old compatibility assertions with retirement/new-API assertions where appropriate.
validate_deprecation_expiry(module, current_version=target_release)."0.10"), using the verified module scope and installed API.--version 0.10 as 0.10 since v0.15; on older releases its argument parsing coerced it to 0.1.remove_in <= current_version, so it cannot prove the RC case."2.0" for target 2.0rc1) using expiry only when its input is safe to scan.python -m deprecate status at the RC target can instead confirm no pruned symbol still shows 🔔 Remove Before Release.[audit]; before v0.15 the CLI also needs [cli].--strict so a skipped check fails instead of passing.pydeprecate gap: line.--exit-zero, add --ignore/--baseline entries (since v0.16), postpone remove_in, suppress scan warnings or change versions to manufacture success.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub borda/pydeprecate --plugin pydeprecate2 skills in this plugin
Other plugins' skills for the same job