From 40c39c27e6db080e7128f0897aafec8fc7eb93a9 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Wed, 6 Sep 2023 19:22:04 +0100 Subject: [PATCH] Fix TestMisc.test_itms_services() on Python 3.12 E -cache key itms-services:?action=download-manifest&url=http://www.example.com/ E -real url itms-services:?action=download-manifest&url=http://www.example.com/ E +cache key itms-services://?action=download-manifest&url=http://www.example.com/ E +real url itms-services://?action=download-manifest&url=http://www.example.com/ E valid gh-104139: Teach urllib.parse.unsplit() to retain the "//" when assembling itms-services://?action=generate-bugs style Apple Platform Deployment [2] URLs. [1] [1] https://docs.python.org/3.12/whatsnew/changelog.html [2] "Distribute proprietary in-house apps to Apple devices": https://support.apple.com/en-gb/guide/deployment/depce7cefc4d/web --- tests/checker/test_misc.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/checker/test_misc.py b/tests/checker/test_misc.py index 1fe62d0b..f69e0a47 100644 --- a/tests/checker/test_misc.py +++ b/tests/checker/test_misc.py @@ -16,6 +16,8 @@ """ Test miscellaneous html tag parsing and URL types """ +import sys + from tests import need_network from . import LinkCheckTest @@ -41,7 +43,11 @@ class TestMisc(LinkCheckTest): @need_network def test_itms_services(self): - url = "itms-services:?action=download-manifest&url=http://www.example.com/" + if sys.version_info < (3, 12): + url = "itms-services:?action=download-manifest&url=http://www.example.com/" + else: + url = \ + "itms-services://?action=download-manifest&url=http://www.example.com/" resultlines = [ "url %s" % url, "cache key %s" % url,