[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2018-07-09 Thread Joe Jevnik


Change by Joe Jevnik :


--
pull_requests: +7754

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2018-07-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Interpreter Core
versions: +Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2018-07-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Do you mind to convert your patch into a pull request Joe?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2016-04-19 Thread STINNER Victor

STINNER Victor added the comment:

I reviewed skipitems.patch.

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2016-04-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
versions:  -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2016-04-18 Thread Joe Jevnik

Joe Jevnik added the comment:

bump

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-10-20 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: test needed -> patch review
type: crash -> behavior
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-10-20 Thread Joe Jevnik

Joe Jevnik added the comment:

bumping this issue

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-07-25 Thread Joe Jevnik

Joe Jevnik added the comment:

bumping so that we don't forget about this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23926
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-07-15 Thread Joe Jevnik

Joe Jevnik added the comment:

Sorry it took so long to get back to this. I didn't realize this was still 
open. I have provided the update to the docs and moved it to the 3.6 section. I 
also made sure the patch still applies and the tests all pass.

--
Added file: http://bugs.python.org/file39931/skipitems.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23926
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-04-13 Thread Joe Jevnik

Joe Jevnik added the comment:

here is a patch and test case.
I added an entry to Misc/NEWS. I tried to follow the format; however, let me 
know if I have done this incorrectly.

--
keywords: +patch
nosy: +ll
Added file: http://bugs.python.org/file38972/skipitems.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23926
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-04-12 Thread Larry Hastings

New submission from Larry Hastings:

tl;dr: skipitem() in Python 3 still supports w and w#, which were 
abandoned.  They should be removed.

--

If: 
* you have an extension that parses its arguments with
  PyArg_ParseTupleAndKeywords (or its cousins),
* you have optional positional parameters, and
* you run out of positional arguments

CPython will call skipitem() to skip over the remaining positional parameters 
so it can process keyword arguments.  It does this by knowing all the format 
units, and iterating over them and throwing away the various varargs pointers 
until it hits the keyword arguments part of the format string.

PyArg_ParseTuple() etc. in Python 2 supported w and w# for parsing objects 
with the read-write buffer interface.  These were removed in Python 3.

skipitem() in Python 3 still supports both skipping w and w#.  But in fact 
the only legal format unit starting with a 'w' in Python 3 is 'w*'.  So a 
function with a 'w*' as an optional parameter that got skipped would be 
misinterpreted; skipitem would see the 'w', not recognize the following '*' and 
leave it there, then the next function that read a character from the format 
string (either skipitem() or convertsimple()) would see the '*' and throw an 
impossible bad format char exception.

--
assignee: larry
messages: 240587
nosy: larry
priority: low
severity: normal
stage: test needed
status: open
title: skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't
type: crash
versions: Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23926
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com