From dc6b0d48575e0119cdbb0fd7f66c8dd30b414bdb Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 23 Feb 2022 15:59:50 -0800 Subject: [PATCH] ansible-test - Remove obsolete display of MAXFD. Use of ``subprocess.MAXFD`` only worked on Python 2.x, which is no longer supported. --- changelogs/fragments/ansible-test-maxfd.yaml | 2 ++ test/lib/ansible_test/_internal/__init__.py | 2 -- test/lib/ansible_test/_internal/util.py | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/ansible-test-maxfd.yaml diff --git a/changelogs/fragments/ansible-test-maxfd.yaml b/changelogs/fragments/ansible-test-maxfd.yaml new file mode 100644 index 00000000000..c0fd4fcd3ec --- /dev/null +++ b/changelogs/fragments/ansible-test-maxfd.yaml @@ -0,0 +1,2 @@ +minor_changes: + - ansible-test - Remove obsolete ``MAXFD`` display. diff --git a/test/lib/ansible_test/_internal/__init__.py b/test/lib/ansible_test/_internal/__init__.py index 3400d163571..f270ae79beb 100644 --- a/test/lib/ansible_test/_internal/__init__.py +++ b/test/lib/ansible_test/_internal/__init__.py @@ -14,7 +14,6 @@ from .init import ( from .util import ( ApplicationError, display, - MAXFD, ) from .delegation import ( @@ -62,7 +61,6 @@ def main(cli_args=None): # type: (t.Optional[t.List[str]]) -> None configure_timeout(config) display.info('RLIMIT_NOFILE: %s' % (CURRENT_RLIMIT_NOFILE,), verbosity=2) - display.info('MAXFD: %d' % MAXFD, verbosity=2) delegate_args = None target_names = None diff --git a/test/lib/ansible_test/_internal/util.py b/test/lib/ansible_test/_internal/util.py index 58c77f3ede9..3dfc90ee813 100644 --- a/test/lib/ansible_test/_internal/util.py +++ b/test/lib/ansible_test/_internal/util.py @@ -52,12 +52,6 @@ TValue = t.TypeVar('TValue') PYTHON_PATHS = {} # type: t.Dict[str, str] -try: - # noinspection PyUnresolvedReferences - MAXFD = subprocess.MAXFD -except AttributeError: - MAXFD = -1 - COVERAGE_CONFIG_NAME = 'coveragerc' ANSIBLE_TEST_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))