classification
Title: fix OrderedDict.__init__ docstring to reflect PEP 468
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Mariatta Nosy List: Mariatta, brett.cannon, eric.snow, jonathaneunice, rhettinger, serhiy.storchaka
Priority: normal Keywords:

Created on 2017-06-14 04:46 by jonathaneunice, last changed 2017-09-06 01:13 by Mariatta. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2179 merged jonathaneunice, 2017-06-14 05:01
PR 3370 merged Mariatta, 2017-09-05 23:53
Messages (8)
msg295982 - (view) Author: Jonathan Eunice (jonathaneunice) * Date: 2017-06-14 04:46
In Python 3.6 and current repo (pre-3.7), the docstring for collections.OrderedDict.__init__() stats that keyword argument order is arbitrary. That is untrue if I properly understand PEP 468, which as of Python 3.6 makes the order of kwargs stable / identical to the order seen in the source code.

Associated PR imminent.
msg295987 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-06-14 05:26
Currently there are two implementations of OrderedDict, and Python implementation is not used. Is C implementation need an update? What about the module documentation, is it need an update?

I don't think that we should include such details about past Python versions in docstrings. I can't remember precedences.
msg296039 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-06-14 21:00
Past Python details should not be included in docstrings; it should simply represent the current code.
msg296053 - (view) Author: Jonathan Eunice (jonathaneunice) * Date: 2017-06-15 00:38
PR updated to incorporate Serhiy Storchaka and Brett Cannon feedback.
msg301397 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-09-05 23:23
New changeset faa57cbe7074b26807cd7ed89a7b173b5cbf3086 by Raymond Hettinger (Jonathan Eunice) in branch 'master':
bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179)
https://github.com/python/cpython/commit/faa57cbe7074b26807cd7ed89a7b173b5cbf3086
msg301410 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-09-06 00:08
Mariatta is working on the backport.
msg301426 - (view) Author: Mariatta Wijaya (Mariatta) * (Python committer) Date: 2017-09-06 01:13
New changeset 3b9d4444fe631117430dee8ef8a2f205b4b450d5 by Mariatta in branch '3.6':
[3.6] bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (GH-2179) (GH-3370)
https://github.com/python/cpython/commit/3b9d4444fe631117430dee8ef8a2f205b4b450d5
msg301427 - (view) Author: Mariatta Wijaya (Mariatta) * (Python committer) Date: 2017-09-06 01:13
Backport done.
Thanks all :)
History
Date User Action Args
2017-09-06 01:13:34Mariattasetstatus: open -> closed
resolution: fixed
messages: + msg301427

stage: resolved
2017-09-06 01:13:09Mariattasetmessages: + msg301426
2017-09-06 00:08:49rhettingersetassignee: rhettinger -> Mariatta

messages: + msg301410
nosy: + Mariatta
2017-09-05 23:53:38Mariattasetpull_requests: + pull_request3379
2017-09-05 23:23:52rhettingersetmessages: + msg301397
2017-06-15 00:38:48jonathaneunicesetmessages: + msg296053
2017-06-14 21:00:30brett.cannonsetnosy: + eric.snow, brett.cannon
messages: + msg296039
2017-06-14 05:26:18serhiy.storchakasetmessages: + msg295987
2017-06-14 05:15:24rhettingersetnosy: + serhiy.storchaka
2017-06-14 05:15:13rhettingersetassignee: rhettinger

nosy: + rhettinger
versions: + Python 3.6
2017-06-14 05:01:15jonathaneunicesetpull_requests: + pull_request2232
2017-06-14 04:46:11jonathaneunicecreate