Skip to content

Clarify what's a breaking change in commitizen #1446

Open

Description

@Lee-W

Description

#1435 (comment)

Possible Solution

No response

Additional context

No response

Additional context

No response

Activity

  1. added theissue type on May 22, 2025
  2. bearomorphism commented on May 22, 2025

    @bearomorphism
    Collaborator

    Relevant commit: 94c02b3

  3. bearomorphism commented on May 22, 2025

    @bearomorphism
    Collaborator

    I'll probably do something like the following in defaults.py

    # mymodule.py
    
    import warnings
    
    # ✅ Non-deprecated export
    NEW_CONSTANT = "new value"
    
    # ⚠️ Deprecated export (will warn on access)
    _OLD_CONSTANT = "old value"
    
    def __getattr__(name):
        if name == "OLD_CONSTANT":
            warnings.warn(
                "OLD_CONSTANT is deprecated and will be removed in a future version. Use NEW_CONSTANT instead.",
                category=DeprecationWarning,
                stacklevel=2,
            )
            return _OLD_CONSTANT
        raise AttributeError(f"module {__name__} has no attribute {name}")
  4. added a commit that references this issue on May 22, 2025
    9c8e840
  5. Lee-W commented on May 23, 2025

    @Lee-W
    MemberAuthor

    I'll probably do something like the following in defaults.py

    mymodule.py

    import warnings

    ✅ Non-deprecated export

    NEW_CONSTANT = "new value"

    ⚠️ Deprecated export (will warn on access)

    _OLD_CONSTANT = "old value"

    def getattr(name):
    if name == "OLD_CONSTANT":
    warnings.warn(
    "OLD_CONSTANT is deprecated and will be removed in a future version. Use NEW_CONSTANT instead.",
    category=DeprecationWarning,
    stacklevel=2,
    )
    return _OLD_CONSTANT
    raise AttributeError(f"module {name} has no attribute {name}")

    Yep, PEP562 is definitely something we should use 🙂

  6. added this to the 5.0.0 milestone on Aug 24, 2025
  7. Lee-W commented on Aug 24, 2025

    @Lee-W
    MemberAuthor

    I think the change in the following aspect should be viewed as a breaking changes.

    1. How the cz command is used.
    2. config used to be there, but removed
    3. Change of BaseCommitizen, VersionProvider, VersionProtocol publice interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions