-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
test_tarfile fails on 32 bit systems in NoneInfoExtractTests_Data #107811
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
Comments
What OS is this? I tried on 32-bit Debian but could not reproduce. Looks like the tests uncovered a real issue on systems with a small |
It's Yocto's poky using qemu x86 target. I can run local tests to help diagnose this if needed. |
Can you try out this patch? diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index d62323715b4..5ef2394ad3a 100755
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -2557,7 +2557,8 @@ def chown(self, tarinfo, targetpath, numeric_owner):
os.lchown(targetpath, u, g)
else:
os.chown(targetpath, u, g)
- except OSError as e:
+ except (OSError, OverflowError) as e:
+ # OverflowError can be raised if an ID doesn't fit in `id_t`
raise ExtractError("could not change owner") from e
def chmod(self, tarinfo, targetpath):
|
With the patch the test is passing:
|
Merged. Thanks for the report and testing! |
No problem. I'll do a local backport. |
These tests are newly added, and they produce the following fails on 32 bit x86 systems (running python 3.11.4):
I believe the file they are tripping over is:
Linked PRs
The text was updated successfully, but these errors were encountered: