Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Latest cz does not export defaults.commit_parser #15

@KyleKing

Description

@KyleKing

This is a breaking change in the latest release. First reported here: commitizen-tools/commitizen#1046

Full traceback for search-ability:

~/ > poetry lock --no-update && poetry install --sync
Writing lock file
Installing dependencies from lock file

Package operations: 0 installs, 1 update, 0 removals

  - Updating commitizen (3.21.2 -> 3.21.3)

~/ > poetry run cz changelog                                       
Traceback (most recent call last):
  File "/.venv/bin/cz", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/.venv/lib/python3.12/site-packages/commitizen/cli.py", line 594, in main
    args.func(conf, arguments)()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.venv/lib/python3.12/site-packages/commitizen/commands/changelog.py", line 36, in __init__
    self.cz = factory.commiter_factory(self.config)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.venv/lib/python3.12/site-packages/commitizen/factory.py", line 11, in commiter_factory
    _cz = registry[name](config)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/.venv/lib/python3.12/site-packages/cz_legacy/cz_legacy.py", line 42, in __init__
    self.commit_parser = defaults.commit_parser.replace('<change_type>', f'<change_type>{joined_types}|')
                         ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'commitizen.defaults' has no attribute 'commit_parser'

self.commit_parser = defaults.commit_parser.replace('<change_type>', f'<change_type>{joined_types}|')

Metadata

Metadata

Assignees

Labels

Type: BugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions