-
Notifications
You must be signed in to change notification settings - Fork 504
feat: lower minimum Python requirement to 3.10+ #362
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
Conversation
- Updated Python version requirement from 3.11+ to 3.10+ across all platform detectors - Added Python 3.10 to MacOS framework search paths for broader compatibility - Modified version validation logic to accept Python 3.10 or higher - Updated documentation and error messages to reflect new minimum Python version - Changed pyproject.toml requires-python field to ">=3.10" - Updated badges and requirements in README files to show Python 3.10 support
WalkthroughLowered the minimum Python requirement from 3.11+ to 3.10+ across detection, validation messages, recommendations, pyproject metadata, and README badges; expanded Python/uv candidate search paths for Windows/macOS/Linux; simplified some exception handling in platform detectors. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UnityEditor as "Unity Editor"
participant DepMgr as "DependencyManager"
participant Detector as "PlatformDetector (Win/Mac/Linux)"
participant PathSvc as "PathResolverService / ServerInstaller"
note over DepMgr,Detector #E8F5E9: Minimum Python requirement = 3.10+
User->>UnityEditor: open setup
UnityEditor->>DepMgr: check dependencies
DepMgr->>Detector: IsPythonDetected()
Detector->>PathSvc: enumerate candidate paths (3.10..3.14)
PathSvc-->>Detector: candidate list
Detector->>Detector: probe candidates, validate version >= 3.10
alt valid python found
Detector-->>DepMgr: success + path
DepMgr-->>UnityEditor: dependencies ready
else no valid python
Detector-->>DepMgr: no valid python
DepMgr-->>User: show recommendation (install Python 3.10+)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Server/README.md (1)
149-149: Fix inconsistency: Requirements section still states Python 3.11.The badge on Line 4 was updated to Python 3.10+, but this line still requires Python 3.11 or newer. This inconsistency will confuse users.
Apply this diff to align with the new minimum version:
-- **Python:** 3.11 or newer +- **Python:** 3.10 or newer
🧹 Nitpick comments (1)
MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs (1)
71-71: LGTM!Version validation logic and error messaging correctly updated to enforce Python 3.10+ minimum. The version check properly accepts Python 4.x or Python 3.10+.
Consider adding Python 3.10 installation paths to the candidate list (lines 29-43) for completeness:
var candidates = new[] { "python.exe", "python3.exe", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Programs", "Python", "Python313", "python.exe"), Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Programs", "Python", "Python312", "python.exe"), Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Programs", "Python", "Python311", "python.exe"), + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Programs", "Python", "Python310", "python.exe"), Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "Python313", "python.exe"), Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), - "Python312", "python.exe") + "Python312", "python.exe"), + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), + "Python310", "python.exe") };Note: This is optional since PATH resolution will still find Python 3.10 installations, but adding these paths improves detection reliability for users with standard Python 3.10 installations.
Also applies to: 135-138
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
MCPForUnity/UnityMcpServer~/src/uv.lockis excluded by!**/*.lockServer/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (10)
MCPForUnity/Editor/Dependencies/DependencyManager.cs(1 hunks)MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs(2 hunks)MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs(3 hunks)MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs(2 hunks)MCPForUnity/Editor/Setup/SetupWizardWindow.cs(1 hunks)MCPForUnity/UnityMcpServer~/src/pyproject.toml(1 hunks)README-zh.md(2 hunks)README.md(2 hunks)Server/README.md(1 hunks)Server/pyproject.toml(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-10-13T13:27:23.040Z
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 316
File: TestProjects/UnityMCPTests/Assets/Tests/EditMode/Resources.meta:1-8
Timestamp: 2025-10-13T13:27:23.040Z
Learning: UnityMcpBridge is a legacy project kept for backwards compatibility; MCPForUnity is the only active Unity plugin project. GUID collisions between UnityMcpBridge and MCPForUnity are acceptable.
Applied to files:
Server/README.mdREADME-zh.md
📚 Learning: 2025-10-13T13:41:00.086Z
Learnt from: JohanHoltby
Repo: CoplayDev/unity-mcp PR: 309
File: MCPForUnity/Editor/Helpers/ServerInstaller.cs:478-508
Timestamp: 2025-10-13T13:41:00.086Z
Learning: In the MCPForUnityTools feature (MCPForUnity/Editor/Helpers/ServerInstaller.cs), the design intentionally forces users to have only one .py file per MCPForUnityTools folder to keep file tracking simple. Package-style tools (subdirectories with __init__.py) are not supported.
Applied to files:
Server/README.mdMCPForUnity/Editor/Setup/SetupWizardWindow.csREADME-zh.mdMCPForUnity/UnityMcpServer~/src/pyproject.tomlServer/pyproject.toml
📚 Learning: 2025-10-03T22:11:46.002Z
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 301
File: docs/CUSTOM_TOOLS.md:54-62
Timestamp: 2025-10-03T22:11:46.002Z
Learning: In Unity MCP, the `description` parameter in the `mcp_for_unity_tool` decorator is technically optional but should always be included as a best practice. Without it, there's a higher chance that MCP clients will not parse the tool correctly. All Unity MCP tools should include the description in the decorator for compatibility.
Applied to files:
Server/README.mdMCPForUnity/Editor/Setup/SetupWizardWindow.csMCPForUnity/UnityMcpServer~/src/pyproject.tomlServer/pyproject.toml
📚 Learning: 2025-09-04T01:01:11.927Z
Learnt from: dsarno
Repo: CoplayDev/unity-mcp PR: 260
File: UnityMcpBridge/UnityMcpServer~/src/server_version.txt:1-1
Timestamp: 2025-09-04T01:01:11.927Z
Learning: The UnityMcpBridge project is not maintaining changelogs yet, so don't suggest adding changelog entries for version bumps.
Applied to files:
MCPForUnity/UnityMcpServer~/src/pyproject.toml
🧬 Code graph analysis (1)
MCPForUnity/Editor/Dependencies/DependencyManager.cs (3)
MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs (1)
GetPythonInstallUrl(76-79)MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs (1)
GetPythonInstallUrl(79-82)MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs (1)
GetPythonInstallUrl(82-85)
🪛 markdownlint-cli2 (0.18.1)
README.md
11-11: Images should have alternate text (alt text)
(MD045, no-alt-text)
🔇 Additional comments (10)
README-zh.md (1)
10-10: LGTM!Documentation updates are consistent - both the badge and prerequisites section correctly reflect Python 3.10+ as the minimum requirement.
Also applies to: 71-71
MCPForUnity/UnityMcpServer~/src/pyproject.toml (1)
6-6: LGTM!Python version requirement correctly lowered to 3.10+.
README.md (1)
11-11: LGTM!Documentation updates are consistent - both the badge and prerequisites section correctly reflect Python 3.10+ as the minimum requirement.
Also applies to: 83-83
Server/pyproject.toml (1)
6-6: LGTM!Python version requirement correctly lowered to 3.10+.
MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs (1)
65-65: LGTM!Version validation logic and error messaging correctly updated to enforce Python 3.10+ minimum. The version check
major > 3 || (major >= 3 && minor >= 10)properly accepts Python 4.x or Python 3.10+.Note: The AI summary mentions updates to MacOSPlatformDetector.cs (including adding Python 3.10 to framework search paths), but that file was not provided for review. Please verify that MacOSPlatformDetector.cs has been updated consistently with the Linux and Windows detectors.
Also applies to: 147-150
MCPForUnity/Editor/Setup/SetupWizardWindow.cs (1)
123-123: LGTM!Warning message correctly updated to reflect Python 3.10+ minimum requirement.
MCPForUnity/Editor/Dependencies/DependencyManager.cs (1)
129-129: LGTM! Recommendation message correctly updated to Python 3.10+.The change aligns with the PR objective to lower the minimum Python version requirement, and the user-facing message now accurately reflects the new minimum.
MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs (3)
38-39: LGTM! Python 3.10 framework path correctly added.The addition enables detection of Python 3.10 installations on macOS. The descending version order (3.13 → 3.10) ensures the newest available version is found first, which is the optimal behavior.
68-68: LGTM! Error message correctly updated to reference Python 3.10+.The updated error message provides accurate guidance to users and aligns with the new minimum version requirement.
147-150: LGTM! Version validation logic correctly updated.The validation logic correctly accepts Python 4.x or Python 3.10+:
major > 3catches Python 4 and above(major >= 3 && minor >= 10)catches Python 3.10 through 3.xThis accurately enforces the new minimum version requirement of Python 3.10+.
- Added Python 3.10 installation path to LocalApplicationData search locations - Added Python 3.10 and 3.11 paths to ProgramFiles search locations - Expanded Python version compatibility to support older installations while maintaining support for newer versions
- Added Python 3.14 installation paths to Windows and macOS platform detectors - Removed legacy Python 3.9 paths from Windows path detection - Updated Windows installation recommendations to suggest Python 3.10 or higher - Added additional Python framework paths (3.10, 3.11) for macOS UV package manager detection - Extended UV executable path detection to include Python 3.14 locations on both platforms
This reverts commit 6fb99c7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
83-83: Fix markdown list indentation in Prerequisites section.The Python version update to 3.10+ is correct. However, all prerequisites list items (lines 83–96) have inconsistent 2-space indentation before the bullet points. Remove the leading spaces to align with markdown style guidelines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(3 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-10-13T13:27:23.040Z
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 316
File: TestProjects/UnityMCPTests/Assets/Tests/EditMode/Resources.meta:1-8
Timestamp: 2025-10-13T13:27:23.040Z
Learning: UnityMcpBridge is a legacy project kept for backwards compatibility; MCPForUnity is the only active Unity plugin project. GUID collisions between UnityMcpBridge and MCPForUnity are acceptable.
Applied to files:
README.md
📚 Learning: 2025-10-03T22:11:46.002Z
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 301
File: docs/CUSTOM_TOOLS.md:54-62
Timestamp: 2025-10-03T22:11:46.002Z
Learning: In Unity MCP, the `description` parameter in the `mcp_for_unity_tool` decorator is technically optional but should always be included as a best practice. Without it, there's a higher chance that MCP clients will not parse the tool correctly. All Unity MCP tools should include the description in the decorator for compatibility.
Applied to files:
README.md
📚 Learning: 2025-10-13T13:41:00.086Z
Learnt from: JohanHoltby
Repo: CoplayDev/unity-mcp PR: 309
File: MCPForUnity/Editor/Helpers/ServerInstaller.cs:478-508
Timestamp: 2025-10-13T13:41:00.086Z
Learning: In the MCPForUnityTools feature (MCPForUnity/Editor/Helpers/ServerInstaller.cs), the design intentionally forces users to have only one .py file per MCPForUnityTools folder to keep file tracking simple. Package-style tools (subdirectories with __init__.py) are not supported.
Applied to files:
README.md
📚 Learning: 2025-09-03T16:00:55.839Z
Learnt from: dsarno
Repo: CoplayDev/unity-mcp PR: 0
File: :0-0
Timestamp: 2025-09-03T16:00:55.839Z
Learning: ComponentResolver in UnityMcpBridge/Editor/Tools/ManageGameObject.cs is a nested static class within ManageGameObject, not a sibling type. The `using static MCPForUnity.Editor.Tools.ManageGameObject;` import is required to access ComponentResolver methods directly without the outer class qualifier.
Applied to files:
README.md
🪛 markdownlint-cli2 (0.18.1)
README.md
83-83: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
🔇 Additional comments (2)
README.md (2)
11-11: Python badge correctly updated to reflect new 3.10+ minimum.The badge now accurately communicates the supported Python version range, aligning with the PR's objective.
21-21: Image syntax update improves consistency.Converting to HTML img tag aligns with line 1's format and provides explicit width/height control. This is a reasonable stylistic improvement.
Closes #358
Summary by CodeRabbit
Chores
New Features
Bug Fixes