From e5783c799f93123d7a2e4af8e4b5870f956b241a Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sat, 9 Nov 2024 19:13:31 +0800 Subject: [PATCH] schedule debug arg for removal --- src/pymatgen/util/io_utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pymatgen/util/io_utils.py b/src/pymatgen/util/io_utils.py index d6550f4fb29..d726c8c5ab3 100644 --- a/src/pymatgen/util/io_utils.py +++ b/src/pymatgen/util/io_utils.py @@ -4,6 +4,7 @@ import os import re +import warnings from typing import TYPE_CHECKING from monty.io import zopen @@ -65,8 +66,6 @@ def micro_pyawk( run(results, match), where match is the Match object from running Pattern.match. - TODO: deprecate and remove debug/postdebug? - Args: filename (PathLike): The file to search through. search (list[tuple[Pattern | str, Callable, Callable]]): The "search program" of @@ -82,6 +81,12 @@ def micro_pyawk( Author: Rickard Armiento, Ioannis Petousis """ + # TODO: remove debug and postdebug after 2025-11-09 if no one is opposing + if debug is not None: + warnings.warn("arg debug is scheduled for removal, see PR4160", DeprecationWarning, stacklevel=2) + if postdebug is not None: + warnings.warn("arg postdebug is scheduled for removal, see PR4160", DeprecationWarning, stacklevel=2) + if results is None: results = {}