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
Benjamin Peterson
f3ad1f94a8
use formats that work on 2.7
2012-05-01 10:16:33 -04:00
Benjamin Peterson
042c47b2c7
fix calling the classmethod descriptor directly ( closes #14699 )
2012-05-01 09:51:09 -04:00
Benjamin Peterson
d157a4c3dd
don't use a slot wrapper from a different special method ( closes #14658 )
...
This also alters the fix to #11603 . Specifically, setting __repr__ to
object.__str__ now raises a recursion RuntimeError when str() or repr() is
called instead of silently bypassing the recursion. I believe this behavior is
more correct.
2012-04-24 11:06:25 -04:00
Benjamin Peterson
76605557ea
SETUP_WITH acts like SETUP_FINALLY for the purposes of setting f_lineno ( closes #14612 )
2012-04-18 11:14:31 -04:00
Benjamin Peterson
fe146ea3c7
merge 2.7 release branch
2012-04-09 14:54:09 -04:00
Benjamin Peterson
f51c384a0a
fix build without Py_DEBUG and DNDEBUG ( closes #14509 )
2012-04-09 14:53:07 -04:00
Antoine Pitrou
02a380105d
Issue #14505 : Fix file descriptor leak when deallocating file objects created with PyFile_FromString().
2012-04-05 14:07:52 +02:00
Antoine Pitrou
fe9417726c
Issue #13019 : Fix potential reference leaks in bytearray.extend().
...
Patch by Suman Saha.
2012-04-01 16:05:46 +02:00
Benjamin Peterson
e8ecc73844
kill this terribly outdated comment
2012-03-25 22:40:54 -04:00
Benjamin Peterson
dbc52f8a0d
check for string attribute names in old-style classes ( closes #14334 )
2012-03-16 10:58:46 -05:00
Benjamin Peterson
6e7832b04c
check to make sure the attribute is a string ( #14334 )
2012-03-16 09:32:59 -05:00
Ezio Melotti
eace3a7261
#14161 : fix compile error under Windows.
2012-03-12 01:28:45 +02:00
Ezio Melotti
11f8b6872a
#14161 : fix the __repr__ of file objects to escape the file name.
2012-03-12 01:17:02 +02:00
Benjamin Peterson
9d7601fcea
merge 2.6
2012-02-21 11:24:21 -05:00
Benjamin Peterson
26da920001
ensure no one tries to hash things before the random seed is found
2012-02-21 11:08:50 -05:00
Benjamin Peterson
aee9dfba4a
merge 2.6 with hash randomization fix
2012-02-20 21:44:56 -05:00
Barry Warsaw
1e13eb084f
- Issue #13703 : oCERT-2011-003: add -R command-line option and PYTHONHASHSEED
...
environment variable, to provide an opt-in way to protect against denial of
service attacks due to hash collisions within the dict and set types. Patch
by David Malcolm, based on work by Victor Stinner.
2012-02-20 20:42:21 -05:00
Éric Araujo
a4c81b07f8
Fix typo
2012-02-20 02:07:31 +01:00
Benjamin Peterson
32c49d9533
use Py_CLEAR
2012-02-19 01:11:56 -05:00
Antoine Pitrou
fd7e4964bb
Fix indentation.
2012-02-15 02:57:19 +01:00
Antoine Pitrou
c66ed457ef
Issue #13020 : Fix a reference leak when allocating a structsequence object fails.
...
Patch by Suman Saha.
2012-02-15 02:51:43 +01:00
Benjamin Peterson
0f7e2df2f1
this is only a borrowed ref in Brett's branch
2012-02-10 08:46:54 -05:00
Benjamin Peterson
cec6a61d30
bltinmod is borrowed, so it shouldn't be decrefed
2012-02-06 11:28:45 -05:00
Benjamin Peterson
4c79aec716
put returns on their own lines
2012-02-03 19:22:31 -05:00
Mark Dickinson
1abe6cd842
Issue #13889 : Add missing _Py_SET_53BIT_PRECISION_* calls around uses of dtoa.c functions in float round.
2012-01-27 21:16:01 +00:00
Benjamin Peterson
a8d458560e
allow cycles throught the __dict__ slot to be cleared ( closes #1469629 )
...
Patch from Armin, test from me.
2012-03-07 18:41:11 -06:00
Antoine Pitrou
6a1cd1b3b1
Issue #13521 : dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
...
Patch by Filip Gruszczyński.
2012-02-27 00:45:12 +01:00
Georg Brandl
6f14c330fa
Small clarification in docstring of dict.update(): the positional argument is not required.
2011-12-18 19:30:55 +01:00
Antoine Pitrou
5b4b2da55d
Fix the fix for issue #12149 : it was incorrect, although it had the side
...
effect of appearing to resolve the issue. Thanks to Mark Shannon for
noticing.
2011-12-15 14:15:31 +01:00
Victor Stinner
975134e2a2
Issue #13093 : Fix error handling on PyUnicode_EncodeDecimal()
...
Add tests for PyUnicode_EncodeDecimal()
2011-11-22 01:54:19 +01:00
Raymond Hettinger
7d1483cbad
Make an error message more understandable and consistent with other error messages.
2011-11-20 10:38:53 -08:00
Antoine Pitrou
30402549de
Issue #13333 : The UTF-7 decoder now accepts lone surrogates
...
(the encoder already accepts them).
2011-11-15 01:49:40 +01:00
Eli Bendersky
d784185303
Issue #13161 : fix doc strings of __i*__ operators
2011-11-11 16:52:16 +02:00
Petri Lehtinen
3b9d92aefe
Revert "Accept None as start and stop parameters for list.index() and tuple.index()"
...
Issue #13340 .
2011-11-06 20:59:01 +02:00
Petri Lehtinen
819d8d447d
Accept None as start and stop parameters for list.index() and tuple.index()
...
Closes #13340 .
2011-11-05 23:18:06 +02:00
Benjamin Peterson
e3b5eda8be
remove unused variable
2011-10-30 14:24:44 -04:00
Petri Lehtinen
a39de111a5
Fix the return value of set_discard (issue #10519 )
2011-10-30 14:33:09 +02:00
Petri Lehtinen
5f4d870668
Avoid unnecessary recursive function calls ( closes #10519 )
2011-10-30 13:55:56 +02:00
Petri Lehtinen
8ffbab8d02
Issue #13018 : Fix reference leaks in error paths in dictobject.c.
...
Patch by Suman Saha.
2011-10-24 20:59:29 +03:00
Benjamin Peterson
a7b0976c3e
PyEval_CallObject requires a tuple of args ( closes #13186 )
2011-10-15 13:43:21 -04:00
Nadeem Vawda
36248154a9
Issue #13159 : Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one.
...
Also fix the builtin file class and the bz2 module, which used the same algorithm.
2011-10-13 13:52:46 +02:00
Victor Stinner
63c22fac72
Issue #7732 : Fix a crash on importing a module if a directory has the same name
...
than a Python module (e.g. "__init__.py"): don't close the file twice.
PyFile_FromFile() does also close the file if PyString_FromString() failed. It
did already close the file on fill_file_fields() error (e.g. if the file is a
directory).
2011-09-23 19:37:03 +02:00
Mark Dickinson
4ac5d2cda4
Backport issue #12973 list_repeat fix from 3.x.
2011-09-19 19:23:55 +01:00
Mark Dickinson
dbbed04941
Issue #12973 : Fix int.__pow__ overflow checks that invoked undefined behaviour, thereby producing incorrect results on Clang.
2011-09-19 16:38:08 +01:00
Benjamin Peterson
de66ecc75f
fix possible refleaks
2011-08-16 22:26:48 -05:00