Skip to content

Commit

Permalink
Added deprecation warning on .cfg files
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Jul 14, 2023
1 parent 0cf1cb5 commit a0481b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bumpversion/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from pathlib import Path
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union

from bumpversion.ui import print_warning
from bumpversion.utils import labels_for_format

if TYPE_CHECKING: # pragma: no-coverage
Expand Down Expand Up @@ -251,6 +252,7 @@ def read_config_file(config_file: Union[str, Path, None] = None) -> Dict[str, An
logger.info("Reading config file %s:", config_file)
config_path = Path(config_file)
if config_path.suffix == ".cfg":
print_warning("The .cfg file format is deprecated. Please use .toml instead.")
return read_ini_file(config_path)
elif config_path.suffix == ".toml":
return read_toml_file(config_path)
Expand Down

0 comments on commit a0481b7

Please sign in to comment.