Eric Snow added the comment:

If I still the following at Lib/test/test_configparser.py:328:

  print(len(cf._proxies), len(list(cf._proxies)), list(cf._proxies))
  print(len(cf._sections), len(list(cf._sections)), list(cf._sections))

I get unexpected results that are a clear indication of a problem:

  9 8 ['DEFAULT', 'Foo Bar', 'Spacey Bar', 'Spacey Bar From The Beginning', 
'Commented Bar', 'Long Line', 'Section\\with$weird%characters[\t', 
'Internationalized Stuff']
  8 7 ['Foo Bar', 'Spacey Bar', 'Spacey Bar From The Beginning', 'Commented 
Bar', 'Long Line', 'Section\\with$weird%characters[\t', 'Internationalized 
Stuff']

Note that OrderedDict.__len__ is just dict.__len__, so the first number (the 
actual length) should be the same as the second number (the number of keys).  
Also note that OrderedDict.keys() is working (even if not exactly correct).  
Between the two observations, this implies that for this one test the keys are 
not only off, but at least one of the keys in the linked list is not in the 
underlying dict.

I'm sure this is consequence of resizing.  At the last point that we resize 
this is the state of the cf._proxies and cf._sections (ignore the trailing 
<NULL> (?)):

  OrderedDict([('DEFAULT', <Section: DEFAULT>), ('Foo Bar', <Section: Foo 
Bar>), ('Spacey Bar', <Section: Spacey Bar>), ('Spacey Bar From The Beginning', 
<Section: Spacey Bar From The Beginning>), ('Commented Bar', <Section: 
Commented Bar>), <NULL>])

  OrderedDict([('Foo Bar', OrderedDict([('foo', ['bar1'])])), ('Spacey Bar', 
OrderedDict([('foo', ['bar2'])])), ('Spacey Bar From The Beginning', 
OrderedDict([('foo', ['bar3']), ('baz', ['qwe'])])), ('Commented Bar', 
OrderedDict([('foo', ['bar4']), ('baz', ['qwe'])])), ('Long Line', 
OrderedDict([('foo', ['this line is much, much longer than my editor', 'likes 
it.'])])), <NULL>])

I haven't had time to analyze this but I'll be taking a closer look in later 
tonight.  I'm not giving up on 3.5. :)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16991>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to