Antoine Pitrou
45d9c91d4b
Issue #3163 : The struct module gets new format characters 'n' and 'N'
...
supporting C integer types `ssize_t` and `size_t`, respectively.
2011-10-06 15:27:40 +02:00
Ezio Melotti
3b3499ba69
#11565 : Merge with 3.1.
2011-03-16 11:35:38 +02:00
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
2011-03-16 11:05:33 +02:00
Victor Stinner
da9ec995f6
Issue #10783 : struct.pack() doesn't encode implicitly unicode to UTF-8
...
* Replace "bytes" by "bytes object" in struct error messages
* Document the API change in What's new in Python 3.2
* Fix test_wave
* Remove also ugly implicit conversions in test_struct
2010-12-28 13:26:42 +00:00
Antoine Pitrou
1ce3eb5c5b
Issue #8990 : array.fromstring() and array.tostring() get renamed to
...
frombytes() and tobytes(), respectively, to avoid confusion. Furthermore,
array.frombytes(), array.extend() as well as the array.array()
constructor now accept bytearray objects. Patch by Thomas Jollans.
2010-09-01 20:29:34 +00:00
Mark Dickinson
5b1d35b9c7
Add test for memory leak reported in issue 9422.
2010-08-01 11:10:28 +00:00
Florent Xicluna
f1046ca817
Issue #4770 : Restrict binascii module to accept only bytes (as specified).
...
And fix the email package to encode to ASCII instead of ``raw-unicode-escape`` before ASCII-to-binary decoding.
2010-07-27 21:20:15 +00:00
Mark Dickinson
94628eeb58
Yield more information on failure in test_struct boolean test.
2010-07-12 20:03:24 +00:00
Benjamin Peterson
0d62f5bbfe
ValueError is eventually what we want to move to, I suppose
2010-07-10 15:14:45 +00:00
Benjamin Peterson
4b83af9576
wrap
2010-07-09 13:31:11 +00:00
Benjamin Peterson
a04a32d586
allow more exceptions
2010-07-09 13:28:42 +00:00
Benjamin Peterson
ccbcf53865
OverflowError is fine
2010-07-09 13:20:40 +00:00
Benjamin Peterson
003f523970
Merged revisions 82637 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82637 | benjamin.peterson | 2010-07-07 17:45:06 -0500 (Wed, 07 Jul 2010) | 1 line
ValueError in this case is also acceptable
........
2010-07-07 22:50:58 +00:00
Benjamin Peterson
f092c7c1d7
Merged revisions 82628,82630 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82628 | benjamin.peterson | 2010-07-07 13:44:05 -0500 (Wed, 07 Jul 2010) | 1 line
this needn't be in the loop
........
r82630 | benjamin.peterson | 2010-07-07 13:54:59 -0500 (Wed, 07 Jul 2010) | 1 line
don't ignore exceptions from PyObject_IsTrue
........
2010-07-07 22:46:00 +00:00
Benjamin Peterson
6ef08a0ebe
ValueError in this case is also acceptable
2010-07-07 22:45:06 +00:00
Benjamin Peterson
de73c4587f
don't ignore exceptions from PyObject_IsTrue
2010-07-07 18:54:59 +00:00
Benjamin Peterson
c937dc2ccb
this needn't be in the loop
2010-07-07 18:44:05 +00:00
Mark Dickinson
4a3acca7c1
Merged revisions 81897-81898,81902 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r81897 | mark.dickinson | 2010-06-11 17:56:34 +0100 (Fri, 11 Jun 2010) | 1 line
Avoid possible undefined behaviour from signed overflow.
........
r81898 | mark.dickinson | 2010-06-11 20:05:08 +0100 (Fri, 11 Jun 2010) | 1 line
Fix an incorrect return type.
........
r81902 | mark.dickinson | 2010-06-11 20:50:30 +0100 (Fri, 11 Jun 2010) | 1 line
Fix more undefined-behaviour inducing overflow checks in struct module.
........
2010-06-11 20:08:36 +00:00
Mark Dickinson
b72e6860d8
Fix more undefined-behaviour inducing overflow checks in struct module.
2010-06-11 19:50:30 +00:00
Mark Dickinson
ab4096f2f9
Avoid possible undefined behaviour from signed overflow.
2010-06-11 16:56:34 +00:00
Alexander Belopolsky
177e8530cb
Issue #3129 : Trailing digits in format string are no longer ignored.
2010-06-11 16:04:59 +00:00
Mark Dickinson
e9493a1872
Merged revisions 79745 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79745 | mark.dickinson | 2010-04-04 09:43:04 +0100 (Sun, 04 Apr 2010) | 3 lines
Issue #8300 (__index__ handling in struct.pack): Remove redundant check
and improve test coverage. Thanks Meador Inge for the patch.
........
2010-04-04 08:52:51 +00:00
Ezio Melotti
4c28ddc2f2
Merged revisions 79740 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79740 | ezio.melotti | 2010-04-04 10:00:02 +0300 (Sun, 04 Apr 2010) | 1 line
Use more specific assert* methods in test_struct.
........
2010-04-04 07:21:15 +00:00
Mark Dickinson
c593577a4a
Merged revisions 79674 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79674 | mark.dickinson | 2010-04-03 15:05:10 +0100 (Sat, 03 Apr 2010) | 3 lines
Issue #8300 : Let struct.pack use __index__ to convert and pack non-integers.
Based on a patch by Meador Inge.
........
2010-04-03 15:54:36 +00:00
Mark Dickinson
b9f751ad91
Clean up integer tests in test_struct, and bring them more in line with the trunk tests.
2010-04-03 15:07:40 +00:00