Python tools on TSP 0.x: minor bumps can break. Pin them.
Open source tool authors: spec lives in pylance-release. Verify your semver.
Source: github.com/microsoft/pylance-release/blob/main/do…
Which Python tool should adopt TSP first?
#Python #DevTools
1 like
@neerajjj6785 Training data is the moat. A new language starts with zero GitHub history, so the model meant to write it would be worst at it. The move is one layer down: Microsoft just published Type Server Protocol so coding agents can ask a type checker directly. github.com/microsoft/pylance-release/blob/main/do…
11 views
Pythonの型解析結果を問い合わせるため、MicrosoftはLSP形式を流用したJSON-RPCのTSPを定義した。9メッセージで型やimport解決を返し、古いスナップショット指定は-32802で弾く。v0.4.1では読み取り専用の追加IPC接続で型クエリを並行処理できる / Type Server Protocol
github.com/microsoft/pylance-release/blob/main/do…
1 like · 107 views
Type Server Protocol
View Article | Discussion + AI Summary
Summary of HN discussion 🧵👇
1 like
型サーバープロトコル
github.com/microsoft/pylance-release/blob/main/do…
要約:Type Server Protocol(TSP)は、Pythonの型解析情報を取得するためのJSON-RPC通信規約。型推論・宣言型・期待型の照会、インポート解決、解析状態の管理に対応する。LSPとの連携や複数接続による並列処理もサポートする。
1 like · 84 views
Pylanceが持つ型情報を、外部ツールから引ける仕様が公開されてた(HN 154pt)。型を使いたいツールごとに解析器を抱えずに済む方向なので、エディタ外の解析やAIエージェント向けの道具を作る人には地味に気になる話。
github.com/microsoft/pylance-release/blob/main/do…
> why this exists
docs.basedpyright.com
> The "type server protocol" is a desperate attempt from microsoft to prevent pylance from becoming obsolete by outsourcing its type checking to other language servers like basedpyright, ty or pyrefly -- while continuing to keep certain language server features exclusive to pylance.
> This protocol benefits nobody except microsoft. It adds needless complexity to any language server that chooses to support it. Basedpyright does not support it and strongly advises other language servers to avoid supporting it as well.
> For more info see here pylance-release#7180 and here ty#1190
Type Server Protocol
1 point · 1 comment
Microsoft extends LSP for Python types
Microsoft released the Type Server Protocol (TSP), a JSON-RPC protocol for Python type analysis, extending LSP conventions.
5 likes
DetachHead (maintainer of basedpyright) has criticized the TSP before:
- docs.basedpyright.com
- pylance-release#7180
Ty (the type checker maintained by astral) however will apparently support the TSP: ruff#23432
Mentions
Python tools on TSP 0.x: minor bumps can break. Pin them. Open source tool authors: spec lives in pylance-release. Verify your semver. Source: github.com/microsoft/pylance-release/blob/main/do… Which Python tool should adopt TSP first? #Python #DevTools
@neerajjj6785 Training data is the moat. A new language starts with zero GitHub history, so the model meant to write it would be worst at it. The move is one layer down: Microsoft just published Type Server Protocol so coding agents can ask a type checker directly. github.com/microsoft/pylance-release/blob/main/do…
Pythonの型解析結果を問い合わせるため、MicrosoftはLSP形式を流用したJSON-RPCのTSPを定義した。9メッセージで型やimport解決を返し、古いスナップショット指定は-32802で弾く。v0.4.1では読み取り専用の追加IPC接続で型クエリを並行処理できる / Type Server Protocol github.com/microsoft/pylance-release/blob/main/do…
Type Server Protocol View Article | Discussion + AI Summary Summary of HN discussion 🧵👇
型サーバープロトコル github.com/microsoft/pylance-release/blob/main/do… 要約:Type Server Protocol(TSP)は、Pythonの型解析情報を取得するためのJSON-RPC通信規約。型推論・宣言型・期待型の照会、インポート解決、解析状態の管理に対応する。LSPとの連携や複数接続による並列処理もサポートする。
Pylanceが持つ型情報を、外部ツールから引ける仕様が公開されてた(HN 154pt)。型を使いたいツールごとに解析器を抱えずに済む方向なので、エディタ外の解析やAIエージェント向けの道具を作る人には地味に気になる話。 github.com/microsoft/pylance-release/blob/main/do…
> why this exists docs.basedpyright.com > The "type server protocol" is a desperate attempt from microsoft to prevent pylance from becoming obsolete by outsourcing its type checking to other language servers like basedpyright, ty or pyrefly -- while continuing to keep certain language server features exclusive to pylance. > This protocol benefits nobody except microsoft. It adds needless complexity to any language server that chooses to support it. Basedpyright does not support it and strongly advises other language servers to avoid supporting it as well. > For more info see here pylance-release#7180 and here ty#1190
Type Server Protocol
Microsoft extends LSP for Python types Microsoft released the Type Server Protocol (TSP), a JSON-RPC protocol for Python type analysis, extending LSP conventions.
DetachHead (maintainer of basedpyright) has criticized the TSP before: - docs.basedpyright.com - pylance-release#7180 Ty (the type checker maintained by astral) however will apparently support the TSP: ruff#23432