Commit Graph

13 Commits

Author SHA1 Message Date
Christian Heimes ab5f879022 Issue #4237: io.FileIO() was raising invalid warnings caused by insufficient initialization of PyFileIOObject struct members. 2008-10-30 21:26:15 +00:00
Amaury Forgeot d'Arc 9f616f48ca Correct error message in io.open():
closefd=True is the only accepted value with a file name.
2008-10-29 23:15:57 +00:00
Hirokazu Yamamoto 09979a137a Issue #3945: Fixed compile error on cygwin. (initializer element is not constant)
Reviewed by Amaury Forgeot d'Arc.
2008-09-23 16:11:09 +00:00
Benjamin Peterson f22c26ecf4 #3703 unhelpful _fileio.FileIO error message when trying to open a directory
Reviewer: Gregory P. Smith
2008-09-01 14:13:43 +00:00
Neal Norwitz 901e4715bd #3662: Fix segfault introduced when fixing memory leaks.
TESTED=./python -E -tt ./Lib/test/regrtest.py test_fileio
R (approach from bug)=Amaury and Benjamin
2008-08-24 22:03:05 +00:00
Neal Norwitz 18aa388ca0 Fix:
* crashes on memory allocation failure found with failmalloc
 * memory leaks found with valgrind
 * compiler warnings in opt mode which would lead to invalid memory reads
 * problem using wrong name in decimal module reported by pychecker

Update the valgrind suppressions file with new leaks that are small/one-time
leaks we don't care about (ie, they are too hard to fix).

TBR=barry
TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes)
  in opt mode:
  valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \
    ./python -E -tt ./Lib/test/regrtest.py -uall,-bsddb,-compiler \
                        -x test_logging test_ssl test_multiprocessing
  valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \
    ./python -E -tt ./Lib/test/regrtest.py test_multiprocessing
  for i in `seq 1 4000` ; do
    LD_PRELOAD=~/local/lib/libfailmalloc.so FAILMALLOC_INTERVAL=$i \
        ./python -c pass
  done

At least some of these fixes should probably be backported to 2.5.
2008-08-24 05:04:52 +00:00
Martin v. Löwis f91d46a17d Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,
by denying s# to parse objects that have a releasebuffer procedure,
and introducing s*.

More module might need to get converted to use s*.
2008-08-12 14:49:50 +00:00
Gregory P. Smith eb77fe4cbf fix issue3304 - remove an incorrect PyMem_Free in fileio_init 2008-07-06 17:06:29 +00:00
Gregory P. Smith dd96db63f6 This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase.  The PyBytes_* names
in the spirit of 3.0 are available via a #define only.  See the email thread.
2008-06-09 04:58:54 +00:00
Christian Heimes 593daf545b Renamed PyString to PyBytes 2008-05-26 12:51:38 +00:00
Alexandre Vassalotti 1aed624f7c Backport fast alternate io.BytesIO implementation.
Merged r62778, r62779, r62802, r62806, r62807, r62808, r62809, r62844,
r62846, r62952, r62956.
2008-05-09 21:49:43 +00:00
Brett Cannon 10ed0f50a9 Remove all traces of HAVE_STRERROR.
The removal of strerror.c led to the function check being removed from
configure.in.
2008-03-18 15:35:58 +00:00
Christian Heimes 7f39c9fcbb Backport of several functions from Python 3.0 to 2.6 including PyUnicode_FromString, PyUnicode_Format and PyLong_From/AsSsize_t. The functions are partly required for the backport of the bytearray type and _fileio module. They should also make it easier to port C to 3.0.
First chapter of the Python 3.0 io framework back port: _fileio
The next step depends on a working bytearray type which itself depends on a backport of the nwe buffer API.
2008-01-25 12:18:43 +00:00