Title: dataclasses: no need for OrderedDict now that dict guarantees to keep insertion order
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.smith Nosy List: eric.smith
Priority: normal Keywords: patch

Created on 2018-01-06 22:23 by eric.smith, last changed 2018-03-21 09:24 by eric.smith. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5130 closed eric.smith, 2018-01-07 16:31
PR 5131 merged eric.smith, 2018-01-07 16:34
Messages (2)
msg309587 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2018-01-06 22:23
There are several places where OrderedDict escapes from dataclasses. Switching to dict means we don't have to use OrderedDict forever.

For the 3.6 backport, I'm also going to use dict. I saw an analysis (from Raymond, maybe?) that says there are no 3.6 implementations that don't guarantee insertion order for dict.
msg309634 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2018-01-07 19:30
New changeset d13889214a4c81b78fa8683d35bdbd17ff22f4fe by Eric V. Smith in branch 'master':
bpo-32506: Change dataclasses from OrderedDict to plain dict. (gh-5131)
Date User Action Args
2018-03-21 09:24:43eric.smithsetstatus: open -> closed
dependencies: - Dict order is now guaranteed, so add tests and doc for it
resolution: fixed
stage: patch review -> resolved
2018-01-07 19:30:19eric.smithsetmessages: + msg309634
2018-01-07 16:34:15eric.smithsetpull_requests: + pull_request4992
2018-01-07 16:31:27eric.smithsetkeywords: + patch
stage: patch review
pull_requests: + pull_request4991
2018-01-07 07:47:40serhiy.storchakasetdependencies: + Dict order is now guaranteed, so add tests and doc for it
components: + Library (Lib)
2018-01-06 22:23:30eric.smithcreate