File: _collections_compat.py

package info (click to toggle)
ansible-core 2.19.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,944 kB
  • sloc: python: 181,408; cs: 4,929; sh: 4,661; xml: 34; makefile: 21
file content (27 lines) | stat: -rw-r--r-- 930 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c), Sviatoslav Sydorenko <ssydoren@redhat.com> 2018
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
"""Collections ABC import shim.

Use `ansible.module_utils.six.moves.collections_abc` instead, which has been available since ansible-core 2.11.
This module exists only for backwards compatibility.
"""

from __future__ import annotations

# Although this was originally intended for internal use only, it has wide adoption in collections.
# This is due in part to sanity tests previously recommending its use over `collections` imports.
from ansible.module_utils.six.moves.collections_abc import (  # pylint: disable=unused-import
    MappingView,
    ItemsView,
    KeysView,
    ValuesView,
    Mapping, MutableMapping,
    Sequence, MutableSequence,
    Set, MutableSet,
    Container,
    Hashable,
    Sized,
    Callable,
    Iterable,
    Iterator,
)