test_tarfile_vs_tar fail on macOS (again)
オープン
まだ誰も着手していません。
OS-mac
tests
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Lib/test/test_shutil.py の test_tarfile_vs_tar 付近と、1740 行目の tar コマンドから始めます。PATH の先頭側にある Apple 製ではない tar を使って macOS で失敗を再現し、その後、/usr/bin/tar を使った場合のテスト動作と比較します。サポートされている tar の選択でセルフテストが動作し、リグレッションケースがカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- macos, python
- 領域
- operating-systems, testing-qa
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100