test_tarfile_vs_tar fail on macOS (again)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Bug report
Bug description:
Python-3.14 on macOS 26.0 (Tahoe) failed a self-test:
test_tarfile_vs_tar (test.test_shutil.TestArchives.test_tarfile_vs_tar) ... tar: unrecognized option '--no-mac-metadata'
Try 'tar --help' or 'tar --usage' for more information.
ERROR
The full detail is:
======================================================================
ERROR: test_tarfile_vs_tar (test.test_shutil.TestArchives.test_tarfile_vs_tar)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/sw/build.build/python314-3.14.0-1/Python-3.14.0/Lib/test/test_shutil.py", line 1752, in test_tarfile_vs_tar
subprocess.check_call(tar_cmd, cwd=root_dir,
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
stdout=subprocess.DEVNULL)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/sw/build.build/python314-3.14.0-1/Python-3.14.0/Lib/subprocess.py", line 419, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['tar', '--no-mac-metadata', '-cf', 'archive2.tar', 'dist']' returned non-zero exit status 64.
----------------------------------------------------------------------
I have another 'tar' ahead of Apple's in my path that does not have the Apple-specific flag features. if I remove the addition of '--no-mac-metadata' (added to resolve #109980) it passes. Or if I hardcode the test to use Apple's at line 1740:
- tar_cmd = ['tar', '-cf', 'archive2.tar', base_dir]
+ tar_cmd = ['/usr/bin/tar', '-cf', 'archive2.tar', base_dir]
it passes. But interestingly, if I hardcode to use Apple's and remove that flag, it still passes.
CPython versions tested on:
3.14
Operating systems tested on:
macOS
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu trong Lib/test/test_shutil.py, tại khu vực quanh test_tarfile_vs_tar và lệnh tar ở dòng 1740. Tái hiện lỗi trên macOS với một tar không phải của Apple đứng trước trong PATH, sau đó so sánh hành vi của bài kiểm thử với /usr/bin/tar. Hoàn tất khi self-test hoạt động với lựa chọn tar được hỗ trợ và trường hợp hồi quy đã được bao phủ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- macos, python
- Lĩnh vực
- operating-systems, testing-qa
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100