This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Multiple inheritance of TypedDict is not covered in `test_typing`
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, kj, miss-islington, sobolevn
Priority: normal Keywords: patch

Created on 2022-01-20 15:52 by sobolevn, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30719 merged sobolevn, 2022-01-20 15:53
PR 30770 merged miss-islington, 2022-01-21 21:38
PR 30886 merged kj, 2022-01-25 14:52
Messages (5)
msg411030 - (view) Author: Nikita Sobolev (sobolevn) * (Python triager) Date: 2022-01-20 15:52
Why is this important?
1. Because multiple inheritance of `TypedDict` might not handle `__required_keys__`, or `__optional_keys__`, or `__annotations__` correctly, this is especially important because some classes might be defined as `total=False` and some as `total=True`
2. Some classes might be defined inline as `T = TypedDict('T', ...)`
3. Moreover, we have a special error we have to check: all superclasses must be `TypedDict`s as well (coverage shows that this error is not covered) https://github.com/python/cpython/blob/650720a0cfa1673938e6d1bad53b6c37c9edb47d/Lib/typing.py#L2328-L2331

I will send a PR for this.
msg411190 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2022-01-21 21:38
New changeset 65b88d5e01c845c0cfa3ff61bc8b2faec8f67a57 by Nikita Sobolev in branch 'main':
bpo-46445: Cover multiple inheritance of `TypedDict` in `test_typing` (GH-30719)
https://github.com/python/cpython/commit/65b88d5e01c845c0cfa3ff61bc8b2faec8f67a57
msg411204 - (view) Author: miss-islington (miss-islington) Date: 2022-01-21 22:37
New changeset 46e6aad12958d3b73c5377ec034d056bb1a36d65 by Miss Islington (bot) in branch '3.10':
bpo-46445: Cover multiple inheritance of `TypedDict` in `test_typing` (GH-30719)
https://github.com/python/cpython/commit/46e6aad12958d3b73c5377ec034d056bb1a36d65
msg411241 - (view) Author: Nikita Sobolev (sobolevn) * (Python triager) Date: 2022-01-22 09:38
Thanks for the review and merge! :sparkle:
msg411617 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2022-01-25 15:31
New changeset 9a7d01046723a8a0a10f9a26702c5e39e73d4414 by Ken Jin in branch '3.10':
[3.10] bpo-46445, bpo-46519: Re-import typing.NewType (GH-30886)
https://github.com/python/cpython/commit/9a7d01046723a8a0a10f9a26702c5e39e73d4414
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90603
2022-01-25 15:31:24kjsetmessages: + msg411617
2022-01-25 14:52:19kjsetpull_requests: + pull_request29067
2022-01-22 09:38:36sobolevnsetstatus: open -> closed
resolution: fixed
messages: + msg411241

stage: patch review -> resolved
2022-01-21 22:37:59miss-islingtonsetmessages: + msg411204
2022-01-21 21:38:30miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request28956
2022-01-21 21:38:27gvanrossumsetmessages: + msg411190
2022-01-20 15:53:54sobolevnsetkeywords: + patch
stage: patch review
pull_requests: + pull_request28910
2022-01-20 15:52:36sobolevnsetnosy: + gvanrossum, kj
2022-01-20 15:52:23sobolevncreate