https://github.com/python/cpython/commit/af4468863128e6d2593335ca522ee151150a692c
commit: af4468863128e6d2593335ca522ee151150a692c
branch: main
author: Senthil Kumaran <[email protected]>
committer: orsenthil <[email protected]>
date: 2026-10-28T19:17:25Z
summary:

gh-56689 test case to cover for windows proxy_bypass misbehaving trailing ; 
entries on windows. (#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.

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]

Reply via email to