Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jan 17, 2018

Use the binary.file instead of utf-8.file to avoid issues with
Unix newlines vs Windows newlines.

https://bugs.python.org/issue32248

Use the binary.file instead of utf-8.file to avoid issues with
Unix newlines vs Windows newlines.
@vstinner
Copy link
Member Author

My .gitattributes fix (commit 44a70e9) was not enough.

The test still fails on AMD64 Windows8.1 Non-Debug 3.x for example: http://buildbot.python.org/all/#/builders/12/builds/477

@vstinner
Copy link
Member Author

Hum, AppVeyor failed to download dependencies:

git checkout -qf FETCH_HEAD
PCbuild\build.bat -e
Using "C:\Python36\python.exe" (found as HOST_PYTHON)
Fetching external libraries...
Fetching bzip2-1.0.6...
Fetching sqlite-3.21.0.0...
Fetching xz-5.2.2...
Traceback (most recent call last):
  File "C:\projects\cpython\PCbuild\\get_external.py", line 60, in <module>
    main()
  File "C:\projects\cpython\PCbuild\\get_external.py", line 53, in main
    verbose=args.verbose,
  File "C:\projects\cpython\PCbuild\\get_external.py", line 20, in fetch_zip
    reporthook=reporthook,
  File "C:\Python36\lib\urllib\request.py", line 248, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "C:\Python36\lib\urllib\request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Python36\lib\urllib\request.py", line 532, in open
    response = meth(req, response)
  File "C:\Python36\lib\urllib\request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Python36\lib\urllib\request.py", line 564, in error
    result = self._call_chain(*args)
  File "C:\Python36\lib\urllib\request.py", line 504, in _call_chain
    result = func(*args)
  File "C:\Python36\lib\urllib\request.py", line 756, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "C:\Python36\lib\urllib\request.py", line 532, in open
    response = meth(req, response)
  File "C:\Python36\lib\urllib\request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Python36\lib\urllib\request.py", line 570, in error
    return self._call_chain(*args)
  File "C:\Python36\lib\urllib\request.py", line 504, in _call_chain
    result = func(*args)
  File "C:\Python36\lib\urllib\request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 502: Bad Gateway
Fetching zlib-1.2.11...
Fetching external binaries...
Fetching openssl-bin-1.1.0f...
Fetching tcltk-8.6.6.0...
Traceback (most recent call last):
  File "C:\Python36\lib\http\client.py", line 578, in _readinto_chunked
    chunk_left = self._get_chunk_left()
  File "C:\Python36\lib\http\client.py", line 544, in _get_chunk_left
    self._safe_read(2)  # toss the CRLF at the end of the chunk
  File "C:\Python36\lib\http\client.py", line 614, in _safe_read
    raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(0 bytes read, 2 more expected)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\projects\cpython\PCbuild\\get_external.py", line 60, in <module>
    main()
  File "C:\projects\cpython\PCbuild\\get_external.py", line 53, in main
    verbose=args.verbose,
  File "C:\projects\cpython\PCbuild\\get_external.py", line 20, in fetch_zip
    reporthook=reporthook,
  File "C:\Python36\lib\urllib\request.py", line 277, in urlretrieve
    block = fp.read(bs)
  File "C:\Python36\lib\http\client.py", line 449, in read
    n = self.readinto(b)
  File "C:\Python36\lib\http\client.py", line 483, in readinto
    return self._readinto_chunked(b)
  File "C:\Python36\lib\http\client.py", line 594, in _readinto_chunked
    raise IncompleteRead(bytes(b[0:total_bytes]))
http.client.IncompleteRead: IncompleteRead(3308 bytes read)
Finished.
(... compilation starts but fails later ...)

I scheduled a new AppVeyor build.

@vstinner vstinner merged commit 3a0cf93 into python:master Jan 17, 2018
@vstinner vstinner deleted the importlib_open_binary branch January 17, 2018 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants