From a4aadb0c04bd13af824c14dcc39f88345aa5c440 Mon Sep 17 00:00:00 2001 From: Niklas Mertsch Date: Sun, 20 Jul 2025 14:17:49 +0200 Subject: [PATCH 1/2] Fix name collision --- git/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/git/config.py b/git/config.py index 5fc099a27..345290a39 100644 --- a/git/config.py +++ b/git/config.py @@ -87,15 +87,15 @@ def __new__(cls, name: str, bases: Tuple, clsdict: Dict[str, Any]) -> "MetaParse mutating_methods = clsdict[kmm] for base in bases: methods = (t for t in inspect.getmembers(base, inspect.isroutine) if not t[0].startswith("_")) - for name, method in methods: - if name in clsdict: + for method_name, method in methods: + if method_name in clsdict: continue method_with_values = needs_values(method) - if name in mutating_methods: + if method_name in mutating_methods: method_with_values = set_dirty_and_flush_changes(method_with_values) # END mutating methods handling - clsdict[name] = method_with_values + clsdict[method_name] = method_with_values # END for each name/method pair # END for each base # END if mutating methods configuration is set From 80fd2c16211738156e65258381a17cdc429ddd08 Mon Sep 17 00:00:00 2001 From: Niklas Mertsch Date: Sun, 20 Jul 2025 14:17:58 +0200 Subject: [PATCH 2/2] Don't treat sphinx warnings as errors Workaround for python/cpython#100520 (rst syntax error in configparser docstrings), which was fixed in CPython 3.10+. Docutils raises warnings about the invalid docstrings, and `-W` instructs sphinx to treat this as errors. We can't control or silence these warnings, so we accept them and don't treat them as errors. See the discussion in gitpython-developers/GitPython#2060 for details. --- doc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Makefile b/doc/Makefile index ddeadbd7e..7e0d325fe 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -3,7 +3,7 @@ # You can set these variables from the command line. BUILDDIR = build -SPHINXOPTS = -W +SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER =