Skip to content

fix(deprecated): mark deprecated will be removed in v5 #1492

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

Open
wants to merge 1 commit into
base: refactors
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commitizen/commands/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, config: BaseConfig, arguments: dict):
if deprecated_version_type:
warnings.warn(
DeprecationWarning(
"`--version-type` parameter is deprecated and will be removed in commitizen 4. "
"`--version-type` parameter is deprecated and will be removed in v5. "
"Please use `--version-scheme` instead"
)
)
Expand Down
2 changes: 1 addition & 1 deletion commitizen/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def __getattr__(name: str) -> Any:
if name in deprecated_vars:
value, replacement = deprecated_vars[name]
warnings.warn(
f"{name} is deprecated and will be removed in a future version. "
f"{name} is deprecated and will be removed in v5. "
f"Use {replacement} instead.",
DeprecationWarning,
stacklevel=2,
Expand Down
2 changes: 1 addition & 1 deletion commitizen/version_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def get_version_scheme(settings: Settings, name: str | None = None) -> VersionSc
if deprecated_setting:
warnings.warn(
DeprecationWarning(
"`version_type` setting is deprecated and will be removed in commitizen 4. "
"`version_type` setting is deprecated and will be removed in v5. "
"Please use `version_scheme` instead"
)
)
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ cz c -a -- -n # Stage all changes and skip the pre-commit and commit-
```

!!! warning
The `--signoff` option (or `-s`) is now recommended being used with the new syntax: `cz commit -- -s`. The old syntax `cz commit --signoff` is deprecated.
The `--signoff` option (or `-s`) is now recommended being used with the new syntax: `cz commit -- -s`. The old syntax `cz commit --signoff` is deprecated and will be removed in v5.

### Retry

Expand Down
4 changes: 1 addition & 3 deletions tests/test_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ def test_getattr_deprecated_vars():
# Verify warning messages
assert len(record) == 7
for warning in record:
assert "is deprecated and will be removed in a future version" in str(
warning.message
)
assert "is deprecated and will be removed" in str(warning.message)


def test_getattr_non_existent():
Expand Down