This causes non-local side effects that are hard to track down. E.g:
--- import errors ---
Failed to import test module: tests.test_merge_yaml
Traceback (most recent call last):
File "/home/will/.pyenv/versions/3.7.7/lib/python3.7/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/home/will/.pyenv/versions/3.7.7/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/home/will/code/kolla-ansible/tests/test_merge_yaml.py", line 19, in <module>
from ansible.errors import AnsibleModuleError
ModuleNotFoundError: No module named 'ansible.errors'; 'ansible' is not a package
This `'ansible' is not a package` message occurs because ansible is a Mock.
Depends-On: https://review.opendev.org/#/c/726768/
Change-Id: Iddbdd3d855daadbf12536cc990559e6b8e123051
Removes and/or replaces all mentions of py27.
Cleans up obsolete requirements and their lower-constraints.
Separates test-requirements.
Makes lower-constraints pass outside of CI (MarkupSafe).
Adds FIXMEs about some hacky Mocks that may misbehave.
Change-Id: Ifc090bf3c1db17d8542ee591c91e8225a597bfe2
Now that py2 is gone, oslotest dropped dependency on mock and will
soon affect Ussuri CI [1], let's use unittest.mock built in py3.
This also fixes py38 jobs and proactively prevents py36 and py37
failing due to [1]. This is because we never included mock in
test-requirements (but in lower-constraints where it does not
really belong at all) and instead relied on oslotest to bring
it in.
[1] https://review.opendev.org/716322
Change-Id: I30e82e2d87418272a71c7ee089a8acdaf8872158
These are executed on the local host where we run ansible-playbook,
and we have agreed to drop Python 2 support there.
Partially Implements: blueprint drop-py2-support
Change-Id: Id2190c3a22a56f4f048afbf0f7200daa8f41a292
Services such as Zookeeper and Kafka use ini files which do not
explicitly specify sections. This change supports merging ini
files with no sections, so that the configuration for these
services follows the example configuration provided for them
as closely as possible.
Closes-Bug: #1756101
Partially-Implements: blueprint monasca-roles
Change-Id: I1061729875e5545c7af7d80779f9c2124b6c7134
There is inconsistent use of either `/usr/bin/python` or
`/usr/bin/env python`. This makes for unexpected results when a
user might be using a virtualenv.
Change-Id: Ibb030f920a8869f9113ade70b66a921cc815060d