mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
("Forward-port" of r46506)
Remove various dependencies on dictionary order in the standard library tests, and one (clearly an oversight, potentially critical) in the standard library itself - base64.py. Remaining open issues: * test_extcall is an output test, messy to make robust * tarfile.py has a potential bug here, but I'm not familiar enough with this code. Filed in as SF bug #1496501. * urllib2.HTTPPasswordMgr() returns a random result if there is more than one matching root path. I'm asking python-dev for clarification...
This commit is contained in:
parent
e9eeab5c05
commit
a3f092751a
8 changed files with 24 additions and 16 deletions
|
|
@ -611,8 +611,10 @@ def _set_attrs(self, attrs):
|
|||
else:
|
||||
setattr(self, attr, None)
|
||||
if attrs:
|
||||
attrs = attrs.keys()
|
||||
attrs.sort()
|
||||
raise OptionError(
|
||||
"invalid keyword arguments: %s" % ", ".join(attrs.keys()),
|
||||
"invalid keyword arguments: %s" % ", ".join(attrs),
|
||||
self)
|
||||
|
||||
|
||||
|
|
@ -1661,6 +1663,7 @@ def _match_abbrev(s, wordmap):
|
|||
raise BadOptionError(s)
|
||||
else:
|
||||
# More than one possible completion: ambiguous prefix.
|
||||
possibilities.sort()
|
||||
raise AmbiguousOptionError(s, possibilities)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue