Commit Graph

4807 Commits

Author SHA1 Message Date
Benjamin Peterson 6624a9fddd #4048 make the parser module accept relative imports as valid 2008-11-03 15:14:51 +00:00
Benjamin Peterson dcee09d920 make sure the parser flags and passed onto the compiler
This fixes "from __future__ import unicode_literals" in an exec statment
See #4225
2008-10-31 02:16:05 +00:00
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 69a9c5b539 Issue #4176: Pickle would crash the interpreter when a __reduce__ function
does not return an iterator for the 4th and 5th items.
(sequence-like and mapping-like state)

A list is not an iterator...

Will backport to 2.6 and 2.5.
2008-10-30 21:18:34 +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
Benjamin Peterson 336680ecea fix more possible ref leaks in _json and use Py_CLEAR 2008-10-16 21:48:06 +00:00
Benjamin Peterson 87e6ad290b fix possible ref leak 2008-10-16 21:27:54 +00:00
Benjamin Peterson 595e3cbb3d check for error conditions in _json #3623 2008-10-16 21:09:28 +00:00
Hirokazu Yamamoto 61376409a9 removed unused _PyUnicode_FromFileSystemEncodedObject.
made win32_chdir, win32_wchdir static.
2008-10-16 06:25:25 +00:00
Amaury Forgeot d'Arc 07d539d08b #4122: On Windows, Py_UNICODE_ISSPACE cannot be used in an extension module:
compilation fails with "undefined reference to _Py_ascii_whitespace"

Will backport to 2.6.
2008-10-14 21:47:22 +00:00
Hirokazu Yamamoto 6c75a30712 r66862 contained memory leak. 2008-10-09 10:11:21 +00:00
Hirokazu Yamamoto 10a018c285 On windows, os.chdir given unicode was not working if GetCurrentDirectoryW
returned a path longer than MAX_PATH. (But It's doubtful this code path is
really executed because I cannot move to such directory on win2k)
2008-10-09 10:00:30 +00:00
Georg Brandl f3776a17ef #3935: properly support list subclasses in the C impl. of bisect.
Patch reviewed by Raymond.
2008-10-08 18:47:17 +00:00
Andrew M. Kuchling 658c45fd3b Docstring typo. 2008-10-03 12:26:42 +00:00
Christian Heimes 32a66a0410 Fixed a couple more C99 comments and one occurence of inline. 2008-10-02 19:47:50 +00:00
Brett Cannon f40200b214 Fix a refleak introduced by r66677.
Fix suggested by Amaury Forgeot d'Arc.
Closes issue #4003.
2008-09-30 17:46:03 +00:00
Benjamin Peterson 0225248033 Victor Stinner's patches to check the return result of PyLong_Ssize_t
reviewed by Amaury
2008-09-30 02:11:07 +00:00
Benjamin Peterson 8d77d448a5 fix security issue 2: imageop's poor validation of arguments could result in segfaults
patch by Victor Stinner
reviewed by myself and Brett
2008-09-30 01:31:49 +00:00
Thomas Heller e144873071 Fix issue #3547 for MingW, update comments. 2008-09-29 19:56:24 +00:00
Brett Cannon b2d61bde28 The _lsprof module could crash the interpreter if it was given an external
timer that did not return a float and a timer was still running when the
Profiler object was garbage collected.

Fixes issue 3895.
Code review by Benjamin Peterson.
2008-09-29 03:41:21 +00:00
Jesus Cea 09c0178242 bsddb4.7.3pre9 renamed to 4.7.3 2008-09-28 23:24:19 +00:00
Thomas Heller a85c95d5e8 Fix issue #3547: ctypes is confused by bitfields of varying integer types
Reviewed by Fredrik Lundh and Skip Montanaro.
2008-09-24 18:26:05 +00:00
Jesus Cea 5cd5f12a48 Bugfix for issue3885 and 'DB.verify()' crash.
Reviewed by Nick Coghlan.
2008-09-23 18:54:08 +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
Georg Brandl a438c85a88 #3897: _collections now has an underscore. 2008-09-21 07:31:52 +00:00
Georg Brandl 2f3bd8364a #3852: fix some select.kqueue and kevent docs. 2008-09-21 07:14:44 +00:00
Benjamin Peterson fbb388b39b tabify 2008-09-18 23:20:28 +00:00
Benjamin Peterson 8c2b7dc463 fix possible integer overflows in _hashopenssl #3886 2008-09-18 01:22:16 +00:00
Gerhard Häring e6872eb417 Issue #3846: Release GIL during calls to sqlite3_prepare. This improves concurrent access to the same database file from multiple threads/processes. 2008-09-12 22:33:22 +00:00
Gerhard Häring 6e1afcf988 Fixes issue #3103. In the sqlite3 module, made one more function static. All renaming public symbos now have the pysqlite prefix to avoid name clashes. This at least once created problems where the same symbol name appeared somewhere in Apache and the sqlite3 module was used from mod_python. 2008-09-12 18:58:57 +00:00
Gerhard Häring ef2276b60d sqlite3 module: Mark iterdump() method as "Non-standard" like all the other methods not found in DB-API. 2008-09-12 13:54:06 +00:00
Amaury Forgeot d'Arc 24cb382455 #3640: Correct a crash in cPickle on 64bit platforms, in the case of deeply nested lists or dicts.
Reviewed by Martin von Loewis.
2008-09-11 20:56:13 +00:00
Amaury Forgeot d'Arc 05e344954d #3743: PY_FORMAT_SIZE_T is designed for the OS "printf" functions, not for
PyString_FromFormat which has an independent implementation, and uses "%zd".

This makes a difference on win64, where printf needs "%Id" to display
64bit values. For example, queue.__repr__ was incorrect.

Reviewed by Martin von Loewis.
2008-09-10 22:04:45 +00:00
Guido van Rossum e3c4fd9cc0 - Issue #3629: Fix sre "bytecode" validator for an end case.
Reviewed by Amaury.
2008-09-10 14:27:00 +00:00
Martin v. Löwis 24329ba176 Issue #3811: The Unicode database was updated to 5.1.
Reviewed by Fredrik Lundh and Marc-Andre Lemburg.
2008-09-10 13:38:12 +00:00
Jesus Cea 69acb43327 Python3.0 bsddb testsuite compatibility improvements 2008-09-03 22:07:11 +00:00
Jesse Noller b814d6a704 Fix issue 3110 - solaris compilation of multiprocessing fails, reviewed by pitrou 2008-09-03 18:10:30 +00:00
Jesus Cea ac25fab12f Fix some leaks - Neal Norwitz 2008-09-03 17:50:32 +00:00
Jesus Cea 3b6be74304 Improve compatibility with Python3.0 testsuite 2008-09-02 02:29:06 +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
Jesus Cea 4907d27c1f Update bsddb code to version 4.7.3pre2. This code should
be compatible with Python 3.0, also.

  http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.7.3
2008-08-31 14:00:51 +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
Benjamin Peterson 37346b2b9b #3643 add a few more checks to _testcapi to prevent segfaults
Author: Victor Stinner
Reviewer: Benjamin Peterson
2008-08-23 20:27:43 +00:00
Christian Heimes 94a730540a d is the correct format string 2008-08-22 21:23:47 +00:00
Christian Heimes 1cc69636ef Fixed two format strings in the _collections module. For example
Modules/_collectionsmodule.c:674: warning: format '%i' expects type 'int', but argument 2 has type 'Py_ssize_t'
Reviewed by Benjamin Peterson
2008-08-22 20:10:27 +00:00
Christian Heimes a27a62e74c Silenced a compiler warning in the sqlite module
Modules/_sqlite/row.c:187: warning: suggest parentheses around && within ||
Reviewed by Benjamin Peterson
2008-08-22 19:55:54 +00:00
Guido van Rossum 93ebfb1544 Issue 1179: [CVE-2007-4965] Integer overflow in imageop module. 2008-08-19 21:02:04 +00:00
Thomas Heller d9ccf8c547 COM method code is windows specific 2008-08-19 19:40:23 +00:00
Thomas Heller 0ad5ae02af Fix a regression introduced by rev. 63792: ctypes function pointers
that are COM methods must have a boolean True value.
2008-08-19 19:25:04 +00:00