Skip to content

Commit 866101a

Browse files
Merge branch 'master' into feature/custom-validation
2 parents ff7eee5 + 26152c5 commit 866101a

17 files changed

+518
-557
lines changed

.github/workflows/pythonpackage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
python-check:
77
strategy:
88
matrix:
9-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
9+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1010
platform: [ubuntu-20.04, macos-latest, windows-latest]
1111
runs-on: ${{ matrix.platform }}
1212
steps:

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ repos:
4949
- tomli
5050

5151
- repo: https://github.com/commitizen-tools/commitizen
52-
rev: v3.31.0 # automatically updated by Commitizen
52+
rev: v4.0.0 # automatically updated by Commitizen
5353
hooks:
5454
- id: commitizen
5555
- id: commitizen-branch

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## v4.0.0 (2024-11-26)
2+
13
## v3.31.0 (2024-11-16)
24

35
### Feat

commitizen/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.31.0"
1+
__version__ = "4.0.0"

commitizen/changelog.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929

3030
import re
3131
from collections import OrderedDict, defaultdict
32+
from collections.abc import Iterable
3233
from dataclasses import dataclass
3334
from datetime import date
34-
from typing import TYPE_CHECKING, Iterable
35+
from typing import TYPE_CHECKING
3536

3637
from jinja2 import (
3738
BaseLoader,

commitizen/changelog_formats/restructuredtext.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import re
44
import sys
55
from itertools import zip_longest
6-
from typing import IO, TYPE_CHECKING, Any, Tuple, Union
6+
from typing import IO, TYPE_CHECKING, Any, Union
77

88
from commitizen.changelog import Metadata
99

@@ -18,7 +18,7 @@
1818

1919

2020
# Can't use `|` operator and native type because of https://bugs.python.org/issue42233 only fixed in 3.10
21-
TitleKind: TypeAlias = Union[str, Tuple[str, str]]
21+
TitleKind: TypeAlias = Union[str, tuple[str, str]]
2222

2323

2424
class RestructuredText(BaseFormat):

commitizen/cli.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import argparse
44
import logging
55
import sys
6+
from collections.abc import Sequence
67
from copy import deepcopy
78
from functools import partial
89
from pathlib import Path
910
from types import TracebackType
10-
from typing import Any, Sequence
11+
from typing import Any
1112

1213
import argcomplete
1314
from decli import cli

commitizen/cz/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pkgutil
55
import sys
66
import warnings
7-
from typing import Iterable
7+
from collections.abc import Iterable
88

99
if sys.version_info >= (3, 10):
1010
from importlib import metadata

commitizen/cz/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import re
44
from abc import ABCMeta, abstractmethod
5-
from typing import Any, Callable, Iterable, NamedTuple, Protocol
5+
from collections.abc import Iterable
6+
from typing import Any, Callable, NamedTuple, Protocol
67

78
from jinja2 import BaseLoader, PackageLoader
89
from prompt_toolkit.styles import Style, merge_styles

commitizen/defaults.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import pathlib
44
from collections import OrderedDict
5-
from typing import Any, Iterable, MutableMapping, TypedDict
5+
from collections.abc import Iterable, MutableMapping
6+
from typing import Any, TypedDict
67

78
# Type
89
Questions = Iterable[MutableMapping[str, Any]]

commitizen/version_schemes.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
ClassVar,
1111
Literal,
1212
Protocol,
13-
Type,
1413
cast,
1514
runtime_checkable,
1615
)
@@ -150,7 +149,7 @@ def bump(
150149

151150
# With PEP 440 and SemVer semantic, Scheme is the type, Version is an instance
152151
Version: TypeAlias = VersionProtocol
153-
VersionScheme: TypeAlias = Type[VersionProtocol]
152+
VersionScheme: TypeAlias = type[VersionProtocol]
154153

155154

156155
class BaseVersion(_BaseVersion):

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ descriptive commits.
4141

4242
## Requirements
4343

44-
[Python](https://www.python.org/downloads/) `3.8+`
44+
[Python](https://www.python.org/downloads/) `3.9+`
4545

4646
[Git][gitscm] `1.8.5.2+`
4747

docs/tutorials/gitlab_ci.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ test:
7474

7575
auto-bump:
7676
stage: auto-bump
77-
image: python:3.8
77+
image: python:3.9
7878
before_script:
7979
- "which ssh-agent || ( apt-get update -qy && apt-get install openssh-client -qqy )"
8080
- eval `ssh-agent -s`

poetry.lock

+455-492
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+42-49
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[tool.commitizen]
2-
version = "3.31.0"
2+
version = "4.0.0"
33
tag_format = "v$version"
44
version_files = [
5-
"pyproject.toml:version",
6-
"commitizen/__version__.py",
7-
".pre-commit-config.yaml:rev:.+Commitizen",
5+
"pyproject.toml:version",
6+
"commitizen/__version__.py",
7+
".pre-commit-config.yaml:rev:.+Commitizen",
88
]
99

1010
[tool.poetry]
1111
name = "commitizen"
12-
version = "3.31.0"
12+
version = "4.0.0"
1313
description = "Python commitizen client tool"
1414
authors = ["Santiago Fraire <[email protected]>"]
1515
license = "MIT"
@@ -25,20 +25,17 @@ classifiers = [
2525
"Operating System :: OS Independent",
2626
"Programming Language :: Python",
2727
"Programming Language :: Python :: 3",
28-
"Programming Language :: Python :: 3.8",
2928
"Programming Language :: Python :: 3.9",
3029
"Programming Language :: Python :: 3.10",
3130
"Programming Language :: Python :: 3.11",
3231
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: 3.13",
3333
"Programming Language :: Python :: Implementation :: CPython",
3434
]
35-
packages = [
36-
{include = "commitizen"},
37-
{include = "commitizen/py.typed"},
38-
]
35+
packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }]
3936

4037
[tool.poetry.dependencies]
41-
python = ">=3.8"
38+
python = ">=3.9"
4239
questionary = "^2.0"
4340
decli = "^0.6.0"
4441
colorama = "^0.4.1"
@@ -48,24 +45,24 @@ tomlkit = ">=0.5.3,<1.0.0"
4845
jinja2 = ">=2.10.3"
4946
pyyaml = ">=3.08"
5047
argcomplete = ">=1.12.1,<3.6"
51-
typing-extensions = { version = "^4.0.1", python = "<3.8" }
48+
typing-extensions = { version = "^4.0.1", python = "<3.11" }
5249
charset-normalizer = ">=2.1.0,<4"
5350
# Use the Python 3.11 and 3.12 compatible API: https://github.com/python/importlib_metadata#compatibility
54-
importlib_metadata = { version = ">=8.0.0,<9", python = "<3.10"}
51+
importlib_metadata = { version = ">=8.0.0,<9", python = "<3.10" }
5552

5653
[tool.poetry.group.dev.dependencies]
5754
# dev tool
5855
ipython = "^8.0"
5956
# test
6057
pytest = ">=7.2,<9.0"
61-
pytest-cov = ">=4,<6"
58+
pytest-cov = ">=4,<7"
6259
pytest-mock = "^3.10"
6360
pytest-regressions = "^2.4.0"
6461
pytest-freezer = "^0.4.6"
6562
pytest-xdist = "^3.1.0"
6663
# linter
67-
ruff = ">=0.5.0,<0.8.0"
68-
pre-commit = ">=2.18,<4.0"
64+
ruff = ">=0.5.0,<0.9.0"
65+
pre-commit = ">=2.18,<5.0"
6966
mypy = "^1.4"
7067
types-PyYAML = ">=5.4.3,<7.0.0"
7168
types-termcolor = "^0.1.1"
@@ -108,33 +105,33 @@ semver = "commitizen.version_schemes:SemVer"
108105
semver2 = "commitizen.version_schemes:SemVer2"
109106

110107
[tool.coverage]
111-
[tool.coverage.report]
112-
show_missing = true
113-
exclude_lines = [
114-
# Have to re-enable the standard pragma
115-
'pragma: no cover',
116-
117-
# Don't complain about missing debug-only code:
118-
'def __repr__',
119-
'if self\.debug',
120-
121-
# Don't complain if tests don't hit defensive assertion code:
122-
'raise AssertionError',
123-
'raise NotImplementedError',
124-
125-
# Don't complain if non-runnable code isn't run:
126-
'if 0:',
127-
'if __name__ == .__main__.:',
128-
'if TYPE_CHECKING:',
129-
]
130-
omit = [
131-
'env/*',
132-
'venv/*',
133-
'.venv/*',
134-
'*/virtualenv/*',
135-
'*/virtualenvs/*',
136-
'*/tests/*',
137-
]
108+
[tool.coverage.report]
109+
show_missing = true
110+
exclude_lines = [
111+
# Have to re-enable the standard pragma
112+
'pragma: no cover',
113+
114+
# Don't complain about missing debug-only code:
115+
'def __repr__',
116+
'if self\.debug',
117+
118+
# Don't complain if tests don't hit defensive assertion code:
119+
'raise AssertionError',
120+
'raise NotImplementedError',
121+
122+
# Don't complain if non-runnable code isn't run:
123+
'if 0:',
124+
'if __name__ == .__main__.:',
125+
'if TYPE_CHECKING:',
126+
]
127+
omit = [
128+
'env/*',
129+
'venv/*',
130+
'.venv/*',
131+
'*/virtualenv/*',
132+
'*/virtualenvs/*',
133+
'*/tests/*',
134+
]
138135

139136
[build-system]
140137
requires = ["poetry_core>=1.0.0"]
@@ -157,11 +154,7 @@ select = [
157154
# isort
158155
"I",
159156
]
160-
ignore = [
161-
"E501",
162-
"D1",
163-
"D415"
164-
]
157+
ignore = ["E501", "D1", "D415"]
165158

166159
[tool.ruff.lint.isort]
167160
known-first-party = ["commitizen", "tests"]
@@ -179,7 +172,7 @@ warn_unused_ignores = true
179172
warn_unused_configs = true
180173

181174
[[tool.mypy.overrides]]
182-
module = "py.*" # Legacy pytest dependencies
175+
module = "py.*" # Legacy pytest dependencies
183176
ignore_missing_imports = true
184177

185178
[tool.codespell]

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import os
44
import re
55
import tempfile
6+
from collections.abc import Iterator
67
from pathlib import Path
7-
from typing import Iterator
88

99
import pytest
1010
from pytest_mock import MockerFixture

tests/providers/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

33
import os
4+
from collections.abc import Iterator
45
from pathlib import Path
5-
from typing import Iterator
66

77
import pytest
88

0 commit comments

Comments
 (0)