Skip to content

Commit

Permalink
Update renderers/_httpdomain.py for recent Python versions
Browse files Browse the repository at this point in the history
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 <quentin@isovalent.com>
  • Loading branch information
flokli and qmonnet committed Aug 31, 2022
1 parent 4f78db9 commit dcd22d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sphinxcontrib/openapi/renderers/_httpdomain.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""OpenAPI spec renderer."""

import collections
import collections.abc
import copy
import functools
import http.client
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dcd22d3

Please sign in to comment.