[cache][firebase_docs] Stop using Path.is_parent_of

Switch from using 'x.is_parent_of(y)' to 'x in y.parents'.
config_types.Path will soon be replaced with pathlib.Path and
pathlib.Path doesn't have an 'is_parent_of' method.

Change-Id: I39d7c8d4b2c465527e3099c5e269e21c6381f578
Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/recipes/+/1030724
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Fuchsia-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Ina Huh <ihuh@google.com>
diff --git a/recipe_modules/cache/api.py b/recipe_modules/cache/api.py
index 033f67f..b9c53b7 100644
--- a/recipe_modules/cache/api.py
+++ b/recipe_modules/cache/api.py
@@ -43,7 +43,7 @@
         # prevent recipes from using a cache context *after* entering the cache
         # dir. It's fine to enter the cache dir within the cache context.
         cwd = self.m.context.cwd or self.m.path.start_dir
-        if cache_path == cwd or cache_path.is_parent_of(cwd):
+        if cache_path == cwd or cache_path in cwd.parents:
             raise ValueError(f"cwd is within the {cache} cache")
 
         guard_file = cache_path.join(GUARD_FILE_NAME)
diff --git a/recipes/contrib/firebase_docs.py b/recipes/contrib/firebase_docs.py
index e600890..328db2e 100644
--- a/recipes/contrib/firebase_docs.py
+++ b/recipes/contrib/firebase_docs.py
@@ -234,7 +234,7 @@
             # build directory, so skip it.
             return False
 
-        if build_dir.is_parent_of(path):
+        if build_dir in path.parents:
             return False
 
         if "third_party" in entry["file"].split(api.path.sep):