Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Oct 30, 2024

Opening as a bug report, also happens when running tox -e py312 locally on macOS:

=================================== FAILURES ===================================
_____________________ test_check_doc_unreleased_version_ok _____________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x1061f9d30>
tmp_path = PosixPath('/private/var/folders/g6/rgtlsw6n123b0gt5483s5_cm0000gn/T/pytest-of-runner/pytest-0/test_check_doc_unreleased_vers2')

    def test_check_doc_unreleased_version_ok(monkeypatch, tmp_path: Path) -> None:
        prepare_fake_docs(
            tmp_path,
            "<div>New in 3.13</div>",
        )
        db = {
            "release": Tag("3.13.0rc1"),
            "git_repo": str(tmp_path),
        }
>       run_release.check_doc_unreleased_version(cast(ReleaseShelf, db))

tests/test_run_release.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
run_release.py:582: in check_doc_unreleased_version
    if not ask_question("Are these `(unreleased)` strings in built docs OK?"):
run_release.py:258: in ask_question
    answer = input("Enter yes or no: ")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.capture.DontReadFromInput object at 0x103ce[45](https://github.com/hugovk/release-tools/actions/runs/11601299635/job/32303698930#step:5:46)60>, size = -1

    def read(self, size: int = -1) -> str:
>       raise OSError(
            "pytest: reading from stdin while output is captured!  Consider using `-s`."
        )
E       OSError: pytest: reading from stdin while output is captured!  Consider using `-s`.

.tox/py/lib/python3.12/site-packages/_pytest/capture.py:205: OSError
----------------------------- Captured stdout call -----------------------------
Checking built docs for '(unreleased)'
Are these `(unreleased)` strings in built docs OK?
Enter yes or no: 
----------------------------- Captured stderr call -----------------------------
tar: Option --to-command=! grep -Hn --label="$TAR_FILENAME" "[(]unreleased[)]" is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help
which tar
/usr/bin/tartar --version
bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8

https://man.freebsd.org/cgi/man.cgi?bsdtar(1) has no mention of --to-command.

However, GNU tar does have --to-command, which is presumably the GNU/Linux one:

https://www.gnu.org/software/tar/manual/html_node/Writing-to-an-External-Program.html

This was added in #164, cc @encukou.

@hugovk hugovk changed the title Test on macOS: tar: Option --to-command=... is not supported Fix for macOS: tar: Option --to-command=... is not supported Nov 15, 2024
@hugovk hugovk marked this pull request as ready for review November 18, 2024 14:02
Copy link
Collaborator

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hugovk hugovk merged commit 70dcb5e into python:master Nov 29, 2024
10 checks passed
@hugovk hugovk deleted the test-macos branch November 29, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants