https://github.com/python/cpython/commit/d4a5b528d93cebecf5393c73c918c37dafa5f6fe commit: d4a5b528d93cebecf5393c73c918c37dafa5f6fe branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: orsenthil <[email protected]> date: 2026-10-28T12:51:30-07:00 summary:
[3.15] gh-56689 test case to cover for windows proxy_bypass misbehaving trailing ; entries on windows. (GH-160841) (#160844) gh-56689 test case to cover for windows proxy_bypass misbehaving trailing ; entries on windows. (GH-160841) gh-56689 test case to cover for windows proxy_bypass misbehaving with trailing ; entries on windows. Issue was fixed in GH-115210 Co-Authored by Claude Code. (cherry picked from commit af4468863128e6d2593335ca522ee151150a692c) Co-authored-by: Senthil Kumaran <[email protected]> files: M Lib/test/test_urllib2.py diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 7efbc81a16096a..3e4fec6e3e8474 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1625,6 +1625,14 @@ def test_winreg_proxy_bypass(self): "expect <local> to bypass intranet address '%s'" % host) + # empty entries (e.g. a trailing ';') must not match every host + for proxy_override in ("www.example.com;", ";", " ; ", + "www.example.com;;*.example.net"): + self.assertFalse(proxy_bypass("www.python.org", proxy_override), + "expected empty entry in %r not to bypass" + % proxy_override) + self.assertTrue(proxy_bypass("www.example.com", "www.example.com;")) + @unittest.skipUnless(sys.platform == 'darwin', "only relevant for OSX") def test_osx_proxy_bypass(self): bypass = { _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
