Commit Graph

3017 Commits

Author SHA1 Message Date
Antoine Pitrou
18e63fbe64 Issue #7332: Remove the 16KB stack-based buffer in
PyMarshal_ReadLastObjectFromFile, which doesn't bring any noticeable
benefit compared to the dynamic memory allocation fallback.  Patch by
Charles-François Natali.
2010-04-21 22:53:29 +00:00
Antoine Pitrou
72ec2e2bdf 14 years later, we still don't know what it's for.
Spotted by the PyPy developers.

Original commit is:

branch:      trunk
user:        guido
date:        Mon Aug 19 21:32:04 1996 +0200
files:       Python/getargs.c
description:
[svn r6499] Support for keyword arguments (PyArg_ParseTupleAndKeywords) donated by
Geoff Philbrick <philbric@delphi.hks.com> (slightly changed by me).

Also a little change to make the file acceptable to K&R C compilers
(HPUX, SunOS 4.x).
2010-04-06 15:38:25 +00:00
Benjamin Peterson
f5e7b3e826 fix tabs 2010-04-04 23:03:22 +00:00
Benjamin Peterson
1c7c11ef61 give TypeError when trying to set T_STRING_INPLACE 2010-04-03 01:28:57 +00:00
Benjamin Peterson
bea424af98 more _PyString_Resize error checking 2010-04-03 00:57:33 +00:00
Antoine Pitrou
76c8649038 Issue #8276: PyEval_CallObject() is now only available in macro form. The
function declaration, which was kept for backwards compatibility reasons,
is now removed (the macro was introduced in 1997!).
2010-04-01 16:42:11 +00:00
Benjamin Peterson
06638735fc make naming convention consistent 2010-03-25 23:27:16 +00:00
Larry Hastings
402b73fb8d Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
2010-03-25 00:54:54 +00:00
Benjamin Peterson
bb9d726357 take into account keyword arguments when passing too many args 2010-03-21 20:30:30 +00:00
Benjamin Peterson
965458931f improve error message from passing inadequate number of keyword arguments #6474
Note this removes the "non-keyword" or "keyword" phrases from these messages.
2010-03-21 20:21:00 +00:00
Benjamin Peterson
88e7ebac4c co_varnames is certainly a tuple, so let's not waste time finding out 2010-03-21 19:39:52 +00:00
Benjamin Peterson
d51b259b31 remove pointless condition 2010-03-21 19:35:39 +00:00
Benjamin Peterson
56472c2463 flatten condition 2010-03-21 19:24:08 +00:00
Benjamin Peterson
0dee9c1b5c prevent lambda functions from having docstrings #8164 2010-03-17 20:41:42 +00:00
Mark Dickinson
f1ff88f0e4 Fix incorrect error checks in structmember.c (backport of r78920 from py3k). 2010-03-13 14:18:34 +00:00
Victor Stinner
6664426d7c Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt
(SIGINT). If an error occurs while importing the site module, the error is
printed and Python exits. Initialize the GIL before importing the site
module.
2010-03-10 22:30:19 +00:00
Benjamin Peterson
9c4742e6ce more specific exception for wrong kind of raise #8082 2010-03-07 00:00:37 +00:00
Victor Stinner
71fb87e64c Issue #7544: Preallocate thread memory before creating the thread to avoid a
fatal error in low memory condition.
2010-03-03 23:20:25 +00:00
Florent Xicluna
8af970ab58 Revert a nonexistent docstring typo, r42805. 2010-03-03 11:49:53 +00:00
Gregory P. Smith
9e5d1327f8 Issue #7242: On Solaris 9 and earlier calling os.fork() from within a
thread could raise an incorrect RuntimeError about not holding the import
lock.  The import lock is now reinitialized after fork.
2010-03-01 01:22:39 +00:00
Amaury Forgeot d'Arc
adfc80bd81 #4852: Remove dead code in every thread implementation, unused for many years. 2010-02-23 23:19:39 +00:00
Benjamin Peterson
ee46101e68 remove pointless error checking 2010-02-06 19:40:18 +00:00
Benjamin Peterson
565d78586b normalize exceptions passed to the __exit__ method #7853
In Python 2.x, exceptions in finally blocks are not normalized.  Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.

A test for the finalization of generators containing with statements was also
added.
2010-02-05 02:12:14 +00:00
Victor Stinner
b4b0a2935d Issue #7819: Check sys.call_tracing() arguments types.
py3k was already patched by issue #3661.
2010-01-31 22:32:15 +00:00
Eric Smith
ee931b7253 Issue #7766: Change sys.getwindowsversion() return value to a named tuple and add the additional members returned in an OSVERSIONINFOEX structure. The new members are service_pack_major, service_pack_minor, suite_mask, and product_type. 2010-01-27 00:28:29 +00:00