From a1d4fca2e7c3ae3cca69593baade1ebc297a12ff Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Thu, 11 Aug 2022 12:38:54 +0100 Subject: [PATCH] Update for recent Python version At some point, apparently Python 3.3, collections.Mapping moved to collections.abc.Mapping [0]. Update the import accordingly. [0] https://docs.python.org/3/library/collections.abc.html --- sphinxcontrib/openapi/renderers/_httpdomain.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sphinxcontrib/openapi/renderers/_httpdomain.py b/sphinxcontrib/openapi/renderers/_httpdomain.py index 675a7da..9bb85d3 100644 --- a/sphinxcontrib/openapi/renderers/_httpdomain.py +++ b/sphinxcontrib/openapi/renderers/_httpdomain.py @@ -1,6 +1,11 @@ """OpenAPI spec renderer.""" -import collections +import sys +if sys.version_info >= (3, 3): + import collections.abc as collections +else: + import collections + import copy import functools import http.client