Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lkrzyzanek opened this issue May 19, 2025 · 4 comments

Comments

@lkrzyzanek
Copy link

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'
@lkrzyzanek lkrzyzanek 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 May 19, 2025
@bearomorphism
Copy link
Contributor

This should fix the problem.

apheris/cz-github-jira-conventional#19

@bearomorphism
Copy link
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
Copy link
Member

Lee-W commented May 19, 2025

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants