◐ Shell
clean mode source ↗

fix: use correct python command name in test_stdio.py by WOnder93 · Pull Request #1782 · modelcontextprotocol/python-sdk

Motivation and Context

Some platforms (e.g. Fedora) don't provide an unversioned python binary. In such case tests/client/test_stdio.py fails when it tries to call it. Use sys.executable instead, which works reliably.

How Has This Been Tested?

Verified that this makes the test pass on Fedora.

Breaking Changes

No.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context