From de2bcead78ad982ed54ac78089120b4b1e59b319 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 29 Mar 2023 12:59:35 -0500 Subject: [PATCH] remove unused patch --- allow-python3.11.patch | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 allow-python3.11.patch diff --git a/allow-python3.11.patch b/allow-python3.11.patch deleted file mode 100644 index 69279a5..0000000 --- a/allow-python3.11.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/test/lib/ansible_test/_util/target/common/constants.py b/test/lib/ansible_test/_util/target/common/constants.py -index fdaa9e5..e1136cc 100644 ---- a/test/lib/ansible_test/_util/target/common/constants.py -+++ b/test/lib/ansible_test/_util/target/common/constants.py -@@ -17,4 +17,5 @@ CONTROLLER_PYTHON_VERSIONS = ( - '3.8', - '3.9', - '3.10', -+ '3.11', - ) -diff --git a/test/units/module_utils/urls/test_fetch_url.py b/test/units/module_utils/urls/test_fetch_url.py -index 4869bb0..94f2e1b 100644 ---- a/test/units/module_utils/urls/test_fetch_url.py -+++ b/test/units/module_utils/urls/test_fetch_url.py -@@ -6,6 +6,7 @@ from __future__ import absolute_import, division, print_function - __metaclass__ = type - - import socket -+import sys - - from ansible.module_utils.six import StringIO - from ansible.module_utils.six.moves.http_cookiejar import Cookie -@@ -133,9 +134,16 @@ def test_fetch_url_cookies(mocker, fake_ansible_module): - r, info = fetch_url(fake_ansible_module, 'http://ansible.com/') - - assert info['cookies'] == {'Baz': 'qux', 'Foo': 'bar'} -- # Python sorts cookies in order of most specific (ie. longest) path first -- # items with the same path are reversed from response order -- assert info['cookies_string'] == 'Baz=qux; Foo=bar' -+ -+ if sys.version_info < (3, 11): -+ # Python sorts cookies in order of most specific (ie. longest) path first -+ # items with the same path are reversed from response order -+ assert info['cookies_string'] == 'Baz=qux; Foo=bar' -+ else: -+ # Python 3.11 and later preserve the Set-Cookie order. -+ # See: https://github.com/python/cpython/pull/22745/ -+ assert info['cookies_string'] == 'Foo=bar; Baz=qux' -+ - # The key here has a `-` as opposed to what we see in the `uri` module that converts to `_` - # Note: this is response order, which differs from cookies_string - assert info['set-cookie'] == 'Foo=bar, Baz=qux'