Issue 32506: dataclasses: no need for OrderedDict now that dict guarantees to keep insertion order (original) (raw)

Issue32506

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.

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/76687

classification

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

process

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 2022-04-11 14:58 by admin. 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) https://github.com/python/cpython/commit/d13889214a4c81b78fa8683d35bdbd17ff22f4fe
History
Date User Action Args
2022-04-11 14:58:56 admin set github: 76687
2018-03-21 09:24:43 eric.smith set status: open -> closeddependencies: - Dict order is now guaranteed, so add tests and doc for itresolution: fixedstage: patch review -> resolved
2018-01-07 19:30:19 eric.smith set messages: +
2018-01-07 16:34:15 eric.smith set pull_requests: + <pull%5Frequest4992>
2018-01-07 16:31:27 eric.smith set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest4991>
2018-01-07 07:47:40 serhiy.storchaka set dependencies: + Dict order is now guaranteed, so add tests and doc for itcomponents: + Library (Lib)
2018-01-06 22:23:30 eric.smith create

Supported by The Python Software Foundation,
Powered by Roundup

Copyright © 1990-2022, Python Software Foundation
Legal Statements