test_tarfile_vs_tar fail on macOS (again)
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza en Lib/test/test_shutil.py, alrededor de test_tarfile_vs_tar y del comando tar de la línea 1740. Reproduce el fallo en macOS con un tar que no sea de Apple y que aparezca antes en PATH; después, compara el comportamiento de la prueba con /usr/bin/tar. Se considera terminado cuando el autotest funciona con la selección de tar compatible y el caso de regresión está cubierto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- macos, python
- Área
- operating-systems, testing-qa
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100