Serhiy Storchaka
763a61ca95
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
...
in places where Py_DECREF was used.
2016-04-10 18:05:12 +03:00
Serhiy Storchaka
149d080871
Issue #13410 : Fixed a bug in PyUnicode_Format where it failed to properly
...
ignore errors from a __int__() method.
Patch based on the patch for issue #15516 .
2016-04-10 15:26:52 +03:00
Serhiy Storchaka
bc62af1bbe
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
2016-04-06 09:51:18 +03:00
Serhiy Storchaka
14a7d6389f
Issue #26494 : Fixed crash on iterating exhausting iterators.
...
Affected classes are generic sequence iterators, iterators of bytearray,
list, tuple, set, frozenset, dict, OrderedDict and corresponding views.
2016-03-30 20:43:06 +03:00
Benjamin Peterson
4ddb44a1d0
properly use PyObject_CallMethod in dictview binary operations ( closes #26478 )
2016-03-03 22:05:36 -08:00
Serhiy Storchaka
1c496178d2
Issue #25698 : Importing module if the stack is too deep no longer replaces
...
imported module with the empty one.
2016-02-10 10:28:06 +02:00
Benjamin Peterson
b59b04dd86
fix hash member name ( closes #22847 )
2016-02-06 22:36:06 -08:00
Benjamin Peterson
4a0a9556fc
fix debug assertion
2016-02-04 22:26:10 -08:00
Antoine Pitrou
225e7c0def
Issue #22847 : Improve method cache efficiency.
2014-11-15 00:56:27 +01:00
Victor Stinner
7791165fb3
code_richcompare() now uses the constants types
...
Issue #25843 : When compiling code, don't merge constants if they are equal but
have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
correctly compiled to two different functions: f1() returns 1 (int) and f2()
returns 1.0 (int), even if 1 and 1.0 are equal.
Add a new _PyCode_ConstantKey() private function.
2016-01-22 12:33:12 +01:00
Benjamin Peterson
a4acf1ff84
set tp_new from the class in the hierarchy that actually owns the descriptor ( closes #25731 )
...
Debugging by Eryk Sun.
2016-01-18 21:17:54 -08:00
Barry Warsaw
607965eb7e
Comment out two tests that won't pass now after reverting the typeobject.c
...
change. Also, as per further discussion, we'll just remove the regressing
code in typeobject.c
2016-01-11 14:44:59 -05:00
Barry Warsaw
f65395c8c2
Issue #22995 : [UPDATE] Comment out the one of the pickleability tests in
...
_PyObject_GetState() due to regressions observed in Cython-based projects.
2016-01-11 13:52:23 -05:00
Benjamin Peterson
f30bad284b
remove some copyright notices supserseded by the toplevel ones
2016-01-01 11:53:47 -06:00
Serhiy Storchaka
28f35f246b
Issue #25961 : Fixed compilation error and a leak in type constructor.
2015-12-31 12:03:14 +02:00
Serhiy Storchaka
f9347e3b44
Issue #25961 : Disallowed null characters in the type name.
2015-12-30 21:39:21 +02:00
Serhiy Storchaka
b8e54dd806
Issue #22995 : Instances of extension types with a state that aren't
...
subclasses of list or dict and haven't implemented any pickle-related
methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__,
or __getstate__), can no longer be pickled. Including memoryview.
2015-12-30 20:43:29 +02:00
Serhiy Storchaka
2e6c829681
Issue #20440 : More use of Py_SETREF.
...
This patch is manually crafted and contains changes that couldn't be handled
automatically.
2015-12-27 15:41:58 +02:00
Serhiy Storchaka
8688acaf2e
Issue #20440 : Applied yet one patch for using Py_SETREF.
...
The patch is automatically generated, it replaces the code that uses Py_CLEAR.
2015-12-27 12:38:48 +02:00
Serhiy Storchaka
5951f2300f
Issue #20440 : Massive replacing unsafe attribute setting code with special
...
macro Py_SETREF.
2015-12-24 10:35:35 +02:00
Serhiy Storchaka
c06a6d0958
Issue #25421 : __sizeof__ methods of builtin types now use dynamic basic size.
...
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
2015-12-19 20:07:48 +02:00
Serhiy Storchaka
e37003e9ae
Issue #19543 : Added Py3k warning for decoding unicode.
2015-12-03 20:47:48 +02:00
Serhiy Storchaka
ee1b24ccaa
Issue #24097 : Fixed crash in object.__reduce__() if slot name is freed inside
...
__getattr__. Original patch by Antoine Pitrou.
2015-11-25 18:35:33 +02:00
Serhiy Storchaka
8d30ad7c8a
Issue #24731 : Fixed crash on converting objects with special methods
...
__str__, __trunc__, and __float__ returning instances of subclasses of
str, long, and float to subclasses of str, long, and float correspondingly.
2015-11-25 15:55:54 +02:00
Serhiy Storchaka
6156560e4b
Issue #25678 : Copy buffer objects to null-terminated strings.
...
Avoid buffer overreads when int(), long(), float(), and compile()
are passed buffer objects. Similar code is removed from the
complex() constructor, where it was not reachable.
Patch backported from issue #24802 by Eryk Sun.
2015-11-20 21:56:21 +02:00
Serhiy Storchaka
fedcf9474e
Issue #22995 : Default implementation of __reduce__ and __reduce_ex__ now
...
rejects builtin types with not defined __new__.
2015-11-12 11:59:03 +02:00
Victor Stinner
e192d0bbb9
Issue #7267 : format(int, 'c') now raises OverflowError when the argument is not
...
in range(0, 256).
2015-11-09 12:21:09 +01:00
Serhiy Storchaka
462502b084
Issue #24848 : Fixed yet one bug in UTF-7 decoder. Testing for BASE64 character
...
was locale depending.
2015-10-10 09:33:11 +03:00
Raymond Hettinger
9c90e255e0
Issue #25326 : Improve an obscure error message.
2015-10-08 21:14:15 -04:00
Benjamin Peterson
77d12ecaad
prevent unacceptable bases from becoming bases through multiple inheritance ( #24806 )
2015-10-06 19:36:54 -07:00
Serhiy Storchaka
e12f632186
Issue #24848 : Fixed bugs in UTF-7 decoding of misformed data:
...
1. Non-ASCII bytes were accepted after shift sequence.
2. A low surrogate could be emitted in case of error in high surrogate.
2015-10-02 13:14:53 +03:00
Benjamin Peterson
1edd2f6241
make comment not lie about the size of SMALL_REQUEST_THRESHOLD
2015-07-29 22:18:16 -07:00
Serhiy Storchaka
ab766350b6
Issue #24467 : Fixed possible buffer over-read in bytearray. The bytearray
...
object now always allocates place for trailing null byte and it's buffer now
is always null-terminated.
2015-06-29 21:13:54 +03:00
Serhiy Storchaka
f0aa88f6e8
Fixed indentation of Python examples in C comments.
2015-06-11 00:06:27 +03:00
Serhiy Storchaka
c7797dc748
Issue #19543 : Emit deprecation warning for known non-text encodings.
...
Backported issues #19619 : encode() and decode() methods and constructors
of str, unicode and bytearray classes now emit deprecation warning for known
non-text encodings when Python is ran with the -3 option.
Backported issues #20404 : io.TextIOWrapper (and hence io.open()) now uses the
internal codec marking system added to emit deprecation warning for known non-text
encodings at stream construction time when Python is ran with the -3 option.
2015-05-31 20:21:00 +03:00
Serhiy Storchaka
5127ed727c
Issue #24115 : Update uses of PyObject_IsTrue(), PyObject_Not(),
...
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
2015-05-30 17:45:12 +03:00
Serhiy Storchaka
d43e928753
Issue #23985 : Fixed integer overflow in iterator object. Original patch by
...
Clement Rouault.
2015-05-21 20:49:34 +03:00
Raymond Hettinger
51dbc9a4ad
Issue #23757 : Only call the concrete list API for exact lists.
2015-05-17 14:37:39 -07:00
Raymond Hettinger
77b3ae5e2c
Issue #23971 : Fix underestimated presizing in dict.fromkeys()
2015-05-13 03:13:28 -07:00
Benjamin Peterson
b529c24921
allow 2.7 to be built with asan ( closes #24061 )
2015-04-26 20:33:38 -04:00
Serhiy Storchaka
07e03ab9f9
Issue #23783 : Fixed memory leak in PyObject_ClearWeakRefs() in case of
...
MemoryError.
2015-03-30 09:53:06 +03:00
Serhiy Storchaka
ce16424b0b
Issue #22079 : Py3k warning now is issued in PyType_Ready() instead of
...
raising TypeError when statically allocated type subclasses dynamically
allocated type
2015-03-22 09:45:35 +02:00
Antoine Pitrou
323ab6d732
Issue #23629 : Fix the default __sizeof__ implementation for variable-sized objects.
2015-03-10 22:32:00 +01:00
Benjamin Peterson
f050648a50
fix potential refleak in PyFloat_AsDouble ( closes #23590 )
2015-03-06 09:08:44 -05:00
Benjamin Peterson
082a960425
fix merge_collapse to actually maintain the invariant it purports to ( closes #23515 )
...
See
de Gouw, Stijn and Rot, Jurriaan and de Boer, Frank S and Bubel, Richard and Hähnle, Reiner
"OpenJDK’s java.utils.Collection.sort() is broken: The good, the bad and the worst case"
2015-02-25 10:12:26 -05:00
Stefan Krah
0a7fc53be2
Issue #23370 : Fix off-by-one error for non-contiguous buffers.
2015-02-01 16:10:35 +01:00
Serhiy Storchaka
227526dc5c
Issue #23055 : Fixed read-past-the-end error in PyUnicode_FromFormatV.
2015-01-31 01:15:29 +02:00
Serhiy Storchaka
5ec0bbf27d
Issue #23055 : Fixed off-by-one error in PyUnicode_FromFormatV.
2015-01-30 23:35:03 +02:00
Stefan Krah
5606cd9800
Issue #23349 : Fix off-by-one error in PyBuffer_ToContiguous(). Initial patch
...
by Richard Hansen.
2015-01-30 20:11:10 +01:00
Serhiy Storchaka
4c54387f11
Issue #22079 : PyType_Ready() now checks that statically allocated type has
...
no dynamically allocated bases.
2015-01-28 10:52:49 +02:00
Serhiy Storchaka
0e0282eb14
Issue #23055 : Fixed a buffer overflow in PyUnicode_FromFormatV. Analysis
...
and fix by Guido Vranken.
2015-01-27 22:17:56 +02:00
Serhiy Storchaka
e8c9e14af9
Issue #23181 : More "codepoint" -> "code point".
2015-01-18 11:42:50 +02:00
Benjamin Peterson
e2defc4132
remove tautological condition ( closes #22954 )
2014-11-26 23:03:11 -06:00
Benjamin Peterson
c6b6ab0caa
remove strange casts
2014-11-23 12:58:54 -06:00
Georg Brandl
409062c669
Closes #22772 : fix __ifloordiv__ and __itruediv__ docstring.
2014-10-31 13:12:57 +01:00
Antoine Pitrou
d0a5e9bb4a
Issue #22604 : Fix assertion error in debug mode when dividing a complex number by (nan+0j).
2014-10-10 23:49:32 +02:00
Benjamin Peterson
95bc0e4703
use Py_ssize_t for file offset and length computations in iteration ( closes #22526 )
2014-09-30 21:17:15 -04:00
Benjamin Peterson
f8c4b3a730
fix overflow checking in PyString_Repr ( closes #22519 )
2014-09-29 19:01:18 -04:00
Benjamin Peterson
ed4c130d3d
cleanup overflowing handling in unicode_decode_call_errorhandler and unicode_encode_ucs1 ( closes #22518 )
2014-09-29 18:18:57 -04:00
Benjamin Peterson
1643d5cb08
give exception a nice message ( closes #22379 )
...
Patch by Yongzhi Pan.
2014-09-28 12:48:46 -04:00
Raymond Hettinger
9376c8b5e3
Fix typo in comment.
2014-08-01 23:51:51 -07:00
Victor Stinner
2af8d2f698
Issue #22023 : Fix %S, %R and %V formats of PyUnicode_FromFormat().
2014-07-30 00:39:05 +02:00
Benjamin Peterson
df71dcbef2
don't overwrite the error from PyObject_GetAttrString ( closes #4346 )
2014-06-26 23:27:41 -07:00
Benjamin Peterson
550b945fd6
avoid overflow with large buffer sizes and/or offsets ( closes #21831 )
2014-06-23 20:12:27 -07:00
Charles-François Natali
e4cda6ce21
Merge.
2014-06-19 22:45:09 +01:00
Charles-François Natali
cee4f03438
Issue #21810 : Backport mmap-based arena allocation failure check.
2014-06-19 22:42:51 +01:00
Raymond Hettinger
f643b9a9c7
Issue 8743: Improve interoperability between sets and the collections.Set abstract base class.
2014-05-25 22:13:41 -07:00
Antoine Pitrou
b0acc1b0a3
Issue #21350 : Fix file.writelines() to accept arbitrary buffer objects, as advertised.
...
Patch by Brian Kearns.
2014-05-08 19:26:04 +02:00
Kristján Valur Jónsson
be580f2e48
Issue #20434 Correct error handlin of _PyString_Resize and _PyBytes_Resize
2014-04-25 09:51:21 +00:00
Eric V. Smith
9a55cd8857
Issue #12546 : Allow \x00 as a fill character for builtin type __format__ methods.
2014-04-14 11:22:33 -04:00
Benjamin Peterson
c4e6e0a279
bail in unicode error's __str__ methods if the objects are not properly initialized ( closes #21134 )
2014-04-02 12:15:06 -04:00
Benjamin Peterson
18fc493409
fix expandtabs overflow detection to be consistent and not rely on signed overflow
2014-03-30 19:47:57 -04:00
Benjamin Peterson
8312eccd34
add braces and fix indentation
2014-03-30 19:23:24 -04:00
Benjamin Peterson
0e431b9311
fix indentation and add braces
2014-03-30 19:16:44 -04:00
Benjamin Peterson
7a91bf8675
give non-iterable TypeError a message ( closes #20507 )
2014-02-15 13:02:52 -05:00
Serhiy Storchaka
ee09d7c098
Issue #19255 : Clear error after failed PyDict_SetItem() on shutdown.
...
This silences a Coverity complain.
2014-02-12 09:54:48 +02:00
Serhiy Storchaka
98a9722e4a
Issue #20437 : Fixed 43 potential bugs when deleting objects references.
2014-02-09 13:14:04 +02:00
Benjamin Peterson
d16e01cf75
mmap obmalloc arenas so that they may be immediately returned to the system when unused ( closes #20494 )
2014-02-04 10:20:26 -05:00
Serhiy Storchaka
78ad6583d6
Circumventing a bug in glibc (issue #17976 ).
...
Patch by Jaakko Moisio.
2013-12-17 17:32:20 +02:00
Serhiy Storchaka
6d562319d2
Issue #17976 : Fixed potential problem with file.write() not detecting IO error
...
by inspecting the return value of fwrite(). Based on patches by Jaakko Moisio
and test by Victor Stinner.
2013-12-17 14:40:06 +02:00
Victor Stinner
66c6e9dcb4
Issue #14432 : Generator now clears the borrowed reference to the thread state
...
Fix a crash when a generator is created in a C thread that is destroyed while
the generator is still used. The issue was that a generator contains a frame,
and the frame kept a reference to the Python state of the destroyed C thread.
The crash occurs when a trace function is setup.
2013-12-13 02:37:09 +01:00
Alexandre Vassalotti
df9460f8dc
Issue #6477 : Revert fbb97f6eb3b3 as it broke test_xpickle.
2013-11-30 17:43:42 -08:00
Alexandre Vassalotti
a2934280e5
Issue #6477 : Added pickling support for singletons and their types.
2013-11-30 16:52:03 -08:00
Gregory P. Smith
9cfd4662fe
fix docstring. extra \.
2013-11-25 04:30:00 +00:00
Raymond Hettinger
ef153618d6
Document that @property can incorporate a docstring from the getter method. Improve readabilty with additional whitespace.
2013-11-24 14:43:04 -08:00
Serhiy Storchaka
f105672332
Issue #19279 : UTF-7 decoder no more produces illegal unicode strings.
2013-10-19 20:37:49 +03:00
Tim Peters
61e9ffa191
Issue #19171 : speed some cases of 3-argument long pow().
...
Reduce the base by the modulus when the base is larger than
the modulus. This can unboundedly speed the "startup costs"
of doing modular exponentiation, particularly in cases where
the base is much larger than the modulus. Original patch
by Armin Rigo, inspired by https://github.com/pyca/ed25519 .
(grafted from f34c59494420765b013136ca93f63b716d9f1d30)
2013-10-05 16:53:52 -05:00
Ezio Melotti
38386149ab
#19069 : use imperative mood in float object docstrings. Patch by Marco Buttu.
2013-10-06 00:44:32 +03:00
Ezio Melotti
eb053167a8
#19068 : use imperative mood in complex object docstrings. Patch by Marco Buttu.
2013-10-06 00:39:18 +03:00
Tim Peters
59a06f5020
Various clarifications based on feedback & questions over the years.
2013-08-24 15:15:19 -05:00
Tim Peters
78cc8daa9b
Add line explaining the "%sort" test.
2013-08-22 18:32:53 -05:00
Raymond Hettinger
0e413bd288
Issue 18719: Remove a false optimization
...
Remove an unused early-out test from the critical path for
dict and set lookups.
When the strings already have matching lengths and hashes,
there is no additional information gained by checking the first
characters (the probability of a mismatch is already known to
be less than 1 in 2**64).
2013-08-13 18:34:49 -07:00
Serhiy Storchaka
e822b034e7
Issue #15866 : The xmlcharrefreplace error handler no more produces two XML
...
entities for a non-BMP character on narrow build.
2013-08-06 16:56:26 +03:00
Raymond Hettinger
007684a701
Silence compiler warning for unused declaration.
2013-08-04 22:35:37 -07:00
Ronald Oussoren
3687e8055c
Issue #18427 : str.replace could crash the interpreter with huge strings.
...
This fixes two places where 'int' was used to represent
the size of strings, instead of 'Py_ssize_t'.
(The issue is not present in the corresponding code in the 3.x branches)
Fixes #18427
2013-07-11 13:33:55 +02:00
Serhiy Storchaka
ba908c72a0
Issue #18184 : PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
...
OverflowError when an argument of %c format is out of range.
2013-06-23 20:22:09 +03:00
Victor Stinner
760388100e
Issue #18137 : Detect integer overflow on precision in float.__format__()
...
and complex.__format__().
2013-06-23 14:56:57 +02:00
Benjamin Peterson
b91ef008ba
add missing NULL check ( closes #18019 )
2013-05-19 19:38:12 -07:00
Mark Dickinson
f794b143d3
Issue #16447 : Fix potential segfault when setting __name__ on a class.
2013-04-13 15:19:05 +01:00
Benjamin Peterson
74001fad7d
list slotdefs in offset order rather than sorting them ( closes #17610 )
...
This means we can remove our usage of qsort() than relied on undefined behavior.
Backport by Zbigniew Halas.
2013-04-07 09:52:59 -04:00
Serhiy Storchaka
6c467a41bc
Revert a premature patch for issue #14010 (changeset d17d10c84d27).
2013-04-06 22:51:29 +03:00
Serhiy Storchaka
bb84565cdb
Issue #14010 : Fix a crash when iterating or deleting deeply nested filters
...
in itertools module (i.e. itertools.izip(), itertools.chain(), etc).
2013-04-06 22:04:10 +03:00
Benjamin Peterson
da2c7ebd23
allow any type with __getitem__ to be a mapping for the purposes of % ( #15801 )
2013-03-23 22:32:00 -05:00
Kristján Valur Jónsson
1d108bc714
Issue #10211 : Buffer object should support the new buffer interface.
2013-03-19 16:50:51 -07:00
Mark Dickinson
7cac1c25a1
Issue #16445 : Fix potential segmentation fault when deleting an exception message.
2013-03-03 11:13:34 +00:00
Benjamin Peterson
8e830a0664
fix building without pymalloc ( closes #17228 )
2013-02-20 16:54:30 -05:00
R David Murray
5aff27aec1
#7963 : fix error message when 'object' called with arguments.
...
Patch by Alexander Belopolsky.
2013-02-18 22:04:59 -05:00
Serhiy Storchaka
d5327d95d2
Issue #17043 : The unicode-internal decoder no longer read past the end of
...
input buffer.
2013-02-07 16:23:11 +02:00
Serhiy Storchaka
a8d64ae304
Issue #17034 : Use Py_CLEAR() in stringobject.c.
2013-02-02 18:43:58 +02:00
Gregory P. Smith
c0022b2d8c
Silence a -Wformat-extra-argument warning when compiling.
2013-02-01 16:13:27 -08:00
Serhiy Storchaka
c8e58126a2
Issue #16979 : Fix error handling bugs in the unicode-escape-decode decoder.
2013-01-29 10:20:34 +02:00
Serhiy Storchaka
c59c85c1ac
Issue #10156 : In the interpreter's initialization phase, unicode globals
...
are now initialized dynamically as needed.
2013-01-26 12:13:40 +02:00
Serhiy Storchaka
01b3a08f5e
Issue #16975 : Fix error handling bug in the escape-decode decoder.
2013-01-25 23:30:50 +02:00
Serhiy Storchaka
1d3acd4b59
Issue #16335 : Fix integer overflow in unicode-escape decoder.
2013-01-21 11:48:24 +02:00
Serhiy Storchaka
926f3a37de
Issue #15989 : Fix possible integer overflow in str formatting as in unicode formatting.
2013-01-19 23:35:46 +02:00
Serhiy Storchaka
74f49ab28b
Issue #15989 : Fix several occurrences of integer overflow
...
when result of PyInt_AsLong() or PyLong_AsLong() narrowed
to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
2013-01-19 12:55:39 +02:00
Raymond Hettinger
ac7b49f407
Improve tooltips by listing the most common argument pattern first.
2013-01-18 23:23:11 -08:00
Serhiy Storchaka
9599745e2c
Issue #14850 : Now a chamap decoder treates U+FFFE as "undefined mapping"
...
in any mapping, not only in an unicode string.
2013-01-15 14:42:59 +02:00
Serhiy Storchaka
c4b82c037e
Issue #11461 : Fix the incremental UTF-16 decoder. Original patch by
...
Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP
characters.
2013-01-08 23:12:00 +02:00
Serhiy Storchaka
c9631a14d7
Fix out of bound read in UTF-32 decoder on "narrow Unicode" builds.
2013-01-08 22:43:18 +02:00
Benjamin Peterson
8f53ded1ee
untabify
2013-01-02 12:25:15 -06:00
Benjamin Peterson
a708adfcf6
call PyErr_Clear() when ignoring error from PyNumber_Int ( closes #15516 )
...
Patch from Tom Tromey.
2013-01-02 12:21:32 -06:00
Benjamin Peterson
6b3f8d375b
ensure the attribute name string is initalized before using it ( closes #16839 )
2013-01-02 09:36:23 -06:00
Benjamin Peterson
5ca88d2b18
get the core to compile --disable-unicode
2013-01-01 23:04:16 -06:00
Serhiy Storchaka
cf095f8e0f
Issue #16761 : Raise TypeError when int() or long() called with base argument only.
2012-12-28 09:31:59 +02:00
Antoine Pitrou
d38c990bb7
Issue #16602 : When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero.
...
Thanks to Eugene Toder for diagnosing and reporting the issue.
2012-12-08 21:15:26 +01:00
Mark Dickinson
115bc79df8
Issue #9742 : Sneaky fix for build failure on Solaris 9.
2012-11-17 20:18:52 +00:00
Antoine Pitrou
e3ae321222
Issue #15379 : Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings).
...
Patch by Serhiy Storchaka.
2012-11-17 21:14:58 +01:00
Antoine Pitrou
b704eab599
Issue #16453 : Fix equality testing of dead weakref objects.
...
Also add tests for hashing.
2012-11-11 19:36:51 +01:00
Christian Heimes
146a5fead2
Fix compilation on Windows
2012-11-03 23:07:59 +01:00
Ezio Melotti
67dc4a87fc
#8401 : assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an error.
2012-11-03 21:10:45 +02:00
Benjamin Peterson
47fa4d54e8
avoid a function call with redundant checks for dict size
2012-10-31 14:22:12 -04:00
Benjamin Peterson
0ec820fc5f
only fast-path fromkeys() when the constructor returns a empty dict ( closes #16345 )
2012-10-31 14:05:55 -04:00
Benjamin Peterson
6da3ed63d8
initialize more global type objects ( closes #16369 )
2012-10-30 23:21:10 -04:00
Mark Dickinson
75d3600466
Issue #14700 : Fix buggy overflow checks for large precision and width in new-style and old-style formatting.
2012-10-28 10:00:46 +00:00
Chris Jerdonek
ad4b000179
Issue #14783 : Backport changes from 3.2.
2012-10-07 20:37:54 -07:00
Mark Dickinson
218a8ab5eb
Issues #16029 , #16030 : Fix pickling and repr of large xranges.
2012-09-28 20:36:36 +01:00
Christian Heimes
47770ed914
Fixed memory leak in error branch of object_repr which may leak a reference to mod when type_name returns NULL. CID 715371
2012-09-10 16:57:36 +02:00
Christian Heimes
4e80eea60e
Fixed possible reference leak to mod when type_name() returns NULL
2012-09-10 03:00:14 +02:00
Christian Heimes
074ebced1b
PyTuple_Pack() was missing va_end() in its error branch which lead to a resource leak.
2012-09-10 02:54:51 +02:00
Antoine Pitrou
58098a77e6
Issue #13992 : The trashcan mechanism is now thread-safe. This eliminates
...
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.
Because of this change, a couple extension modules compiled for 2.7.4
(those which use the trashcan mechanism, despite it being undocumented)
will not be loadable by 2.7.3 and earlier. However, extension modules
compiled for 2.7.3 and earlier will be loadable by 2.7.4.
2012-09-06 00:59:49 +02:00
Benjamin Peterson
23d49d3e7e
use the stricter PyMapping_Check ( closes #15801 )
2012-08-28 17:55:35 -04:00
Antoine Pitrou
c5bef75c77
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
...
Patch by Serhiy Storchaka.
2012-08-15 23:16:51 +02:00
Antoine Pitrou
715a63b783
Issue #14579 : Fix error handling bug in the utf-16 decoder.
...
Patch by Serhiy Storchaka.
2012-07-21 00:52:06 +02:00
Benjamin Peterson
7d8a2e41a0
allow any number to be returned from __length_hint__ ( closes #15354 )
2012-07-14 17:53:55 -07:00
Gregory P. Smith
b2ac4d693a
Fixes issue #12268 for file readline, readlines and read() and readinto methods.
...
They no longer lose data when an underlying read system call is interrupted.
IOError is no longer raised due to a read system call returning EINTR from
within these methods.
2012-06-25 20:57:36 -07:00
Raymond Hettinger
aad5b02e62
Improve tooltips for splitlines() by showing that the default for keepends is False.
2012-06-02 01:42:58 -04:00
Martin v. Löwis
ed11a5d018
Issue #8767 : Restore building with --disable-unicode.
...
Original patch by Stefano Taschini.
2012-05-20 10:42:17 +02:00
Benjamin Peterson
f1ae5cf5c7
fix possible refleak ( closes #14752 )
2012-05-08 09:22:24 -04:00
Benjamin Peterson
d62da9d658
close() doesn't take any args ( closes #14717 )
2012-05-03 18:44:09 -04:00