Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tarfile cannot handle high UIDs such as 734_380_696 (or at least the test fails) #101334

Closed
Assignees
gpshead
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@gpshead

Description

@gpshead

Runtest_tarfile on a posix system as a user with a high userid such as 734380696 andtest_add_dir_getmember will fail with:

ERROR: test_add_dir_getmember (test.test_tarfile.Bz2UstarReadTest.test_add_dir_getmember)                                    ----------------------------------------------------------------------                                                       Traceback (most recent call last):                                                                                             File "/.../cpython/Lib/test/test_tarfile.py", line 225, in test_add_dir_getmember                          self.add_dir_and_getmember('bar')                                                                                          File "/.../cpython/Lib/test/test_tarfile.py", line 234, in add_dir_and_getmember                           tar.add(name)                                                                                                              File "/.../cpython/Lib/tarfile.py", line 2001, in add                                                      self.addfile(tarinfo)                                                                                                      File "/.../cpython/Lib/tarfile.py", line 2020, in addfile                                                  buf = tarinfo.tobuf(self.format, self.encoding, self.errors)                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                               File "/.../cpython/Lib/tarfile.py", line 823, in tobuf                                                     return self.create_ustar_header(info, encoding, errors)                                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                    File "/.../cpython/Lib/tarfile.py", line 842, in create_ustar_header                                       return self._create_header(info, USTAR_FORMAT, encoding, errors)                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                           File "/.../cpython/Lib/tarfile.py", line 954, in _create_header                                            itn(info.get("uid", 0), 8, format),                                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                         File "/.../cpython/Lib/tarfile.py", line 214, in itn                                                       raise ValueError("overflow in number field")                                                                             ValueError: overflow in number field

Linked PRs

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp