Tests Fail Depending on `tomlkit` Version
Description
PR #626 changed
tests/commands/test_bump_command.py
tests/commands/test_init_command.py
tests/test_conf.py
to accomodate changes to tomlkit from 0.11.5 to 0.11.6. However, the pyproject.toml still has the version set as
tomlkit = ">=0.5.3,<1.0.0"
Hence, tests fail for tomlkit<=0.11.5.
Steps to reproduce
Run pytest on commitizen repo with tomlkit<=0.11.5.
Current behavior
The following 6 tests fail:
when tomlkit is <= 0.11.5, but pass when tomlkit >= 0.11.6.
Desired behavior
Either of the following, depending on what should be supported:
-
Update
pyproject.tomlto specifytomlkit = ">=0.11.6,<1.0.0"
or
- Add test cases for
tomlkit<=0.11.5separate from test cases fortomlkit > 0.11.5.
Screenshots
No response
Environment
- commitizen version:
2.37.1 - python version:
3.8.10 - operating system:
Windows 10
@woile @Lee-W Which of Desired behavior should be implemented in a PR? 1 or 2?
I prefer the second one.
In case this issue remains open until support for Python 3.10 is dropped, tomlib was added to the standard library in Python 3.11, so the dependency on tomlkit can eventually be dropped.
Any update on this? Is it still happening on v3?
Thanks