https://github.com/mkdocs/get-deps/issues/3 --- mkdocs_get_deps-0.2.2/mkdocs_get_deps/yaml_util.py.orig +++ mkdocs_get_deps-0.2.2/mkdocs_get_deps/yaml_util.py @@ -3,9 +3,9 @@ import logging import os import os.path +from collections.abc import Mapping from typing import IO, Any -import mergedeep # type: ignore[import-untyped] import yaml try: @@ -46,5 +46,14 @@ log.debug(f"Loading inherited configuration file: {abspath}") with open(abspath, "rb") as f: parent = yaml_load(f) - result = mergedeep.merge(parent, result) + result = deep_merge_dicts(parent, result) return result + + +def deep_merge_dicts(dst: dict[str, Any], src: Mapping[str, Any]) -> dict[str, Any]: + for key, src_value in src.items(): + if isinstance(dst.get(key), Mapping) and isinstance(src_value, Mapping): + deep_merge_dicts(dst[key], src_value) + else: + dst[key] = src_value + return dst --- mkdocs_get_deps-0.2.2/pyproject.toml.orig +++ mkdocs_get_deps-0.2.2/pyproject.toml @@ -33,7 +33,6 @@ requires-python = ">=3.9" dependencies = [ "importlib-metadata >=4.3; python_version < '3.10'", - "mergedeep >=1.3.4", "platformdirs >=2.2.0", "PyYAML >=5.1", ]