GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Standardize Windows proxy bypass (ProxyOverride) parsing to support wildcards and CIDR · Issue #149136 · python/cpython Closed as duplicate Closed as duplicate Copy link Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement DescriptionBug reportBug description:Summary:Currently, urllib.request.getproxies_registry on Windows does not fully support the patterns defined in the Windows Registry key ProxyOverride. While modern browsers (Chrome/Edge) and Windows system components interpret wildcard patterns (e.g., 10.0.*) and CIDR notations, Python's urllib fails to match these when they are imported into the no_proxy list. This leads to inconsistent behavior where a script goes through a proxy even if the system settings explicitly dictate a bypass for that network. The Problem:
Minimal Reproducible Example:
import urllib.request # Simulate registry lookup (current behavior) # In reality, this is called internally by urllib.request.getproxies() proxies = urllib.request.getproxies() print(f"Detected NO_PROXY: {proxies.get('no')}") # Attempt to bypass 10.0.0.1 url = "http://10.0.0.1" should_bypass = urllib.request.proxy_bypass("10.0.0.1") print(f"Should bypass {url}? {should_bypass}") Expected: True (to match browser behavior) Proposed Solution:Enhance getproxies_registry in Lib/urllib/request.py to pre-process ProxyOverride items:
CPython versions tested on:CPython main branch Operating systems tested on:Windows Activity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |