[issue3694] Undetected error in _struct.pack_into

2009-02-15 Thread Daniel Diniz
Daniel Diniz added the comment: >> BTW, there's a warning in _struct.c:180 -> warning: 'get_ulong' >> defined but not used, should I open a new issue? > > Sure. Please could you add me to the nosy list if you do. OK, should do that soon. > In my opinion, the struct module *really* needs an ov

[issue3694] Undetected error in _struct.pack_into

2009-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: > BTW, there's a warning in _struct.c:180 -> warning: ‘get_ulong’ > defined but not used, should I open a new issue? Sure. Please could you add me to the nosy list if you do. In my opinion, the struct module *really* needs an overhaul, especially for py3k; th

[issue3694] Undetected error in _struct.pack_into

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Applied in r69577, r69578. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue3694] Undetected error in _struct.pack_into

2009-02-11 Thread Daniel Diniz
Changes by Daniel Diniz : Added file: http://bugs.python.org/file13028/pynumber_assizet_trunk.diff ___ Python tracker ___ ___ Python-bugs-list

[issue3694] Undetected error in _struct.pack_into

2009-02-11 Thread Daniel Diniz
Changes by Daniel Diniz : Removed file: http://bugs.python.org/file13017/pynumber_assizet.diff ___ Python tracker ___ ___ Python-bugs-list mail

[issue3694] Undetected error in _struct.pack_into

2009-02-11 Thread Daniel Diniz
Daniel Diniz added the comment: Looks like both Undetected errors were corrected by Victor's patches, which Benjamin committed around rev66693, so trunk only needs a test. Here are the patches. I think IndexError fits better (and matches trunk), as the issue is that None is passed as "offset",

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, a patch for 2.6 should be provided as well. Besides, PyExc_OverflowError is probably a better choice than PyExc_IndexError (but I'm not sure on this one). ___ Python tracker _

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Daniel Diniz
Daniel Diniz added the comment: Here's a patch with test for 3.x. Erm, I have no idea if that's all that is necessary :) Does this have the potential to break existing code? Added file: http://bugs.python.org/file13017/pynumber_assizet.diff ___ Python track

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, and a test should be added :) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, PyNumber_AsSsize_t() should be used instead. -- nosy: +pitrou ___ Python tracker ___ ___ Python

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- nosy: +marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue3694] Undetected error in _struct.pack_into

2008-08-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Isn't PyNumber_AsSsize_t designed for this purpose? -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]>

[issue3694] Undetected error in _struct.pack_into

2008-08-27 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11268/s30.diff ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3694] Undetected error in _struct.pack_into

2008-08-27 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: The attached patches at least correct the XXX undetected error. -- keywords: +patch Added file: http://bugs.python.org/file11267/s26.diff ___ Python tracker <[EMAIL PROTECTED]>

[issue3694] Undetected error in _struct.pack_into

2008-08-27 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: The problem is that, unlike PyInt_AsSsize_t, PyLong_AsSsize_t expects its argument to already be a long object and else raises the SystemError. It should probably behave like PyInt_AsSsize_t and raise the TypeError since in 3.0 it's used in man

[issue3694] Undetected error in _struct.pack_into

2008-08-26 Thread Daniel Diniz
New submission from Daniel Diniz <[EMAIL PROTECTED]>: The following code leads to XXX Undetected errors in debug builds of trunk and 3.0: import _struct _struct.pack_into(b"8", bytearray(1), None) Besides that, there's something fishy happening in non-debug builds: 2.6: >>> _struct.pack_into(