Commit Graph

2792 Commits

Author SHA1 Message Date
Benjamin Peterson
80f0ed5bb1 allow keyword args to be passed in after *args #3473 2008-08-19 19:52:46 +00:00
Benjamin Peterson
08336e30ad follup to #3473: don't duplicate the reduce code 2008-08-18 02:01:21 +00:00
Benjamin Peterson
25f2d89f32 uhh PySTEntry->ste_unoptimized has to be exposed too 2008-08-17 02:23:43 +00:00
Benjamin Peterson
e0d4c7b5bd expose PySTEntry.nested so the symtable module will work 2008-08-17 01:09:17 +00:00
Benjamin Peterson
e0d12eb85c PySTEntry's constructor is static; there's no point in a fancy API name 2008-08-16 23:29:40 +00:00
Benjamin Peterson
0847332716 include filename and line number in SyntaxError 2008-08-16 22:11:33 +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
Brett Cannon
3aa2a49ec9 Add imp.reload(). This to help with transitioning to 3.0 the reload() built-in
has been removed there.
2008-08-06 22:28:09 +00:00
Gregory P. Smith
d868be8805 Adds a sanity check to avoid a *very rare* infinite loop due to a corrupt tls
key list data structure in the thread startup path.

This change is a companion to r60148 which already successfully dealt with a
similar issue on thread shutdown.

In particular this loop has been observed happening from this call path:
 #0  in find_key ()
 #1  in PyThread_set_key_value ()
 #2  in _PyGILState_NoteThreadState ()
 #3  in PyThreadState_New ()
 #4  in t_bootstrap ()
 #5  in pthread_start_thread ()

I don't know how this happens but it does, *very* rarely.  On more than
one hardware platform.  I have not been able to reproduce it manually.
(A flaky mutex implementation on the system in question is one hypothesis).

As with r60148, the spinning we managed to observe in the wild was due to a
single list element pointing back upon itself.
2008-08-04 07:33:37 +00:00
Amaury Forgeot d'Arc
39fd672dfe #3479: unichr(2**32) used to return u'\x00'.
The argument was fetched in a long, but PyUnicode_FromOrdinal takes an int.

(why doesn't gcc issue a truncation warning in this case?)
2008-07-31 21:28:03 +00:00
Amaury Forgeot d'Arc
246daedd11 #2542: now that issubclass() may call arbitrary code,
make sure that PyErr_ExceptionMatches returns 0 when an exception occurs there.
2008-07-31 00:42:16 +00:00
Antoine Pitrou
c2cc80c64e Raymond's patch for #1819: speedup function calls with named parameters
(35% faster according to pybench)
2008-07-25 22:13:52 +00:00
Georg Brandl
1ad108db05 #3378: in case of no memory, don't leak even more memory. :) 2008-07-19 10:08:55 +00:00
Eric Smith
f032a00271 Fix issue 3411: default float format spec fails on negative numbers. 2008-07-19 00:24:05 +00:00
Jesse Noller
5e62ca4fea Apply patch for 874900: threading module can deadlock after fork 2008-07-16 20:03:47 +00:00
Mark Dickinson
64b7e501f4 Issue #3360: Fix incorrect parsing of "020000000000.0". 2008-07-16 09:40:03 +00:00
Nick Coghlan
b028f50911 Fix issue 3221 by emitting a RuntimeWarning instead of raising SystemError when the parent module can't be found during an absolute import (likely due to non-PEP 361 aware code which sets a module level __package__ attribute) 2008-07-13 14:52:36 +00:00
Amaury Forgeot d'Arc
2252d11c08 #3342: In tracebacks, printed source lines were not indented since r62555.
#3343: Py_DisplaySourceLine should be a private function. Rename it to _Py_DisplaySourceLine.
2008-07-11 21:45:06 +00:00
Robert Schuppenies
4762902998 Added garbage collector overhead and optional default return value to
sys.getsizeof.
2008-07-10 17:13:55 +00:00
Robert Schuppenies
d2cd86ddd5 Fixed Issue3122 and extended sys.getsizeof tests for built-in types. 2008-07-10 13:43:26 +00:00
Gregory P. Smith
2fe77060eb - Issue #2862: Make int and float freelist management consistent with other
freelists.  Changes their CompactFreeList apis into ClearFreeList apis and
  calls them via gc.collect().
2008-07-06 03:35:58 +00:00
Georg Brandl
3c0fd5616f Fix tabs. 2008-07-05 10:07:18 +00:00
Raymond Hettinger
afae11ea88 Update comment on prediction macros. 2008-07-05 02:11:55 +00:00
Georg Brandl
aa76d77e2b Add a comment about incref'ing w. 2008-07-01 20:56:03 +00:00
Amaury Forgeot d'Arc
bdd941fac3 #3242: fix a crash in "print", if sys.stdout is set to a custom object,
whose write() method installs another sys.stdout.

Will backport.
2008-07-01 20:38:04 +00:00