From a0481b7fb9d9b210fc8162abcb5d5a8ba2710134 Mon Sep 17 00:00:00 2001 From: Corey Oordt Date: Fri, 14 Jul 2023 07:22:26 -0500 Subject: [PATCH] Added deprecation warning on .cfg files --- bumpversion/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bumpversion/config.py b/bumpversion/config.py index a0a24e28..2ac880cf 100644 --- a/bumpversion/config.py +++ b/bumpversion/config.py @@ -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 @@ -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)