Skip to content

Commit

Permalink
update ansible version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tcharl committed Dec 21, 2023
1 parent fc83e93 commit 926700e
Show file tree
Hide file tree
Showing 10,671 changed files with 4,211,159 additions and 763 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ exclude_paths:
- tests
- meta/
- molecule/
- .github/
skip_list:
- experimental # all rules tagged as experimental
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern
- var-naming[no-role-prefix] # Variable name {} should contain role name {} as a prefix
- galaxy[no-changelog]
98 changes: 98 additions & 0 deletions .tox/test-exec-monorepo/.tox-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"ToxEnv": {
"name": "test-exec-monorepo",
"type": "VirtualEnvRunner"
},
"Python": {
"version_info": [
3,
11,
3,
"final",
0
],
"executable": "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/bin/python3.11",
"virtualenv version": "20.21.1"
},
"PythonRun": {
"deps": {
"options": [],
"requirements": [
"ansible-compat==3.0.2; python_full_version > \"3.10.0\"",
"ansible-core==2.14.5; python_full_version > \"3.10.0\"",
"ansible-lint==6.8.7; python_full_version > \"3.10.0\"",
"ansible==7.5.0; python_full_version > \"3.10.0\"",
"arrow==1.2.3; python_full_version > \"3.10.0\"",
"attrs==23.1.0; python_full_version > \"3.10.0\"",
"binaryornot==0.4.4; python_full_version > \"3.10.0\"",
"black==23.3.0; python_full_version > \"3.10.0\"",
"bracex==2.3.post1; python_full_version > \"3.10.0\"",
"certifi==2023.5.7; python_full_version > \"3.10.0\"",
"cffi==1.15.1; python_full_version > \"3.10.0\"",
"chardet==5.1.0; python_full_version > \"3.10.0\"",
"charset-normalizer==3.1.0; python_full_version > \"3.10.0\"",
"click-help-colors==0.9.1; python_full_version > \"3.10.0\"",
"click==8.1.3; python_full_version > \"3.10.0\"",
"colorama==0.4.6; python_full_version > \"3.10.0\" and sys_platform == \"win32\" or python_full_version > \"3.10.0\" and platform_system == \"Windows\"",
"cookiecutter==2.1.1; python_full_version > \"3.10.0\"",
"cryptography==40.0.2; python_full_version > \"3.10.0\"",
"enrich==1.2.7; python_full_version > \"3.10.0\"",
"exceptiongroup==1.1.1; python_version < \"3.11\" and python_full_version > \"3.10.0\"",
"filelock==3.12.0; python_full_version > \"3.10.0\"",
"flake8==6.0.0; python_full_version > \"3.10.0\"",
"idna==3.4; python_full_version > \"3.10.0\"",
"iniconfig==2.0.0; python_full_version > \"3.10.0\"",
"jinja2-time==0.2.0; python_full_version > \"3.10.0\"",
"jinja2==3.1.2; python_full_version > \"3.10.0\"",
"jmespath==1.0.1; python_full_version > \"3.10.0\"",
"jsonschema==4.17.3; python_full_version > \"3.10.0\"",
"markdown-it-py==2.2.0; python_full_version > \"3.10.0\"",
"markupsafe==2.1.2; python_full_version > \"3.10.0\"",
"mccabe==0.7.0; python_full_version > \"3.10.0\"",
"mdurl==0.1.2; python_full_version > \"3.10.0\"",
"molecule-plugins[podman]==23.4.1; python_full_version > \"3.10.0\"",
"molecule==5.0.1; python_full_version > \"3.10.0\"",
"mypy-extensions==1.0.0; python_full_version > \"3.10.0\"",
"netaddr==0.8.0; python_full_version > \"3.10.0\"",
"packaging==23.1; python_full_version > \"3.10.0\"",
"pathspec==0.11.1; python_full_version > \"3.10.0\"",
"platformdirs==3.5.0; python_full_version > \"3.10.0\"",
"pluggy==1.0.0; python_full_version > \"3.10.0\"",
"pycodestyle==2.10.0; python_full_version > \"3.10.0\"",
"pycparser==2.21; python_full_version > \"3.10.0\"",
"pyflakes==3.0.1; python_full_version > \"3.10.0\"",
"pygments==2.15.1; python_full_version > \"3.10.0\"",
"pyrsistent==0.19.3; python_full_version > \"3.10.0\"",
"pytest-testinfra==7.0.0; python_full_version > \"3.10.0\"",
"pytest==7.3.1; python_full_version > \"3.10.0\"",
"python-dateutil==2.8.2; python_full_version > \"3.10.0\"",
"python-slugify==8.0.1; python_full_version > \"3.10.0\"",
"pyyaml==6.0; python_full_version > \"3.10.0\"",
"requests==2.30.0; python_full_version > \"3.10.0\"",
"resolvelib==0.8.1; python_full_version > \"3.10.0\"",
"rich==13.3.5; python_full_version > \"3.10.0\"",
"ruamel-yaml-clib==0.2.7; platform_python_implementation == \"CPython\" and python_version < \"3.12\" and python_full_version > \"3.10.0\"",
"ruamel-yaml==0.17.24; python_full_version > \"3.10.0\"",
"six==1.16.0; python_full_version > \"3.10.0\"",
"subprocess-tee==0.4.1; python_full_version > \"3.10.0\"",
"text-unidecode==1.3; python_full_version > \"3.10.0\"",
"tomli==2.0.1; python_version < \"3.11\" and python_full_version > \"3.10.0\"",
"urllib3==2.0.2; python_full_version > \"3.10.0\"",
"wcmatch==8.4.1; python_full_version > \"3.10.0\"",
"yamllint==1.31.0; python_full_version > \"3.10.0\""
],
"constraints": [],
"constraint_options": {
"constrain_package_deps": false,
"use_frozen_constraints": false
}
}
},
"RunToxEnv": {
"package_deps": [
"ansible<8.0.0,>=7.5.0",
"jmespath<2.0.0,>=1.0.1",
"netaddr<0.9.0,>=0.8.0"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
# don't import any costly modules
import sys
import os


is_pypy = '__pypy__' in sys.builtin_module_names


def warn_distutils_present():
if 'distutils' not in sys.modules:
return
if is_pypy and sys.version_info < (3, 7):
# PyPy for 3.6 unconditionally imports distutils, so bypass the warning
# https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250
return
import warnings

warnings.warn(
"Distutils was imported before Setuptools, but importing Setuptools "
"also replaces the `distutils` module in `sys.modules`. This may lead "
"to undesirable behaviors or errors. To avoid these issues, avoid "
"using distutils directly, ensure that setuptools is installed in the "
"traditional way (e.g. not an editable install), and/or make sure "
"that setuptools is always imported before distutils."
)


def clear_distutils():
if 'distutils' not in sys.modules:
return
import warnings

warnings.warn("Setuptools is replacing distutils.")
mods = [
name
for name in sys.modules
if name == "distutils" or name.startswith("distutils.")
]
for name in mods:
del sys.modules[name]


def enabled():
"""
Allow selection of distutils by environment variable.
"""
which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local')
return which == 'local'


def ensure_local_distutils():
import importlib

clear_distutils()

# With the DistutilsMetaFinder in place,
# perform an import to cause distutils to be
# loaded from setuptools._distutils. Ref #2906.
with shim():
importlib.import_module('distutils')

# check that submodules load as expected
core = importlib.import_module('distutils.core')
assert '_distutils' in core.__file__, core.__file__
assert 'setuptools._distutils.log' not in sys.modules


def do_override():
"""
Ensure that the local copy of distutils is preferred over stdlib.
See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401
for more motivation.
"""
if enabled():
warn_distutils_present()
ensure_local_distutils()


class _TrivialRe:
def __init__(self, *patterns):
self._patterns = patterns

def match(self, string):
return all(pat in string for pat in self._patterns)


class DistutilsMetaFinder:
def find_spec(self, fullname, path, target=None):
# optimization: only consider top level modules and those
# found in the CPython test suite.
if path is not None and not fullname.startswith('test.'):
return

method_name = 'spec_for_{fullname}'.format(**locals())
method = getattr(self, method_name, lambda: None)
return method()

def spec_for_distutils(self):
if self.is_cpython():
return

import importlib
import importlib.abc
import importlib.util

try:
mod = importlib.import_module('setuptools._distutils')
except Exception:
# There are a couple of cases where setuptools._distutils
# may not be present:
# - An older Setuptools without a local distutils is
# taking precedence. Ref #2957.
# - Path manipulation during sitecustomize removes
# setuptools from the path but only after the hook
# has been loaded. Ref #2980.
# In either case, fall back to stdlib behavior.
return

class DistutilsLoader(importlib.abc.Loader):
def create_module(self, spec):
mod.__name__ = 'distutils'
return mod

def exec_module(self, module):
pass

return importlib.util.spec_from_loader(
'distutils', DistutilsLoader(), origin=mod.__file__
)

@staticmethod
def is_cpython():
"""
Suppress supplying distutils for CPython (build and tests).
Ref #2965 and #3007.
"""
return os.path.isfile('pybuilddir.txt')

def spec_for_pip(self):
"""
Ensure stdlib distutils when running under pip.
See pypa/pip#8761 for rationale.
"""
if self.pip_imported_during_build():
return
clear_distutils()
self.spec_for_distutils = lambda: None

@classmethod
def pip_imported_during_build(cls):
"""
Detect if pip is being imported in a build script. Ref #2355.
"""
import traceback

return any(
cls.frame_file_is_setup(frame) for frame, line in traceback.walk_stack(None)
)

@staticmethod
def frame_file_is_setup(frame):
"""
Return True if the indicated frame suggests a setup.py file.
"""
# some frames may not have __file__ (#2940)
return frame.f_globals.get('__file__', '').endswith('setup.py')

def spec_for_sensitive_tests(self):
"""
Ensure stdlib distutils when running select tests under CPython.
python/cpython#91169
"""
clear_distutils()
self.spec_for_distutils = lambda: None

sensitive_tests = (
[
'test.test_distutils',
'test.test_peg_generator',
'test.test_importlib',
]
if sys.version_info < (3, 10)
else [
'test.test_distutils',
]
)


for name in DistutilsMetaFinder.sensitive_tests:
setattr(
DistutilsMetaFinder,
f'spec_for_{name}',
DistutilsMetaFinder.spec_for_sensitive_tests,
)


DISTUTILS_FINDER = DistutilsMetaFinder()


def add_shim():
DISTUTILS_FINDER in sys.meta_path or insert_shim()


class shim:
def __enter__(self):
insert_shim()

def __exit__(self, exc, value, tb):
remove_shim()


def insert_shim():
sys.meta_path.insert(0, DISTUTILS_FINDER)


def remove_shim():
try:
sys.meta_path.remove(DISTUTILS_FINDER)
except ValueError:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('_distutils_hack').do_override()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.19.3'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
__all__ = ["__version__", "version_tuple"]

try:
from ._version import version as __version__, version_tuple
except ImportError: # pragma: no cover
# broken installation, we don't even try
# unknown only works because we do poor mans version compare
__version__ = "unknown"
version_tuple = (0, 0, "unknown") # type:ignore[assignment]
Loading

0 comments on commit 926700e

Please sign in to comment.