python / python/typeshed

Distribute stdlib types as types-stdlib

オープン
#5,835 コメント 10 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

project: policy
主要言語
Python
スター
5.1k
フォーク
2.1k
平均マージ
1日 19時間
マージ済み PR(30日)
82

説明

This has been briefly discussed before, but I think it would be a good idea if we started distributing the stdlib types in a separate package types-stdlib, similar to third-party packages:

  • Type checkers could optionally depend on (a specific version of) that package, instead of shipping their own copy, reducing coupling and arguably improving maintainability.
  • Third-party stubs could require a minimum version of the types-stdlib package, for example if they are relying on _typeshed features or for cases like #5762. Type checkers that opt to distribute a copy of the stdlib, could warn if incompatible stubs are used.

Technical considerations:

  • The versioning scheme would be similar to third-party stubs, e.g. types-stdlib 3.10.X, where X is incremented automatically. We should probably increment the version number as soon as the first beta is released and we are reasonably sure we have added all new/changed API.
  • The stubs would be installed into a special directory, for example stdlib, or even a non-importable name like types-stdlib (so we'd have stubs stdlib/sys.pyi etc.) so that they are only used by type checkers that support this package and don't interfere.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず issue の議論と、以前にリンクされたコンテキストを確認してください。ファイル、テスト、エントリーポイントが指定されていないためです。実装前に、パッケージレイアウト、バージョニング方式、インストールの動作、互換性に関する期待事項を定義してください。完了には、設計について合意し、stdlib stubs の完全な配布経路を確保することが必要です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。