diff options
author | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-24 19:16:46 -0500 |
---|---|---|
committer | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-24 19:16:46 -0500 |
commit | 70c8b04b525b7ed4af0689ebf2b2ad540c95ec11 (patch) | |
tree | 2599f0701d555c8f57ee7fc8be7838af8adb5c35 /data/_python3.7.3/proxies.patch | |
parent | 65e6e37fc0426c10c60062a72ea6283a6ec9daa1 (diff) |
Python3.7.3 - Fixed "happy little accidents."
- Terminal font: '{' and '(' look the same.
Really should've gotten it right the first time.
Diffstat (limited to 'data/_python3.7.3/proxies.patch')
-rw-r--r-- | data/_python3.7.3/proxies.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/data/_python3.7.3/proxies.patch b/data/_python3.7.3/proxies.patch new file mode 100644 index 000000000..b4959ace3 --- /dev/null +++ b/data/_python3.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. |