Skip to content

Commit e8fd7f0

Browse files
authored
Merge branch 'master' into docs/cz-bump-yes-documented
2 parents 4f1362d + 095913a commit e8fd7f0

File tree

73 files changed

+1714
-765
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1714
-765
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ repos:
5656
- tomli
5757

5858
- repo: https://github.com/commitizen-tools/commitizen
59-
rev: v4.11.0 # automatically updated by Commitizen
59+
rev: v4.11.1 # automatically updated by Commitizen
6060
hooks:
6161
- id: commitizen
6262
- id: commitizen-branch

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v4.11.1 (2026-01-03)
2+
3+
### Fix
4+
5+
- **providers**: normalize package names in uv provider for uv.lock matching
6+
17
## v4.11.0 (2025-12-29)
28

39
### Feat

commitizen/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.11.0"
1+
__version__ = "4.11.1"

commitizen/providers/uv_provider.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import tomlkit
66
import tomlkit.items
7+
from packaging.utils import canonicalize_name
78

89
from commitizen.providers.base_provider import TomlProvider
910

@@ -27,12 +28,13 @@ def set_version(self, version: str) -> None:
2728
def set_lock_version(self, version: str) -> None:
2829
pyproject_toml_content = tomlkit.parse(self.file.read_text())
2930
project_name = pyproject_toml_content["project"]["name"] # type: ignore[index]
31+
normalized_project_name = canonicalize_name(str(project_name))
3032

3133
document = tomlkit.parse(self.lock_file.read_text())
3234

3335
packages: tomlkit.items.AoT = document["package"] # type: ignore[assignment]
3436
for i, package in enumerate(packages):
35-
if package["name"] == project_name:
37+
if package["name"] == normalized_project_name:
3638
document["package"][i]["version"] = version # type: ignore[index]
3739
break
3840
self.lock_file.write_text(tomlkit.dumps(document))

docs/contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ If you're a first-time contributor, please check out issues labeled [good first
6464
- Run the full test suite: `uv run poe all`
6565
- Ensure test coverage doesn't drop (we use [CodeCov](https://app.codecov.io/gh/commitizen-tools/commitizen))
6666
- For documentation changes, run `uv run poe doc` to check for warnings/errors
67+
- If you need to change some file regression snapshots, run: `uv run poe test:regen`
6768
4. **Committing Changes**
6869
- Use Commitizen to make commits (we follow [conventional commits](https://www.conventionalcommits.org/))
6970
- Example: `cz commit`

docs/customization/config_file.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The basic steps are:
44

55
1. Define your custom committing or bumping rules in the configuration file.
66
2. Declare `name = "cz_customize"` in your configuration file, or add `-n cz_customize` when running Commitizen.
7+
!!! warning
8+
`cz_customize` is likely to be removed or renamed in the next major release.
79

810
Example:
911

pyproject.toml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "commitizen"
3-
version = "4.11.0"
3+
version = "4.11.1"
44
description = "Python commitizen client tool"
55
authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }]
66
maintainers = [
@@ -86,7 +86,16 @@ semver = "commitizen.version_schemes:SemVer"
8686
semver2 = "commitizen.version_schemes:SemVer2"
8787

8888
[dependency-groups]
89-
dev = ["ipython>=8.0", "tox>4", "poethepoet>=0.34.0"]
89+
dev = [
90+
{ include-group = "test" },
91+
{ include-group = "linters" },
92+
{ include-group = "documentation" },
93+
{ include-group = "script" },
94+
"ipython>=8.0",
95+
"tox>4",
96+
"tox-uv",
97+
"poethepoet>=0.34.0",
98+
]
9099

91100
test = [
92101
"pytest>=7.2",
@@ -122,13 +131,12 @@ build-backend = "uv_build"
122131

123132

124133
[tool.commitizen]
125-
version = "4.11.0"
126134
tag_format = "v$version"
127135
version_files = [
128-
"pyproject.toml:version",
129136
"commitizen/__version__.py",
130137
".pre-commit-config.yaml:rev:.+Commitizen",
131138
]
139+
version_provider = "uv"
132140
version_scheme = "pep440"
133141

134142

@@ -170,6 +178,10 @@ omit = [
170178
[tool.pytest.ini_options]
171179
addopts = "--strict-markers"
172180
testpaths = ["tests/"]
181+
filterwarnings = [
182+
# get_smart_tag_range is deprecated and will be removed in v5
183+
"ignore:Call to deprecated function \\(or staticmethod\\) get_smart_tag_range:DeprecationWarning",
184+
]
173185

174186
[tool.tox]
175187
requires = ["tox>=4.22"]
@@ -263,6 +275,12 @@ test.cmd = "pytest -n auto --dist=loadfile"
263275
"test:all".help = "Run the test suite on all supported Python versions"
264276
"test:all".cmd = "tox --parallel"
265277

278+
"test:regen".help = "Regenerate the test fixtures"
279+
"test:regen".parallel = [
280+
{ ref = "test -k 'not py_' --regen-all" },
281+
{ ref = "test:all -- -k py_ --regen-all" },
282+
]
283+
266284
cover.help = "Run the test suite with coverage"
267285
cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen --junitxml=junit.xml -o junit_family=legacy"
268286

0 commit comments

Comments
 (0)