Skip to content

Complete the [tool.unxt] → [tool.unxts.unxt] deprecation (remove legacy shim) #723

Description

@nstarman

Follow-up to #714.

Background

The namespace rename in #685 moved unxt's pyproject configuration from [tool.unxt] to [tool.unxts.unxt]. A leftover [tool.unxt] section is now silently ignored.

To ease migration, #714 added _warn_if_legacy_unxt_config in src/unxt/_src/config.py, which emits a DeprecationWarning at import (and on config.reload()) whenever a [tool.unxt] section is present:

The '[tool.unxt]' pyproject.toml section is deprecated and ignored; unxt now reads its configuration from '[tool.unxts.unxt]'. Move your settings there.

The follow-up

After a suitable deprecation period (i.e. at least one release with the warning shipped — target a later minor/major after the release that first carries #714), remove the legacy-detection shim so [tool.unxt] becomes just another unrecognized [tool.*] section with no special-case handling.

Concretely:

  • Remove _warn_if_legacy_unxt_config and its call site in _auto_load_project_toml_config.
  • Remove the stacklevel plumbing that exists solely to attribute that warning to the user's call site (trace stacklevel through _auto_load_project_toml_config / reload and drop what's no longer needed).
  • Remove the associated tests in tests/unit/test_config.py (the _warn_if_legacy_unxt_config / legacy-[tool.unxt] warning tests).
  • Confirm nothing else references the legacy section.

Notes

  • This is a user-facing behavior change (the migration warning disappears), so it should land in a release whose changelog/notes call it out.
  • The section was already ignored before this change, so removing the warning does not change whether [tool.unxt] settings take effect — only that users are no longer nudged to migrate.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions