[PR #43] [MERGED] [python] fix calling python script as subprocess on Windows #629

Open
opened 2026-01-29 20:46:29 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/google/brotli/pull/43
Author: @anthrotype
Created: 3/23/2015
Status: Merged
Merged: 3/23/2015
Merged by: @szabadka

Base: masterHead: fix_py


📝 Commits (1)

  • 1786680 [python] fix calling python script as subprocess on Windows

📊 Changes

2 files changed (+12 additions, -19 deletions)

View changed files

📝 python/tests/compatibility_test.py (+5 -8)
📝 python/tests/roundtrip_test.py (+7 -11)

📄 Description

Hello,
This patch fixes an issue which occurs when calling a python script as a subprocess from within another python script on Windows.
Instead of executing the child script through the shell, I run it with the same sys.executable that was used to run the parent script.
Besides, I'm using subprocess.check_call instead of subprocess.call to halt execution if subprocess exits with non-zero return code.
Cheers,

Cosimo


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/google/brotli/pull/43 **Author:** [@anthrotype](https://github.com/anthrotype) **Created:** 3/23/2015 **Status:** ✅ Merged **Merged:** 3/23/2015 **Merged by:** [@szabadka](https://github.com/szabadka) **Base:** `master` ← **Head:** `fix_py` --- ### 📝 Commits (1) - [`1786680`](https://github.com/google/brotli/commit/17866801d655c530db84839df743f1ee92eb8c68) [python] fix calling python script as subprocess on Windows ### 📊 Changes **2 files changed** (+12 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `python/tests/compatibility_test.py` (+5 -8) 📝 `python/tests/roundtrip_test.py` (+7 -11) </details> ### 📄 Description Hello, This patch fixes an issue which occurs when calling a python script as a subprocess from within another python script on Windows. Instead of executing the child script through the shell, I run it with the same `sys.executable` that was used to run the parent script. Besides, I'm using `subprocess.check_call` instead of `subprocess.call` to halt execution if subprocess exits with non-zero return code. Cheers, Cosimo --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 20:46:29 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#629