[issue10169] socket.sendto raises incorrect exception when passed incorrect types

2011-05-07 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 7c3a20b5943a by Ezio Melotti in branch '2.7': #10169: Fix argument parsing in socket.sendto() to avoid error masking. http://hg.python.org/cpython/rev/7c3a20b5943a -- nosy: +python-dev

[issue10169] socket.sendto raises incorrect exception when passed incorrect types

2011-05-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This turned out to be a duplicate of #5421 already fixed in 3.x, so I backported the patch and added the tests to 3.x too. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed versions: -Python

[issue10169] socket.sendto raises incorrect exception when passed incorrect types

2011-05-03 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The original code was trying to call PyArg_ParseTuple assuming 2 args and in case of failure (*any* failure) was starting over assuming 3 args. The attached patch makes PyArg_ParseTuple accept 2 or 3 args and re-arranges the last two if

[issue10169] socket.sendto raises incorrect exception when passed incorrect types

2011-05-03 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Added tests and fixed all the problems they found. -- keywords: +needs review stage: patch review - commit review Added file: http://bugs.python.org/file21868/issue10169-2.diff ___ Python tracker

[issue10169] socket.sendto raises incorrect exception when passed incorrect types

2011-05-02 Thread Jeong-Min Lee
Changes by Jeong-Min Lee false...@gmail.com: -- nosy: +falsetru ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10169 ___ ___ Python-bugs-list

[issue10169] socket.sendto raises incorrect exception when passed incorrect types

2010-10-23 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10169 ___ ___

[issue10169] socket.sendto raises incorrect exception when passed incorrect types

2010-10-21 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone inva...@example.invalid: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.bind(('', 0)) s.sendto(u'hellé', s.getsockname()) Traceback (most recent call last): File stdin, line 1, in module TypeError: sendto() takes exactly 3 arguments (2 given)

[issue10169] socket.sendto raises incorrect exception when passed incorrect types

2010-10-21 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +pitrou versions: +Python 3.1 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10169 ___