]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34320: Fix dict(o) didn't copy order of dict subclass (GH-8624)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 26 Sep 2018 04:17:52 +0000 (21:17 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Sep 2018 04:17:52 +0000 (21:17 -0700)
commit12e3e80241e91df79811f53ff372e28e9371bf9b
treea9d8391541343f04c93aaa3c6bef631976a965ba
parent22a56958e72957e2ee6fb84ac5376c4ba642f4ce
bpo-34320: Fix dict(o) didn't copy order of dict subclass (GH-8624)

When dict subclass overrides order (`__iter__()`, `keys()`, and `items()`), `dict(o)`
should use it instead of dict ordering.

https://bugs.python.org/issue34320
(cherry picked from commit 2aaf98c16ae3070378de523a173e29644037d8bd)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
Lib/test/test_builtin.py
Lib/test/test_call.py
Lib/test/test_dict.py
Misc/NEWS.d/next/Core and Builtins/2018-08-02-22-34-59.bpo-34320.hNshAA.rst [new file with mode: 0644]
Objects/dictobject.c