Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue21256

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Sort keyword arguments in mock _format_call_signature
Type:behaviorStage:resolved
Components:Versions:Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: michael.foordNosy List: eric.snow, kushal.das, michael.foord, python-dev
Priority:normalKeywords:easy, patch

Created on2014-04-16 16:37 bymichael.foord, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
issue21256.patchkushal.das,2014-04-16 17:04Patch uploaded for the same.review
issue21256_v2.patchkushal.das,2014-04-22 03:30New patch with test and news entry.review
Messages (8)
msg216491 -(view)Author: Michael Foord (michael.foord)*(Python committer)Date: 2014-04-16 16:37
Printing call args produces non-deterministic results, making them more or less useless in doctests.kwargs_string = ', '.join([        '%s=%r' % (key, value) for key, value in kwargs.items()    ])should be:kwargs_string = ', '.join([        '%s=%r' % (key, value) for key, value in sorted(kwargs.items())    ])
msg216501 -(view)Author: Eric Snow (eric.snow)*(Python committer)Date: 2014-04-16 16:57
Ordered kwargs anyone? :)
msg216504 -(view)Author: Kushal Das (kushal.das)*(Python committer)Date: 2014-04-16 17:04
Patch uploaded for the same.
msg216512 -(view)Author: Michael Foord (michael.foord)*(Python committer)Date: 2014-04-16 17:42
Yes to ordered kwargs! I would very much like to be able to order the keyword args in the order they were passed in, information which is currently lost.
msg216537 -(view)Author: Michael Foord (michael.foord)*(Python committer)Date: 2014-04-16 18:11
Needs a test.
msg216981 -(view)Author: Kushal Das (kushal.das)*(Python committer)Date: 2014-04-22 03:30
New patch with test and news entry.
msg216998 -(view)Author: Michael Foord (michael.foord)*(Python committer)Date: 2014-04-22 10:53
I agree with Antoine's review comments. With those changes in place, ok to commit.
msg220085 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-06-09 08:16
New changeset8e05e15901a8 by Kushal Das in branch 'default':Closes#21256: Printout of keyword args in deterministic order in mock calls.http://hg.python.org/cpython/rev/8e05e15901a8
History
DateUserActionArgs
2022-04-11 14:58:02adminsetgithub: 65455
2014-06-09 08:16:18python-devsetstatus: open -> closed

nosy: +python-dev
messages: +msg220085

resolution: fixed
stage: needs patch -> resolved
2014-04-22 10:53:17michael.foordsetmessages: +msg216998
2014-04-22 03:30:20kushal.dassetfiles: +issue21256_v2.patch

messages: +msg216981
2014-04-16 18:11:54michael.foordsetmessages: +msg216537
2014-04-16 17:42:32michael.foordsetmessages: +msg216512
2014-04-16 17:04:23kushal.dassetfiles: +issue21256.patch
keywords: +patch
messages: +msg216504
2014-04-16 16:57:30eric.snowsetnosy: +eric.snow
messages: +msg216501
2014-04-16 16:37:06michael.foordcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp