Skip to content

Version 4.7.2 breaks cz_github_jira_conventional because of missing defaults.bump_pattern #1435

Closed
@lkrzyzanek

Description

@lkrzyzanek

Description

Version 4.7.2 breaks cz_github_jira_conventional because of missing defaults.bump_pattern

Steps to reproduce

  1. pip install commitizen cz_github_jira_conventional
  2. cz version --report

Current behavior

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.13/bin/cz", line 5, in <module>
    from commitizen.cli import main
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/commitizen/__init__.py", line 6, in <module>
    from commitizen.cz.base import BaseCommitizen
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/commitizen/cz/__init__.py", line 44, in <module>
    registry: dict[str, type[BaseCommitizen]] = discover_plugins()
                                                ~~~~~~~~~~~~~~~~^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/commitizen/cz/__init__.py", line 31, in discover_plugins
    mod = importlib.import_module(name)
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/cz_github_jira_conventional.py", line 29, in <module>
    class GithubJiraConventionalCz(BaseCommitizen):
    ...<256 lines>...
            return parsed_message
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/cz_github_jira_conventional.py", line 30, in GithubJiraConventionalCz
    bump_pattern = defaults.bump_pattern
                   ^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'commitizen.defaults' has no attribute 'bump_pattern'

Desired behavior

cz version --report            
Please add the key jira_base_url to your .cz.yaml|json|toml config file.

Screenshots

No response

Environment

4.7.2

pip3 install commitizen -U
Requirement already satisfied: commitizen in /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages (4.7.2)

The command cz version --report throws

cz version --report       
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.13/bin/cz", line 5, in <module>
    from commitizen.cli import main
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/commitizen/__init__.py", line 6, in <module>
    from commitizen.cz.base import BaseCommitizen
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/commitizen/cz/__init__.py", line 44, in <module>
    registry: dict[str, type[BaseCommitizen]] = discover_plugins()
                                                ~~~~~~~~~~~~~~~~^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/commitizen/cz/__init__.py", line 31, in discover_plugins
    mod = importlib.import_module(name)
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/cz_github_jira_conventional.py", line 29, in <module>
    class GithubJiraConventionalCz(BaseCommitizen):
    ...<256 lines>...
            return parsed_message
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/cz_github_jira_conventional.py", line 30, in GithubJiraConventionalCz
    bump_pattern = defaults.bump_pattern
                   ^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'commitizen.defaults' has no attribute 'bump_pattern'

Activity

changed the title [-]Good bug title tells us about precise symptom, not about the root cause.[/-] [+]Version 4.7.2 breaks cz_github_jira_conventional because of missing defaults.bump_pattern[/+] on May 19, 2025
bearomorphism

bearomorphism commented on May 19, 2025

@bearomorphism
Contributor

This should fix the problem.

apheris/cz-github-jira-conventional#19

bearomorphism

bearomorphism commented on May 19, 2025

@bearomorphism
Contributor

@Lee-W do you think 94c02b3 is actually a breaking change? I'm not entirely sure how you define a breaking change.

Lee-W

Lee-W commented on May 19, 2025

@Lee-W
Member

@Lee-W do you think 94c02b3 is actually a breaking change? I'm not entirely sure how you define a breaking change.

Technically, yes. Many things can be considered a breaking change. TBH, it's not that easy to draw the line. But in this case, it is. Airflow marks many functions as private with _func_name or meta: private in the function comments. I think we should start doing something like this so we can have a better idea on what should be considered as breaking and what's not. Otherwise, all of them could be.

cc @woile @noirbizarre

Lee-W

Lee-W commented on May 22, 2025

@Lee-W
Member

#1435 (comment)

Relevant issue created.

@bearomorphism we probably could create a backward compatible layer for this one and add deprecation warning when we have time 🙂

added theissue type on May 22, 2025
bearomorphism

bearomorphism commented on May 22, 2025

@bearomorphism
Contributor

#1435 (comment)

Relevant issue created.

@bearomorphism we probably could create a backward compatible layer for this one and add deprecation warning when we have time 🙂

Sure. Let me do it later this weekend.

Lee-W

Lee-W commented on May 25, 2025

@Lee-W
Member

As #1447 is merged and ready to be released soon, I'll close this one

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

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lkrzyzanek@Lee-W@bearomorphism

        Issue actions

          Version 4.7.2 breaks cz_github_jira_conventional because of missing defaults.bump_pattern · Issue #1435 · commitizen-tools/commitizen