Merge pull request #228 from yihuang/executable

feat: use sys.executable instead of python on PATH
This commit is contained in:
Jeremiah Lowin 2025-04-23 11:14:28 -07:00 committed by GitHub
commit dcbb4902b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,7 @@ import contextlib
import datetime
import os
import shutil
import sys
from collections.abc import AsyncIterator
from pathlib import Path
from typing import (
@ -185,7 +186,7 @@ class PythonStdioTransport(StdioTransport):
args: list[str] | None = None,
env: dict[str, str] | None = None,
cwd: str | None = None,
python_cmd: str = "python",
python_cmd: str = sys.executable,
):
"""
Initialize a Python transport.