This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Oren Milman, rhettinger, serhiy.storchaka
Date 2017-09-15.18:53:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Oh, I was aware of this issue for long time, but didn't have good opportunity for fixing it. And yes, making PyMapping_Items() (and friends) always returning a list looks like a reasonable option to me. This could fix similar bugs in third-party extensions. In Python 2 PyMapping_Items() is documented as returning a list, but actually it can return an arbitrary type. Authors of extensions could be fooled by the documentation and use concrete list API.

The drawback of this solution is some performance degradation in rare case of items() returning a tuple.
Date User Action Args
2017-09-15 18:53:05serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, Oren Milman
2017-09-15 18:53:05serhiy.storchakasetmessageid: <>
2017-09-15 18:53:05serhiy.storchakalinkissue31486 messages
2017-09-15 18:53:05serhiy.storchakacreate