From dcd22d3e3a0176d98406d67f3c36e9182861e2c8 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 25 Aug 2022 15:44:47 +0200 Subject: [PATCH] Update renderers/_httpdomain.py for recent Python versions At some point, apparently Python 3.3, collections.Mapping moved to collections.abc.Mapping [0]. Update the imports accordingly. [0] https://docs.python.org/3/library/collections.abc.html Co-authored-by: Quentin Monnet --- sphinxcontrib/openapi/renderers/_httpdomain.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinxcontrib/openapi/renderers/_httpdomain.py b/sphinxcontrib/openapi/renderers/_httpdomain.py index 4746c47..630e11a 100644 --- a/sphinxcontrib/openapi/renderers/_httpdomain.py +++ b/sphinxcontrib/openapi/renderers/_httpdomain.py @@ -1,6 +1,7 @@ """OpenAPI spec renderer.""" import collections +import collections.abc import copy import functools import http.client @@ -174,7 +175,7 @@ def _get_schema_type(schema): _merge_mappings = deepmerge.Merger( - [(collections.Mapping, deepmerge.strategy.dict.DictStrategies("merge"))], + [(collections.abc.Mapping, deepmerge.strategy.dict.DictStrategies("merge"))], ["override"], ["override"], ).merge