Skip to content

Commit

Permalink
Add deprecation information
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Nov 25, 2023
1 parent 33e1fb1 commit 6020cff
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ciscoconfparse/ciscoconfparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -3386,7 +3386,7 @@ def re_match_iter_typed(
# This method is on CiscoConfParse()
@logger.catch(reraise=True)
@deprecated(
reason="req_cfgspec_all_diff() is obsolete; use HDiff() instead. req_cfgspec_all_diff() will be removed",
reason="req_cfgspec_all_diff() is obsolete; use Diff() instead. req_cfgspec_all_diff() will be removed",
version="1.7.0",
)
def req_cfgspec_all_diff(self, cfgspec, ignore_ws=False):
Expand All @@ -3401,7 +3401,7 @@ def req_cfgspec_all_diff(self, cfgspec, ignore_ws=False):
.. warning::
`req_cfgspec_excl_diff()` and `req_cfgspec_all_diff()` will be deprecated / removed in the future. `HDiff().unified_diffs()` or `HDiff().raw_diff_dicts()` can be used going forward; however, "some assembly will be required".
`req_cfgspec_excl_diff()` and `req_cfgspec_all_diff()` will be deprecated / removed in the future. `Diff().diff()` should be used going forward; however, "some assembly will be required".
Examples
Expand Down Expand Up @@ -3435,7 +3435,7 @@ def req_cfgspec_all_diff(self, cfgspec, ignore_ws=False):
skip_cfgspec = dict()
retval = list()
matches = self._find_line_OBJ("[a-zA-Z]")
## Make a list of unnecessary cfgspec lines
# Make a list of unnecessary cfgspec lines
for lineobj in matches:
for reqline in cfgspec:
if ignore_ws:
Expand All @@ -3458,7 +3458,7 @@ def req_cfgspec_all_diff(self, cfgspec, ignore_ws=False):
# This method is on CiscoConfParse()
@logger.catch(reraise=True)
@deprecated(
reason="req_cfgspec_excl_diff() is obsolete; use HDiff() instead. req_cfgspec_excl_diff() will be removed",
reason="req_cfgspec_excl_diff() is obsolete; use Diff() instead. req_cfgspec_excl_diff() will be removed",
version="1.7.0",
)
def req_cfgspec_excl_diff(self, linespec, uncfgspec, cfgspec):
Expand All @@ -3474,7 +3474,7 @@ def req_cfgspec_excl_diff(self, linespec, uncfgspec, cfgspec):
.. warning::
`req_cfgspec_excl_diff()` and `req_cfgspec_all_diff()` will be deprecated / removed in the future. `HDiff().unified_diffs()` or `HDiff().raw_diff_dicts()` can be used going forward; however, "some assembly will be required".
`req_cfgspec_excl_diff()` and `req_cfgspec_all_diff()` will be deprecated / removed in the future. `Diff().diff()` should be used going forward; however, "some assembly will be required".
Examples
--------
Expand Down Expand Up @@ -3648,6 +3648,10 @@ def _sequence_parent_lines(self, a_parent_objs, b_parent_objs):

# This method is on CiscoConfParse()
@logger.catch(reraise=True)
@deprecated(
reason="sync_diff() is obsolete; use Diff() instead. sync_diff() will be removed",
version="1.9.40",
)
def sync_diff(
self,
cfgspec=None,
Expand Down

0 comments on commit 6020cff

Please sign in to comment.