Joey Armstrong | f88b738 | 2022-12-02 15:04:21 -0500 | [diff] [blame] | 1 | --- staging/lib/python3.10/site-packages/sphinxcontrib/openapi/utils.py 2022-12-02 18:47:40.050490678 -0500 |
| 2 | +++ venv_docs/lib/python3.10/site-packages/sphinxcontrib/openapi/utils.py 2022-12-02 18:45:53.023832002 -0500 |
| 3 | @@ -10,12 +10,7 @@ |
| 4 | |
| 5 | from __future__ import unicode_literals |
| 6 | |
| 7 | -try: |
| 8 | - import collections.abc |
| 9 | - from collections.abc import Mapping |
| 10 | -except ImportError: # fall through |
| 11 | - import collections |
| 12 | - from collections import Mapping |
| 13 | +import collections |
| 14 | |
| 15 | import jsonschema |
| 16 | try: |
| 17 | @@ -40,10 +35,10 @@ |
| 18 | resolver = jsonschema.RefResolver(uri, spec) |
| 19 | |
| 20 | def _do_resolve(node): |
| 21 | - if isinstance(node, Mapping) and '$ref' in node: |
| 22 | + if isinstance(node, collections.Mapping) and '$ref' in node: |
| 23 | with resolver.resolving(node['$ref']) as resolved: |
| 24 | return resolved |
| 25 | - elif isinstance(node, Mapping): |
| 26 | + elif isinstance(node, collections.Mapping): |
| 27 | for k, v in node.items(): |
| 28 | node[k] = _do_resolve(v) |
| 29 | elif isinstance(node, (list, tuple)): |