Repository navigation
feat(python): 启用包内后端和动态解释器发现 - #3
Merged
Merged
Conversation
1 task done
16 of 17 tasks
…discovery feat(python): discover pytest cases with a build command
Mucheen
marked this pull request as ready for review
November 19, 2026 14:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue / Linked issue
PR 类型 / Type
改动 / Changes
toolchainProviders0,从 Conda 环境登记和安装元数据、uv、pyenv、Poetry、Pipenv 收集解释器候选。按工作区最近来源提供版本声明并声明观察路径。同一目录下同时有.python-version与pyproject.toml时,选定版本必须满足项目兼容范围。Pipfile路径匹配,且须满足同目录的requires-python,避免覆盖兼容候选。toolchainProviders0 的桌面宿主。按发布规则,较 v0.1.1 增加必需宿主能力属于不兼容升级,候选版本为 v1.0.0。当前发布脚本按预发布配置,等待兼容的正式宿主。未创建标签或发布。插件契约和权限
schemaVersion0、pluginAPIVersion0;SDK 固定 Core509c2beed1b23b4d3fd1d6649a4e252982e34db2。新增toolchains.provide用于宿主发起解释器事实查询。backend.launch启动包内后端,languageServer.launch启动 Pyrefly,process.build运行构建和测试,debug.launch/debug.attach启动和连接调试器,project.generate运行项目生成器。main的历史中。当前端到端测试固定同时支持toolchainProviders0 和buildSystems1 的候选。日志和只读边界
plugins/io.github.lithe-idea.python-support/host。Pyrefly 启动解析成功记录 INFO,invalid_tool_hint降级和tool_hint_restored恢复记录 WARN,真实失败通过稳定 SDK 代码记录。解释器元数据高频成功抑制 INFO,失败经python.invalidExecutable或python.environmentUnavailable上报。toolchains/query通过结构化plugin.toolchain.*错误保留取消、失败与边界类别。固定 SDK 未给该高频操作开放主动诊断入口,失败由宿主记录,成功无额外 INFO。取消路径不发失败事件。README.md。构建缓存和 debugpy 原生日志使用宿主提供的可写目录,Rust 后端不写磁盘。端到端断言覆盖已解包插件全文件 SHA-256。本地验证
node scripts/test.mjs。包含 SDK 脱敏、包内自举、版本约束、pytest 精确选择、debugpy 和只读哈希。f5cc2b7校验四个本地归档。Rust 1.87 规则测试、Clippy、rustfmt、actionlint 与差异检查通过。docs/feature-matrix.md。最终平台覆盖按实际运行结果更新。候选宿主联调
Python #4 已合入本 PR 分支。pytest 使用宿主的命令式测试发现,继续复用解释器发现及精确运行能力。
已同步插件
main的32d134f。宿主 pin 更新到 桌面 #2193 的46035f0,包含已合入的 #2192,固定 Core7ca5134。测试夹具为构建模型、发现和精确测试传入信任状态,保留项目内解释器的不信任验证。macOS ARM64 重新构建的 ZIP 通过 12 项原生插件测试、3 项归档检查和 2 项 Rust 测试,并通过 Rustfmt、Clippy 与 actionlint。Pipenv 命名和不兼容版本各有修复前失败、修复后通过的回归。
在固定的候选宿主上使用同一个 ZIP,
node scripts/e2e-host.mjs两项通过。项目生成 1.51 秒,工作台联验 9.05 秒,覆盖真实安装、解释器切换、全局发现、项目环境信任、pytest 精确执行、debugpy、日志和包哈希。Windows 桌面原生交互仍待验收。最终提交的六平台归档、Store 和原生插件命令检查见 CI。
v1.0.0 先保持预发布配置。发布及 Store 收录等待包含工具链提供者的兼容正式宿主和维护者审批。