Staging
v0.8.1
v0.8.1
https://github.com/python/cpython
Revision c8e107607d8a2c9a149cf6a706d508a556729892 authored by Miss Islington (bot) on 27 May 2020, 10:29:25 UTC, committed by GitHub on 27 May 2020, 10:29:25 UTC
Reason: the link `ftp://invisible-island.net/ncurses//5.9/ncurses-5.9-20120616-patch.sh.bz2` is dead, which prevents `Mac/BuildScript/build-installer.py` from completing. Looks like the host of the FTP server was changed to `ftp.invisible-island.net`, thus this proposal. Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com> (cherry picked from commit 7da46b676aed7111de34b57c8b942a7f3bb80327) Co-authored-by: Oleg Höfling <hoefling@users.noreply.github.com>
1 parent 3f215f3
Tip revision: c8e107607d8a2c9a149cf6a706d508a556729892 authored by Miss Islington (bot) on 27 May 2020, 10:29:25 UTC
Fix the link to ncurses patch download in macos installer build script (GH-20421)
Fix the link to ncurses patch download in macos installer build script (GH-20421)
Tip revision: c8e1076
urlretrieve.py
# Simple Python script to download a file. Used as a fallback
# when other more reliable methods fail.
#
from __future__ import print_function
import sys
try:
from requests import get
except ImportError:
try:
from urllib.request import urlretrieve
USING = "urllib.request.urlretrieve"
except ImportError:
try:
from urllib import urlretrieve
USING = "urllib.retrieve"
except ImportError:
print("Python at", sys.executable, "is not suitable",
"for downloading files.", file=sys.stderr)
sys.exit(2)
else:
USING = "requests.get"
def urlretrieve(url, filename):
r = get(url, stream=True)
r.raise_for_status()
with open(filename, 'wb') as f:
for chunk in r.iter_content(chunk_size=1024):
f.write(chunk)
return filename
if __name__ == '__main__':
if len(sys.argv) != 3:
print("Usage: urlretrieve.py [url] [filename]", file=sys.stderr)
sys.exit(1)
URL = sys.argv[1]
FILENAME = sys.argv[2]
print("Downloading from", URL, "to", FILENAME, "using", USING)
urlretrieve(URL, FILENAME)
Computing file changes ...