Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let close_fds be True on all platforms #1753

Merged
merged 1 commit into from
Dec 1, 2023

Commits on Dec 1, 2023

  1. Let close_fds be True on all platforms

    Since Python 3.7, subprocess.Popen supports close_fds=True on all
    platforms, including Windows, and it is the default, including
    when arguments for standard streams have non-None values passed.
    3.7 is the lowest version of Python that GitPython supports. So
    this omits the close_fds=True argument from the calls where it was
    present. This has the same effect (in 3.7 and higher) as passing
    close_fds=True.
    
    When the the close_fd argument was added to the Popen call in
    git.cmd.Git.execute in 1ee2afb, Python 2 was still supported. In
    Python 2, close_fds defaulted to False. This appears to be the
    reason it had been passed explicitly. It was conditioned on being
    on a Unix-like system because having it True on Windows would
    prevent stdin, stdout, or stderr redirection.
    EliahKagan committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    78d63d9 View commit details
    Browse the repository at this point in the history