[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2021-04-12 Thread Guido van Rossum
Guido van Rossum added the comment: Dominic, thanks so much for the backport! -- ___ Python tracker ___ ___ Python-bugs-list

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2021-04-12 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: I have backported this to typing_extensions in https://github.com/python/typing/pull/778 On Python 3.9.2 and above typing.TypedDict is used, otherwise it's typing_extensions.TypedDict. -- nosy: +domdfcoding

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-12-14 Thread Brandt Bucher
Change by Brandt Bucher : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-12-14 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset dbb00062dc3afb12c41c87564e6faefe60766b01 by Miss Islington (bot) in branch '3.9': bpo-42059: Fix required/optional keys for TypedDict(..., total=False) (GH-22736) (GH-23747)

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-12-12 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +22605 pull_request: https://github.com/python/cpython/pull/23747 ___ Python tracker

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-12-10 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset 67b769f5157c9dad1c7dd6b24e067b9fdab5b35d by Alex Grönholm in branch 'master': bpo-42059: Fix required/optional keys for TypedDict(..., total=False) (GH-22736) https://github.com/python/cpython/commit/67b769f5157c9dad1c7dd6b24e067b9fdab5b35d

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-12-08 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-12-07 Thread Guido van Rossum
Guido van Rossum added the comment: Looking for another reviewer. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-10-17 Thread Guido van Rossum
Guido van Rossum added the comment: Whoops, sorry, didn't see that you already have a PR. I'll review it next week during the core sprint. -- ___ Python tracker ___

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-10-17 Thread Guido van Rossum
Guido van Rossum added the comment: Can you submit a PR to fix this? It looks like you already have a good understanding of the root cause of the problem, so it should be easy to fix. (Be sure to add a unit test.) It can be backported to earlier Python versions that have typing.TypedDict

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-10-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-10-17 Thread Alex Grönholm
Change by Alex Grönholm : -- keywords: +patch pull_requests: +21699 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22736 ___ Python tracker ___

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-10-17 Thread Alex Grönholm
New submission from Alex Grönholm : >>> DummyDict = TypedDict('DummyDict', {'x': int, 'y': str}, total=False) >>> DummyDict.__required_keys__ frozenset({'x', 'y'}) This happens because the TypedDict function does not pass the "total" metaclass argument to _TypedDictMeta() (instead passing