-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_unicodedata: test_normalization() fails randomly with IncompleteRead on PPC64LE Fedora buildbots #99892
Comments
Local patch to trigger the bug: diff --git a/Lib/http/client.py b/Lib/http/client.py
index 15c5cf634c..08a0c3b39a 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -561,6 +561,7 @@ def _get_chunk_left(self):
if chunk_left is not None:
# We are at the end of chunk, discard chunk end
self._safe_read(2) # toss the CRLF at the end of the chunk
+ raise IncompleteRead(b'')
try:
chunk_left = self._read_next_chunk_size()
except ValueError:
@@ -632,8 +633,7 @@ def _safe_readinto(self, b):
"""Same as _safe_read, but for reading into a buffer."""
amt = len(b)
n = self.fp.readinto(b)
- if n < amt:
- raise IncompleteRead(bytes(b[:n]), amt-n)
+ raise IncompleteRead(bytes(b[:n]), amt-n)
return n
def read1(self, n=-1):
@@ -687,8 +687,7 @@ def _read1_chunked(self, n):
n = chunk_left # if n is negative or larger than chunk_left
read = self.fp.read1(n)
self.chunk_left -= len(read)
- if not read:
- raise IncompleteRead(b"")
+ raise IncompleteRead(b"")
return read
def _peek_chunked(self, n): Command to reproduce the bug using the patch:
|
Skip test_normalization() of test_unicodedata if it fails to download NormalizationTest.txt file from pythontest.net.
…onGH-100011) Skip test_normalization() of test_unicodedata if it fails to download NormalizationTest.txt file from pythontest.net. (cherry picked from commit 2488c1e) Co-authored-by: Victor Stinner <vstinner@python.org>
…onGH-100011) Skip test_normalization() of test_unicodedata if it fails to download NormalizationTest.txt file from pythontest.net. (cherry picked from commit 2488c1e) Co-authored-by: Victor Stinner <vstinner@python.org>
I've started wondering lately if we'd be better served to migrate those test files into the repository. |
How many files are we talking about? NormalizationTest.txt takes 2.6 MB. My notes on these files: https://pythondev.readthedocs.io/infra.html#services-used-by-unit-tests Another example: Lib/test/test_codecmaps_cn.py downloads http://www.pythontest.net/unicode/EUC-CN.TXT which takes 104 KB. |
Files containing
I don't know who manages http://www.pythontest.net/unicode/ nor how it is updated to a new Unicode version.
|
Issue fixed by: 2488c1e Please open a new issue if you want to include these Unicode TXT files directly into Python Git repository. |
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
Linked PRs
The text was updated successfully, but these errors were encountered: