DOC: emphasize the need to always call PySequence_Fast#11140
Conversation
|
Is not this a PyPy issue that |
Sorry, something went wrong.
|
The functions work for |
Sorry, something went wrong.
|
@serhiy-storchaka: I think the point is that requiring those functions to work on lists and tuples puts nasty lifetime constraints on pypy, which could be lifted simply by relaxing the documentation to saying " |
Sorry, something went wrong.
|
I think this change needs more wide discussion. Please open an issue on the bug tracker and ask the question on the Python-Dev mailing list. |
Sorry, something went wrong.
|
@mattip Hi, have you been able to open an issue on bugs.python.org about it as requested by Serhiy? |
Sorry, something went wrong.
|
@serhiy-storchaka what do you see as controversial? Perhaps you could suggest a phrasing that would not require such an extensive discussion for a documentation clarification? |
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
I have made the requested changes; please review again. |
Sorry, something went wrong.
|
Thanks for making the requested changes! @benjaminp: please review the changes made to this pull request. |
Sorry, something went wrong.
|
I have made the requested changes; please review again |
Sorry, something went wrong.
|
Thanks for making the requested changes! @benjaminp: please review the changes made to this pull request. |
Sorry, something went wrong.
|
Thanks @mattip for the PR, and @benjaminp for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.7, 3.8. |
Sorry, something went wrong.
|
Sorry, @mattip and @benjaminp, I could not cleanly backport this to |
Sorry, something went wrong.
(cherry picked from commit 57b7dbc) Co-authored-by: Matti Picus <matti.picus@gmail.com>
(cherry picked from commit 57b7dbc) Co-authored-by: Matti Picus <matti.picus@gmail.com>
(cherry picked from commit 57b7dbc) Co-authored-by: Matti Picus <matti.picus@gmail.com>
PySequence_Fast()should always be used (and the result checked) before any of the otherPySequence_Fast*family of functions. As an implementation detail, CPython can circumvent this ifPyTuple_CheckExact()passes, but that does not work on PyPy.xref numpy/numpy#12524