python / python/cpython

Python 3.14 webbrowser regression when launching vscode:// URI on macOS

未关闭
#149,454 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

3.14 3.15 pending stdlib type-bug
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

Bug report

Bug description:

In Python 3.13.13 on macOS 26.3.1, I run __import__("webbrowser").open("vscode://"): it opens Microsoft VS Code
Same machine, in Python 3.14.2, same code: opens Chrome instead

I observe the same behaviour with Python 3.15.0a8

One line test case (using uv):

uv run --no-project --python=3.14 python3 -c '__import__("webbrowser").open("vscode://")'

In my actual use case, the URI is more complex, something like vscode://vscode-remote/ssh-remote+MYDEVBOX.example.com/workspaces/MYPROJECT.code-workspace – but vscode:// is enough to reproduce it

CPython versions tested on:

3.14

Operating systems tested on:

macOS

Linked PRs
  • gh-155859

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 webbrowser.open() 入口点开始,在 macOS 上使用 Python 3.14 和提供的 uv 命令重现该问题。针对 vscode:// URI,将其行为与 Python 3.13 进行比较;当该 URI 启动 VS Code 而不是 Chrome 时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
macos, python
领域
desktop-dev
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。