[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-03-22 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Fixed with r79288 and r79295. -- priority: - normal resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Patch for the last t# format string in binascii module. And provide additional tests. PS: I removed this comment. IMHO, it is a wrong assertion: # The hqx test is in test_binhex.py -- Added file:

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I don't think the bytes - bytearray changes are useful, e.g.: -fillers = +fillers = bytearray() As for: +try: +f(empty) +except SystemError, err: +self.fail({}({!r})

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file15906/issue7703_binascii_a2b_hqx.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703 ___

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Changed. -- Added file: http://bugs.python.org/file15908/issue7703_binascii_a2b_hqx_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file15908/issue7703_binascii_a2b_hqx_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703 ___

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-16 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Removed no-op str(...) conversions. -- Added file: http://bugs.python.org/file15910/issue7703_binascii_a2b_hqx_v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: When the following snippet is taken: if (_PyString_Resize(rv, (bin_data - (unsigned char *)PyString_AS_STRING(rv))) 0) { PyBuffer_Release(pascii);

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The a2b_hqx() patch was committed in r77528 (trunk) and r77529 (py3k). Thanks again! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-16 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file15910/issue7703_binascii_a2b_hqx_v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703 ___

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Florent Xicluna
New submission from Florent Xicluna la...@yahoo.fr: In order to upgrate the tests for ctypes, following changes are required: - binascii.hexlify should accept memoryview() objects - the ctypes character buffer should accept assignment of memoryview() objects using their raw property Then we

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- keywords: +patch Added file: http://bugs.python.org/file15874/issue7703_binascii_memoryview.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Added file: http://bugs.python.org/file15875/issue7703_ctypes_memoryview.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703 ___

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Patches attached: - partial backport of Modules/binascii.c - partial backport of Modules/_ctypes/_ctypes.c (preserving 2.3 compat.) - update ctypes tests (buffer - memoryview) -- assignee: - theller components: +ctypes nosy: +theller

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Does binascii still work with array.array objects? Also, there should be additional tests for compatibility of binascii with memoryview objects. -- nosy: +pitrou ___ Python tracker

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Additional tests for binascii. -- Added file: http://bugs.python.org/file15877/issue7703_test_binascii.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Please be careful with the coding style. Stuff like: + if (_PyString_Resize(rv, 2*out_len) 0) \ + { Py_DECREF(rv); PyBuffer_Release(pin); return NULL; } \ should be spread out on several lines.

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I've now committed the binascii patch + tests to trunk, and merged the tests into py3k. Note: binascii_a2b_hqx() still uses the t# argument specifier in py3k as well as in trunk, this would deserve a separate patch. --

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file15877/issue7703_test_binascii.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703 ___

[issue7703] Replace buffer()--memoryview() in Lib/ctypes/test/

2010-01-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file15874/issue7703_binascii_memoryview.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7703 ___