diff options
author | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-13 03:27:51 +0000 |
---|---|---|
committer | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-23 21:17:34 -0500 |
commit | 5d97cc332c648ce10287f6d46cb69b49660259de (patch) | |
tree | 9b4b521d6c1874c07cfc00804ccf29c99f027320 /data/_python-3.7.3/proxies.patch | |
parent | fb7fdb15e6073390c7f78240fdec92047924c240 (diff) |
Added python 3.
Diffstat (limited to 'data/_python-3.7.3/proxies.patch')
-rw-r--r-- | data/_python-3.7.3/proxies.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/data/_python-3.7.3/proxies.patch b/data/_python-3.7.3/proxies.patch new file mode 100644 index 000000000..b4959ace3 --- /dev/null +++ b/data/_python-3.7.3/proxies.patch @@ -0,0 +1,44 @@ +--- Python-3.7.3/Lib/urllib/request.py 2019-03-25 20:21:05.000000000 +0000 ++++ Python-3.7.3+iPhone/Lib/urllib/request.py 2019-04-12 18:43:13.605127939 +0000 +@@ -2580,21 +2580,28 @@ + + + if sys.platform == 'darwin': +- from _scproxy import _get_proxy_settings, _get_proxies +- +- def proxy_bypass_macosx_sysconf(host): +- proxy_settings = _get_proxy_settings() +- return _proxy_bypass_macosx_sysconf(host, proxy_settings) +- +- def getproxies_macosx_sysconf(): +- """Return a dictionary of scheme -> proxy server URL mappings. +- +- This function uses the MacOSX framework SystemConfiguration +- to fetch the proxy information. +- """ +- return _get_proxies() ++ try: ++ from _scproxy import _get_proxy_settings, _get_proxies + ++ def proxy_bypass_macosx_sysconf(host): ++ proxy_settings = _get_proxy_settings() ++ return _proxy_bypass_macosx_sysconf(host, proxy_settings) ++ ++ def getproxies_macosx_sysconf(): ++ """Return a dictionary of scheme -> proxy server URL mappings. ++ ++ This function uses the MacOSX framework SystemConfiguration ++ to fetch the proxy information. ++ """ ++ return _get_proxies() ++ ++ except ModuleNotFoundError: ++ # iOS fix: ++ def proxy_bypass_macosx_sysconf(host): ++ return False + ++ def getproxies_macosx_sysconf(): ++ return {} + + def proxy_bypass(host): + """Return True, if host should be bypassed. |