[path] Deprecate api.path.eq()

Bug: 335898567
Change-Id: Ic01d39958c27a08ac082bd2f130da43fb08f9528
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/5468772
Reviewed-by: Yuanjun Huang <yuanjunh@google.com>
Commit-Queue: Yuanjun Huang <yuanjunh@google.com>
Auto-Submit: Rob Mohr <mohrr@google.com>
diff --git a/README.recipes.md b/README.recipes.md
index 27abd5b..e394c94 100644
--- a/README.recipes.md
+++ b/README.recipes.md
@@ -3066,7 +3066,7 @@
 This is called by the recipe engine immediately after __init__(), but
 with `self._paths_client` initialized.
 
-&mdash; **def [is\_parent\_of](/recipe_modules/path/api.py#991)(self, parent: config_types.Path, child: config_types.Path):**
+&mdash; **def [is\_parent\_of](/recipe_modules/path/api.py#992)(self, parent: config_types.Path, child: config_types.Path):**
 
 Check whether child is contained within parent.
 
@@ -5740,7 +5740,7 @@
 [DEPS](/recipe_modules/path/examples/full.py#7): [json](#recipe_modules-json), [path](#recipe_modules-path), [platform](#recipe_modules-platform), [properties](#recipe_modules-properties), [step](#recipe_modules-step)
 
 
-&emsp; **@recipe_api.ignore_warnings('recipe_engine/CHECKOUT_DIR_DEPRECATED', 'recipe_engine/PATH_GETITEM_DEPRECATED', 'recipe_engine/PATH_IS_PARENT_OF_DEPRECATED')**<br>&mdash; **def [RunSteps](/recipe_modules/path/examples/full.py#18)(api):**
+&emsp; **@recipe_api.ignore_warnings('recipe_engine/CHECKOUT_DIR_DEPRECATED', 'recipe_engine/PATH_EQ_DEPRECATED', 'recipe_engine/PATH_GETITEM_DEPRECATED', 'recipe_engine/PATH_IS_PARENT_OF_DEPRECATED')**<br>&mdash; **def [RunSteps](/recipe_modules/path/examples/full.py#18)(api):**
 ### *recipes* / [path:tests/cast\_to\_path](/recipe_modules/path/tests/cast_to_path.py)
 
 [DEPS](/recipe_modules/path/tests/cast_to_path.py#8): [path](#recipe_modules-path), [platform](#recipe_modules-platform)
diff --git a/recipe.warnings b/recipe.warnings
index 380fb45..489d36b 100644
--- a/recipe.warnings
+++ b/recipe.warnings
@@ -12,6 +12,15 @@
 }
 
 warning {
+  name: "PATH_EQ_DEPRECATED"
+  description: "api.path.eq() is deprecated."
+  description: ""
+  description: "Use the == operator instead."
+  deadline: "2024-07-01"
+  google_issue { id: 335898567 }
+}
+
+warning {
   name: "BUILDBUCKET_BUILD_ID_DEPRECATED"
   description: "api.buildbucket.build_id is deprecated."
   description: ""
diff --git a/recipe_modules/path/api.py b/recipe_modules/path/api.py
index c58ca60..851fbff 100644
--- a/recipe_modules/path/api.py
+++ b/recipe_modules/path/api.py
@@ -986,6 +986,7 @@
 
     DEPRECATED: Just directly compare path1 and path2 with `==`.
     """
+    self.m.warning.issue('PATH_EQ_DEPRECATED')
     return path1 == path2
 
   def is_parent_of(self, parent: config_types.Path,
diff --git a/recipe_modules/path/examples/full.py b/recipe_modules/path/examples/full.py
index 24aea89..317debe 100644
--- a/recipe_modules/path/examples/full.py
+++ b/recipe_modules/path/examples/full.py
@@ -16,6 +16,7 @@
 
 
 @recipe_api.ignore_warnings('recipe_engine/CHECKOUT_DIR_DEPRECATED',
+                            'recipe_engine/PATH_EQ_DEPRECATED',
                             'recipe_engine/PATH_GETITEM_DEPRECATED',
                             'recipe_engine/PATH_IS_PARENT_OF_DEPRECATED')
 def RunSteps(api):