Source: python-urllib3 Version: 1.25.6-2 Severity: serious Tags: ftbfs Justification: fails to build from source
Hi, python-urllib3/experimental FTBFS under LC_ALL=C (which is set by pbuilder) due to a failing test. It works if e.g. LC_ALL=C.UTF-8 is exported from debian/rules. =================================== FAILURES =================================== ______________________ TestResponse.test_io_textiowrapper ______________________ self = <test.test_response.TestResponse object at 0x7f8836078590> def test_io_textiowrapper(self): fp = BytesIO(b"\xc3\xa4\xc3\xb6\xc3\xbc\xc3\x9f") resp = HTTPResponse(fp, preload_content=False) br = TextIOWrapper(resp, encoding="utf8") assert br.read() == u"äöüß" br.close() assert resp.closed # HTTPResponse.read() by default closes the response # https://github.com/urllib3/urllib3/issues/1305 fp = BytesIO( b"\xc3\xa4\xc3\xb6\xc3\xbc\xc3\x9f\n\xce\xb1\xce\xb2\xce\xb3\xce\xb4" ) resp = HTTPResponse(fp, preload_content=False) with pytest.raises(ValueError) as ctx: if six.PY2: # py2's implementation of TextIOWrapper requires `read1` # method which is provided by `BufferedReader` wrapper resp = BufferedReader(resp) list(TextIOWrapper(resp)) > assert str(ctx.value) == "I/O operation on closed file." E assert "'ascii' code...in range(128)" == 'I/O operation on closed file.' E - 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) E + I/O operation on closed file. test/test_response.py:416: AssertionError ======== 1 failed, 466 passed, 8 skipped, 1 deselected in 12.46 seconds ======== Andreas