Mark Dickinson
c7d93b7614
Issue #1621 : Fix undefined behaviour from signed overflow in datetime module hashes, array and list iterations, and get_integer (stringlib/string_format.h)
2011-09-25 15:34:32 +01:00
Mark Dickinson
36f27c995a
Issue #1621 : Fix undefined behaviour from signed overflow in get_integer (stringlib/formatter.h)
2011-09-24 19:11:53 +01:00
Mark Dickinson
57e683e53e
Issue #1621 : Fix undefined behaviour in bytes.__hash__, str.__hash__, tuple.__hash__, frozenset.__hash__ and set indexing operations.
2011-09-24 18:18:40 +01:00
Mark Dickinson
0d5f6adbb3
Issue #13012 : Allow 'keepends' to be passed as a keyword argument in str.splitlines, bytes.splitlines and bytearray.splitlines.
2011-09-24 09:14:39 +01:00
Mark Dickinson
8f53d092f2
Merge issue #12973 list_repeat fix.
2011-09-19 19:19:50 +01:00
Mark Dickinson
c0420fd42a
Issue #12973 : Fix undefined-behaviour-inducing overflow check in list_repeat.
2011-09-19 19:18:37 +01:00
Stefan Krah
2d78a87e2e
Merge fix for issue #12963 .
2011-09-12 16:24:48 +02:00
Stefan Krah
b77c6c65c0
Issue #12963 : PyLong_AsSize_t() now returns (size_t)-1 in all error cases.
2011-09-12 16:22:47 +02:00
Nadeem Vawda
3d5881ec2b
Issue #12909 : Make PyLong_As* functions consistent in their use of exceptions.
...
PyLong_AsDouble() and PyLong_AsUnsignedLongLong() now raise TypeError (rather
than SystemError) when passed a non-integer argument, matching the behavior of
all the other PyLong_As*() functions.
2011-09-07 21:40:26 +02:00
Victor Stinner
f955eb210f
Merge 3.2: Fix PyUnicode_AsWideCharString() doc
...
- Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null
character
- Fix spelling of the null character
2011-09-06 02:01:29 +02:00
Victor Stinner
d88d9836c5
Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character
...
Fix also spelling of the null character.
2011-09-06 02:00:05 +02:00
Benjamin Peterson
e35dc5110f
merge 3.2
2011-09-01 16:33:56 -04:00
Benjamin Peterson
eff61f6927
make sure to initialize the method wrapper type
2011-09-01 16:32:31 -04:00
Ezio Melotti
6f2a683a0c
#9200 : merge with 3.2.
2011-08-22 20:31:11 +03:00
Ezio Melotti
93e7afc5d9
#9200 : The str.is* methods now work with strings that contain non-BMP characters even in narrow Unicode builds.
2011-08-22 14:08:38 +03:00
Antoine Pitrou
8fd544ffa9
Issue #12791 : Break reference cycles early when a generator exits with an exception.
2011-08-20 14:18:25 +02:00
Antoine Pitrou
a370fcf3b2
Issue #12791 : Break reference cycles early when a generator exits with an exception.
2011-08-20 14:15:03 +02:00
Benjamin Peterson
e518d4c18a
merge 3.2
2011-08-18 13:52:19 -05:00
Benjamin Peterson
7a6b44ab62
the named of the character is actually NUL
2011-08-18 13:51:47 -05:00
Benjamin Peterson
020340f284
merge 3.2
2011-08-18 10:49:16 -05:00
Benjamin Peterson
5ad517a7d9
NUL -> NULL
2011-08-18 10:48:50 -05:00
Benjamin Peterson
01fc6cd056
make __doc__ mutable on heaptypes ( closes #12773 )
2011-08-17 12:03:47 -05:00
Benjamin Peterson
d9f23d2004
factor out common checks for setting special type attributes
2011-08-17 11:54:03 -05:00
Benjamin Peterson
d17cefc787
crush other possible refleaks in this section
2011-08-16 22:28:23 -05:00
Benjamin Peterson
3e6267e704
merge 3.2
2011-08-16 22:27:42 -05:00
Benjamin Peterson
ae13c88d8d
fix possible refleaks
2011-08-16 22:26:48 -05:00
Benjamin Peterson
c4085c8470
complain when a class variable shadows a name in __slots__ ( closes #12766 )
2011-08-16 18:53:26 -05:00
Ezio Melotti
269e3ee3db
#12266 : merge with 3.2.
2011-08-15 09:26:28 +03:00
Ezio Melotti
ee8d998ecf
#12266 : Fix str.capitalize() to correctly uppercase/lowercase titlecased and cased non-letter characters.
2011-08-15 09:09:57 +03:00
Benjamin Peterson
f8e7543df9
merge 3.2 ( #12732 )
2011-08-12 22:18:19 -05:00
Benjamin Peterson
f413b80806
in narrow builds, make sure to test codepoints as identifier characters ( closes #12732 )
...
This fixes the use of Unicode identifiers outside the BMP in narrow builds.
2011-08-12 22:17:18 -05:00
Brian Curtin
dfc80e3d97
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
...
The macro was introduced in #12724 .
2011-08-10 20:28:54 -05:00
Benjamin Peterson
ecb3bd93ff
merge 3.2
2011-07-29 22:44:51 -05:00
Benjamin Peterson
43a976e3d9
remove duplicated type ready
2011-07-29 22:44:42 -05:00
Benjamin Peterson
18d7d7a217
also make NotImplementedType callable
2011-07-29 18:27:44 -05:00
Benjamin Peterson
c4607aeedd
make the types of None and Ellipsis callable
2011-07-29 18:19:43 -05:00
Raymond Hettinger
66d2be8986
Issue 12647: Add __bool__() method to the None object.
2011-07-28 09:55:13 -07:00
Senthil Kumaran
fcdaaa9011
merge from 3.2 - Fix closes Issue12621 - Fix docstrings of find and rfind methods of bytes/bytearry/unicodeobject.
2011-07-27 23:34:29 +08:00
Senthil Kumaran
53516a82df
Fix closes Issue12621 - Fix docstrings of find and rfind methods of bytes/bytearry/unicodeobject.
2011-07-27 23:33:54 +08:00
Eric V. Smith
c12469df22
Merge from 3.2.
2011-07-18 14:08:55 -04:00
Eric V. Smith
12ebefc9d3
Closes #12579 . Positional fields with str.format_map() now raise a ValueError instead of SystemError.
2011-07-18 14:03:41 -04:00
Antoine Pitrou
9b43b6e14e
Issue #11603 : Fix a crash when __str__ is rebound as __repr__.
...
Patch by Andreas Stührk.
2011-07-15 21:18:18 +02:00
Antoine Pitrou
ff35050493
Issue #11603 : Fix a crash when __str__ is rebound as __repr__.
...
Patch by Andreas Stührk.
2011-07-15 21:17:14 +02:00
Antoine Pitrou
8cdc40e3b0
Issue #11603 : Fix a crash when __str__ is rebound as __repr__.
...
Patch by Andreas Stührk.
2011-07-15 21:15:07 +02:00
Antoine Pitrou
093c8e4bf0
Issue #12149 : Update the method cache after a type's dictionnary gets
...
cleared by the garbage collector. This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase).
Diagnosis and patch by Davide Rizzo.
2011-07-12 21:58:39 +02:00
Antoine Pitrou
84f1b1718d
Issue #12149 : Update the method cache after a type's dictionnary gets
...
cleared by the garbage collector. This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase).
Diagnosis and patch by Davide Rizzo.
2011-07-12 21:57:15 +02:00
Victor Stinner
99b9538636
Issue #9642 : Uniformize the tests on the availability of the mbcs codec
...
Add a new HAVE_MBCS define.
2011-07-04 14:23:54 +02:00
Senthil Kumaran
bc9d8f838b
merge from 3.2
2011-07-03 21:05:25 -07:00
Senthil Kumaran
9ebe08d2f6
Fix closes issue12471 - wrong TypeError message when '%i' format spec was used.
2011-07-03 21:03:16 -07:00
Benjamin Peterson
f07c9a1e69
this is expressed better as a for loop
2011-07-03 17:23:22 -05:00