[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2021-04-27 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-b

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Martin Panter
Martin Panter added the comment: The breaking for “&” is to keep the count right, because the preceding “O” would already have been counted as one. The “es” code is only documented for parsing values, not for building values. I suggest to close this, unless you can find a specific bug. --

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Myron Walker
Myron Walker added the comment: Yes, there are some other cases that look odd to me as if the code is not up to date though. I was looking at the documentation and it mentions format character combinations like 'es' which contain two characters sequences. When I look at this function, it doe

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Martin Panter
Martin Panter added the comment: I am not seeing any problem. The function is declared static, and is only called with nonzero endchar from do_mkvalue() that I can see. It should not be directly callable from elsewhere. -- nosy: +martin.panter ___ P

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Myron Walker
Myron Walker added the comment: There are format string like "O&O&O&O&O&" being passed in to Py_BuildValue which eventually make their way to 'countformat'. It looks like it would just break after the first & and not count anything else. So Im not sure it gives an accurate count. --

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Myron Walker
Myron Walker added the comment: There is not reproducer for this currently. Its a case of implied or shared usage between a function and the code that uses it. This function is only used in the Python core, so unless it is used incorrectly, by a python extension or modification, it may never h

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread R. David Murray
R. David Murray added the comment: Can you post a reproducer? -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mai

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Myron Walker
New submission from Myron Walker: 'countformat' does not appear to be handling the case where a format string is passed with no parenthesis or brackets correctly. Here is an example of a usage that might cause issues from typedobject.c: static PyObject* slot_sq_slice(PyObject *self, Py_ssize_t