[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2020-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0d1d7c8bae3f9fe9e937d2931dcbbd3555d1a9f1 by Serhiy Storchaka in branch '3.8': bpo-36320: Use the deprecated-removed directive for _field_types (GH-19370) https://github.com/python/cpython/commit/0d1d7c8bae3f9fe9e937d2931dcbbd3555d1a9f1

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2020-04-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 4.0 -> 5.0 pull_requests: +18732 pull_request: https://github.com/python/cpython/pull/19370 ___ Python tracker

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-18 Thread miss-islington
miss-islington added the comment: New changeset f7b57df0c09c3a04ab27ba06eb2feb989bbb16cb by Miss Islington (bot) (Raymond Hettinger) in branch 'master': bpo-36320: Switch typing.NamedTuple from OrderedDict to regular dict (GH-12396)

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-18 Thread Josh Rosenberg
Josh Rosenberg added the comment: Blech. Just remembered _field_types is a *class* attribute, not an instance attribute, so it (just) can't be a plain property on NamedTuple itself. And because NamedTuple is super-weird (AFAICT, class X(typing.NamedTuple): pass defines a class where the

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-18 Thread Josh Rosenberg
Josh Rosenberg added the comment: Would it make sense to convert _field_types to a property, so the method(s) that implement the property can do: warnings.warn("_field_types is deprecated; use __annotations__ instead", DeprecationWarning) to indicate the deprecation programmatically, not

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +12351 stage: -> patch review ___ Python tracker ___ ___

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay, I'll put together a PR and assign it to you :-) -- ___ Python tracker ___ ___

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-17 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Good idea! This should be easy to fix/update, this was initially discussed in https://github.com/python/typing/issues/339. -- ___ Python tracker

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-16 Thread Raymond Hettinger
Change by Raymond Hettinger : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-16 Thread Raymond Hettinger
New submission from Raymond Hettinger : Suggestions: * Deprecate _field_types in favor of __annotations__. * Convert __annotations__ from OrderedDict to a regular dict. This will make the API cleaner. The first one will also remove a difference between NamedTuple and namedtuple(). The second