[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0ccc0f6c7495be9043300e22d8f38e6d65e8884f by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always return a list (#3840)

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-30 Thread Oren Milman
Change by Oren Milman : -- keywords: +patch pull_requests: +3821 stage: -> patch review ___ Python tracker ___

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-30 Thread Oren Milman
Oren Milman added the comment: (for knowledge preservation's sake) Resolving this issue would also resolve #31486. -- ___ Python tracker

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PySequence_List() is the simplest way in C. I don't know whether we need special error messages now. But for compatibility keep them. -- ___ Python tracker

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-29 Thread Oren Milman
Oren Milman added the comment: I would be happy to write a PR that implements that. However, i am not sure which way is better to construct a list from the return value (an iterable, hopefully) of keys() etc.: - Call PyList_Type() (in each of PyMapping_Keys() etc.) on the

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2016-09-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() can return a list or tuple (because they use PySequence_Fast). But end users of this API often work only with lists and raise an exception if corresponding mapping methods return an instance of