Skip to content
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

Tests Fail Depending on tomlkit Version #628

Open
adam-grant-hendry opened this issue Dec 3, 2022 · 4 comments
Open

Tests Fail Depending on tomlkit Version #628

adam-grant-hendry opened this issue Dec 3, 2022 · 4 comments

Comments

@adam-grant-hendry
Copy link
Contributor

adam-grant-hendry commented Dec 3, 2022

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:

pytest_report.zip

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:

  1. Update pyproject.toml to specify

    tomlkit = ">=0.11.6,<1.0.0"
    

or

  1. Add test cases for tomlkit <=0.11.5 separate from test cases for tomlkit > 0.11.5.

Screenshots

No response

Environment

  • commitizen version: 2.37.1
  • python version: 3.8.10
  • operating system: Windows 10
@adam-grant-hendry adam-grant-hendry changed the title PR #626 Breaks Tests Update pyproject.toml dependency version for tomlkit Dec 3, 2022
@adam-grant-hendry adam-grant-hendry changed the title Update pyproject.toml dependency version for tomlkit Update version for tomlkit in pyproject.toml Dec 3, 2022
@adam-grant-hendry adam-grant-hendry changed the title Update version for tomlkit in pyproject.toml Tests Fail Depending on tomlkit Version Dec 3, 2022
@adam-grant-hendry
Copy link
Contributor Author

@woile @Lee-W Which of Desired behavior should be implemented in a PR? 1 or 2?

@Lee-W
Copy link
Member

Lee-W commented Dec 3, 2022

I prefer the second one.

@Kurt-von-Laven
Copy link
Contributor

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.

@woile
Copy link
Member

woile commented Apr 28, 2023

Any update on this? Is it still happening on v3?
Thanks

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

4 participants