Skip to content

Conversation

@msanatan
Copy link
Contributor

@msanatan msanatan commented Oct 31, 2025

  • 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

Closes #358

Summary by CodeRabbit

  • Chores

    • Lowered minimum Python requirement from 3.11+ to 3.10+ across the app, project configs, docs, and badges.
  • New Features

    • Broader Python discovery: expanded detection/search for additional Python installations on Windows, macOS, and Linux (including newer 3.x candidates).
  • Bug Fixes

    • Updated dependency warnings and validation messages to reference Python 3.10+ and be clearer for users.

- 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
@msanatan msanatan self-assigned this Oct 31, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 31, 2025

Walkthrough

Lowered 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

Cohort / File(s) Summary
Dependency messages & manager
MCPForUnity/Editor/Dependencies/DependencyManager.cs
Updated displayed Python recommendation text from 3.11+ to 3.10+.
Platform detectors (validation & messages)
MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs, MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs, MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs
Lowered minimum Python version check to 3.10+, updated user-facing error/recommendation text, added/reordered candidate version paths (macOS added 3.14 candidate), and replaced catch (Exception ex) with bare catch in TryValidatePython.
Setup UI
MCPForUnity/Editor/Setup/SetupWizardWindow.cs
Updated dependency warning text to require Python 3.10+.
Server & project metadata
MCPForUnity/UnityMcpServer~/src/pyproject.toml, Server/pyproject.toml
Lowered pyproject Python requirement from >=3.11 to >=3.10.
Path resolution & installer helpers
MCPForUnity/Editor/Helpers/ServerInstaller.cs, MCPForUnity/Editor/Services/PathResolverService.cs
Expanded Python/uv candidate search paths for Windows/macOS/Linux (added 3.10/3.11/3.14 entries, ProgramFiles/LocalAppData variants), removed some older paths, and updated enumerated candidate lists.
Documentation
README.md, README-zh.md, Server/README.md
Updated Python badges and prerequisites text to reference Python 3.10+ (formerly 3.11+/3.12+); README image line adjusted to HTML img tag.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review bare catch replacements in platform detectors (may suppress useful diagnostics).
  • Verify new/ordered Windows ProgramFiles/LocalAppData paths and macOS framework paths for correctness and duplicates.
  • Confirm pyproject.toml changes align with CI/tooling expectations.

Possibly related PRs

Poem

🐰 I hopped through folders, sniffed each path,

Found 3.10 waiting — a gentle math.
Docs and badges wear lighter hue,
Paths expanded, warnings true.
I nibble carrots and say "hop-hooray!"

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The PR contains one out-of-scope change in README.md: the replacement of a Markdown image syntax with an HTML img tag for the MCP UI image. This formatting change is unrelated to the Python version requirement updates. Additionally, the PR adds Python 3.14 detection paths across multiple files (MacOSPlatformDetector.cs, WindowsPlatformDetector.cs, ServerInstaller.cs, and PathResolverService.cs), which extends beyond the stated objective of supporting Python 3.10 to include support for a future Python version not mentioned in the linked issue requirements. Remove the unrelated README.md image tag formatting change (the Markdown to HTML img tag replacement), as it is not part of the Python version requirement update. Consider clarifying whether adding Python 3.14 detection paths is intentional as part of future-proofing the detection mechanisms or if it should be scoped to Python 3.10 specifically as stated in the issue.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat: lower minimum Python requirement to 3.10+" directly and accurately describes the primary change throughout the PR, which is systematically lowering the minimum supported Python version from 3.11+ to 3.10+ across platform detectors, validation logic, configuration files, and documentation. The title is concise, specific, and clearly communicates the main objective to a reviewer scanning the commit history.
Linked Issues Check ✅ Passed The PR successfully addresses the primary coding requirement from issue #358 by enabling the project to run on Python 3.10. All platform detectors (Windows, macOS, Linux) have been updated to accept Python 3.10 as the minimum version, validation logic has been adjusted accordingly, detection paths have been expanded to include Python 3.10 search locations, configuration files have been updated to require >=3.10, and documentation and error messages now reflect the new minimum. While issue #358 also mentions Conda as a potential alternative, the PR fulfills the core technical requirement of supporting Python 3.10, which directly addresses the user's concern about having to install Python 3.11.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8f227ff and f02807d.

⛔ Files ignored due to path filters (2)
  • MCPForUnity/UnityMcpServer~/src/uv.lock is excluded by !**/*.lock
  • Server/uv.lock is 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.md
  • README-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.md
  • MCPForUnity/Editor/Setup/SetupWizardWindow.cs
  • README-zh.md
  • MCPForUnity/UnityMcpServer~/src/pyproject.toml
  • Server/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.md
  • MCPForUnity/Editor/Setup/SetupWizardWindow.cs
  • MCPForUnity/UnityMcpServer~/src/pyproject.toml
  • Server/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 > 3 catches Python 4 and above
  • (major >= 3 && minor >= 10) catches Python 3.10 through 3.x

This 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
@msanatan msanatan merged commit 040eb6d into CoplayDev:main Oct 31, 2025
1 check was pending
@msanatan msanatan deleted the support-python-3-10 branch October 31, 2025 19:44
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7282238 and 64d66e6.

📒 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant