python / python/mypy_extensions

`test_py36_class_syntax_usage` fails on py 3.14.0a6

オープン
#65 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る

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

主要言語
Python
スター
155
フォーク
39
平均マージ
7時間 36分
マージ済み PR(30日)
1

説明

=================================== FAILURES ===================================
_________________ TypedDictTests.test_py36_class_syntax_usage __________________

self = <testextensions.TypedDictTests testMethod=test_py36_class_syntax_usage>

    def test_py36_class_syntax_usage(self):
        self.assertEqual(LabelPoint2D.__name__, 'LabelPoint2D')  # noqa
        self.assertEqual(LabelPoint2D.__module__, __name__)  # noqa
>       self.assertEqual(LabelPoint2D.__annotations__, {'x': int, 'y': int, 'label': str})  # noqa
E       AssertionError: {'label': <class 'str'>} != {'x': <class 'int'>, 'y': <class 'int'>, 'label': <class 'str'>}
E       - {'label': <class 'str'>}
E       + {'label': <class 'str'>, 'x': <class 'int'>, 'y': <class 'int'>}

tests/testextensions.py:105: AssertionError
=========================== short test summary info ============================
FAILED tests/testextensions.py::TypedDictTests::test_py36_class_syntax_usage - AssertionError: {'label': <class 'str'>} != {'x': <class 'int'>, 'y': <clas...
========================= 1 failed, 11 passed in 0.08s =========================

Found while building both mypy-extensions 1.0.0 and 1.1.0 on NixOS.
Building against python 3.14.0a6. Python 3.14 is expected to release 2025-10-07, so there is still time to fix this.
I understand python 3.14 is currently an alpha, but it imo it makes sense to report these things as early as they are found.

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

調査の方向性

まず、Python 3.14.0a6 で tests/testextensions.py の失敗を再現し、TypedDictTests.test_py36_class_syntax_usage と、レポートに示されている LabelPoint2D のアノテーションに注目します。観測されたアノテーションをテストで期待されるマッピングと比較し、他の 11 個のテストを壊さずにテストがパスすることを確認します。

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

評価

技術スタック
python
領域
testing
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

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

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