Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test_unicodedata: test_normalization() fails randomly with IncompleteRead on PPC64LE Fedora buildbots #99892

Closed
@vstinner

Description

@vstinner

For a few weeks, test_unicodedata.test_normalization() fails randomly with IncompleteRead on PPC64LE Fedora buildbots.

IMO the test should be skipped on download error, rather than treating a download error as a test failure.

Example: https://buildbot.python.org/all/#/builders/33/builds/3031

FAIL: test_normalization (test.test_unicodedata.NormalizationTest.test_normalization)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/http/client.py", line 591, in _read_chunked
    value.append(self._safe_read(chunk_left))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/http/client.py", line 632, in _safe_read
    raise IncompleteRead(data, amt-len(data))
http.client.IncompleteRead: IncompleteRead(8113 bytes read, 2337 more expected)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/test/test_unicodedata.py", line 362, in test_normalization
    testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/test/support/__init__.py", line 671, in open_urlresource
    s = f.read()
        ^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/gzip.py", line 295, in read
    return self._buffer.read(size)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/_compression.py", line 118, in readall
    while data := self.read(sys.maxsize):
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/gzip.py", line 500, in read
    buf = self._fp.read(READ_BUFFER_SIZE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/gzip.py", line 90, in read
    return self.file.read(size)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/http/client.py", line 459, in read
    return self._read_chunked(amt)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/http/client.py", line 597, in _read_chunked
    raise IncompleteRead(b''.join(value)) from exc
http.client.IncompleteRead: IncompleteRead(106486 bytes read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/test/test_unicodedata.py", line 368, in test_normalization
    self.fail(f"Could not retrieve {TESTDATAURL}")
AssertionError: Could not retrieve http://www.pythontest.net/unicode/15.0.0/NormalizationTest.txt

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions