Skip to content

Commit a0481b7

Browse files
committed
Added deprecation warning on .cfg files
1 parent 0cf1cb5 commit a0481b7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bumpversion/config.py

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from pathlib import Path
99
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
1010

11+
from bumpversion.ui import print_warning
1112
from bumpversion.utils import labels_for_format
1213

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

0 commit comments

Comments
 (0)