diff options
author | Matt Clay <matt@mystile.com> | 2021-12-07 18:41:54 +0100 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2021-12-08 02:22:54 +0100 |
commit | 97ef1d031c77d19525e87c4b4830905962cacc80 (patch) | |
tree | 73edf7e1bbc433b21550d38327a4d20d6e3727b6 | |
parent | galaxy build - ignore existing MANIFEST and FILES (#76479) (diff) | |
download | ansible-97ef1d031c77d19525e87c4b4830905962cacc80.tar.xz ansible-97ef1d031c77d19525e87c4b4830905962cacc80.zip |
Revert "ansible-test - Fix import test when vendoring."
This reverts commit 33a8d063327f8e3053799c001eaa21b660cb428e.
-rw-r--r-- | changelogs/fragments/ansible-test-sanity-vendoring.yml | 2 | ||||
-rw-r--r-- | lib/ansible/_vendor/__init__.py | 1 | ||||
-rw-r--r-- | test/lib/ansible_test/_util/target/sanity/import/importer.py | 6 |
3 files changed, 0 insertions, 9 deletions
diff --git a/changelogs/fragments/ansible-test-sanity-vendoring.yml b/changelogs/fragments/ansible-test-sanity-vendoring.yml deleted file mode 100644 index 7b6803da90..0000000000 --- a/changelogs/fragments/ansible-test-sanity-vendoring.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - ansible-test - Fix the ``import`` sanity test to work properly when Ansible's built-in vendoring support is in use. diff --git a/lib/ansible/_vendor/__init__.py b/lib/ansible/_vendor/__init__.py index 21f3efedf9..a31957b672 100644 --- a/lib/ansible/_vendor/__init__.py +++ b/lib/ansible/_vendor/__init__.py @@ -39,7 +39,6 @@ def _ensure_vendored_path_entry(): already_loaded_vendored_modules = set(sys.modules.keys()).intersection(vendored_module_names) if already_loaded_vendored_modules: - # NOTE: If this message is changed, the matching warning filter in ansible-test must also be updated in `importer.py` for the import sanity test. warnings.warn('One or more Python packages bundled by this ansible-core distribution were already ' 'loaded ({0}). This may result in undefined behavior.'.format(', '.join(sorted(already_loaded_vendored_modules)))) diff --git a/test/lib/ansible_test/_util/target/sanity/import/importer.py b/test/lib/ansible_test/_util/target/sanity/import/importer.py index 4708abf153..c506a9cefb 100644 --- a/test/lib/ansible_test/_util/target/sanity/import/importer.py +++ b/test/lib/ansible_test/_util/target/sanity/import/importer.py @@ -475,12 +475,6 @@ def main(): with warnings.catch_warnings(): warnings.simplefilter('error') - # If vendoring is in use (lib/ansible/_vendor/), then vendored modules may already be loaded after the first file is tested. - # To avoid test failures, the warning about this condition must be ignored. - warnings.filterwarnings( - "ignore", - "One or more Python packages bundled by this ansible-core distribution were already loaded ") - if sys.version_info[0] == 2: warnings.filterwarnings( "ignore", |