summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Issue #8766: Initialize _warnings module before importing the first module.Victor Stinner2010-05-192-2/+4
| | | | Fix a crash if an empty directory called "encodings" exists in sys.path.
* Issue #8589: Decode PYTHONWARNINGS environment variable with the file systemVictor Stinner2010-05-191-8/+13
| | | | | encoding and surrogateespace error handler instead of the locale encoding to be consistent with os.environ. Add PySys_AddWarnOptionUnicode() function.
* Issue #6697: Fix a crash if sys.stdin or sys.stdout encoding contain a surrogateVictor Stinner2010-05-191-7/+16
| | | | This is *very* unlikely :-)
* Issue #6697: Fix a crash if a keyword contains a surrogateVictor Stinner2010-05-191-6/+9
|
* Issue #6697: Check that _PyUnicode_AsString() result is not NULLVictor Stinner2010-05-191-5/+21
|
* handle_system_exit() flushs files to warranty the output orderVictor Stinner2010-05-171-0/+4
| | | | | | PyObject_Print() writes into the C object stderr, whereas PySys_WriteStderr() writes into the Python object sys.stderr. Each object has its own buffer, so call sys.stderr.flush() and fflush(stderr).
* Merged revisions 81220 via svnmerge fromVictor Stinner2010-05-151-1227/+1227
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81220 | victor.stinner | 2010-05-16 00:55:28 +0200 (dim., 16 mai 2010) | 4 lines Use 4-spaces for indentation (instead of tabs) in pgen outputs Regenerate (reindent) Python/graminit.c ........
* Issue #8715: Create PyUnicode_EncodeFSDefault() function: Encode a UnicodeVictor Stinner2010-05-151-10/+2
| | | | | | object to Py_FileSystemDefaultEncoding with the "surrogateescape" error handler, return a bytes object. If Py_FileSystemDefaultEncoding is not set, fall back to UTF-8.
* Issue #8610: Load file system codec at startup, and display a fatal error onVictor Stinner2010-05-152-22/+51
| | | | | failure. Set the file system encoding to utf-8 (instead of None) if getting the locale encoding failed, or if nl_langinfo(CODESET) function is missing.
* Issue #4653: fix typo in flush_std_files()Victor Stinner2010-05-141-1/+1
| | | | | Don't call sys.stderr.flush() if sys has no stderr attribute or if sys.stderr==None.
* Make PyErr_Occurred return NULL if there is no current thread. Previously itJeffrey Yasskin2010-05-131-3/+8
| | | | | | | would Py_FatalError, which called PyErr_Occurred, resulting in a semi-infinite recursion. Fixes issue 3605.
* Remove unnecessary assignments.Mark Dickinson2010-05-131-4/+1
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-0951-25045/+25045
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 81007 via svnmerge fromJean-Paul Calderone2010-05-091-0/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81007 | jean-paul.calderone | 2010-05-08 16:06:02 -0400 (Sat, 08 May 2010) | 1 line Skip signal handler re-installation if it is not necessary. Issue 8354. ........
* PyErr_SetFromErrnoWithFilename() decodes the filename usingVictor Stinner2010-05-081-1/+1
| | | | PyUnicode_DecodeFSDefault() instead of PyUnicode_FromString()
* err_input(): don't encode/decode the unicode messageVictor Stinner2010-05-081-13/+12
|
* read eval_breaker with atomic api with computed gotosBenjamin Peterson2010-05-031-1/+1
|
* Make (most of) Python's tests pass under Thread Sanitizer.Jeffrey Yasskin2010-05-035-55/+253
| | | | | | | | | | | | | | | | | | http://code.google.com/p/data-race-test/wiki/ThreadSanitizer is a dynamic data race detector that runs on top of valgrind. With this patch, the binaries at http://code.google.com/p/data-race-test/wiki/ThreadSanitizer#Binaries pass many but not all of the Python tests. All of regrtest still passes outside of tsan. I've implemented part of the C1x atomic types so that we can explicitly mark variables that are used across threads, and get defined behavior as compilers advance. I've added tsan's client header and implementation to the codebase in dynamic_annotations.{h,c} (docs at http://code.google.com/p/data-race-test/wiki/DynamicAnnotations). Unfortunately, I haven't been able to get helgrind and drd to give sensible error messages, even when I use their client annotations, so I'm not supporting them.
* prevent the dict constructor from accepting non-string keyword args #8419Benjamin Peterson2010-04-241-0/+15
| | | | | This adds PyArg_ValidateKeywordArguments, which checks that keyword arguments are all strings, using an optimized method if possible.
* Issue #8124: PySys_WriteStdout() and PySys_WriteStderr() don't executeVictor Stinner2010-04-231-2/+45
| | | | | indirectly Python signal handlers anymore because mywrite() ignores exceptions (KeyboardInterrupt).
* Merged revisions 80325 via svnmerge fromAntoine Pitrou2010-04-211-16/+4
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80325 | antoine.pitrou | 2010-04-22 00:53:29 +0200 (jeu., 22 avril 2010) | 6 lines 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. ........
* PEP 3147Barry Warsaw2010-04-172-28/+365
|
* Issue #7316: the acquire() method of lock objects in the :mod:`threading`Antoine Pitrou2010-04-142-27/+107
| | | | | | module now takes an optional timeout argument in seconds. Timeout support relies on the system threading library, so as to avoid a semi-busy wait loop.
* Merged revisions 79837 via svnmerge fromAntoine Pitrou2010-04-061-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79837 | antoine.pitrou | 2010-04-06 17:38:25 +0200 (mar., 06 avril 2010) | 19 lines 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). ........
* Merged revisions 79763 via svnmerge fromBenjamin Peterson2010-04-041-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79763 | benjamin.peterson | 2010-04-04 18:03:22 -0500 (Sun, 04 Apr 2010) | 1 line fix tabs ........
* Merged revisions 79642,79644 via svnmerge fromBenjamin Peterson2010-04-031-1/+5
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79642 | benjamin.peterson | 2010-04-02 20:08:34 -0500 (Fri, 02 Apr 2010) | 1 line split out large test function ........ r79644 | benjamin.peterson | 2010-04-02 20:28:57 -0500 (Fri, 02 Apr 2010) | 1 line give TypeError when trying to set T_STRING_INPLACE ........
* Merged revisions 79555 via svnmerge fromAntoine Pitrou2010-04-011-12/+1
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79555 | antoine.pitrou | 2010-04-01 18:42:11 +0200 (jeu., 01 avril 2010) | 5 lines 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!). ........
* Merged revisions 79428 via svnmerge fromBenjamin Peterson2010-03-251-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79428 | benjamin.peterson | 2010-03-25 18:27:16 -0500 (Thu, 25 Mar 2010) | 1 line make naming convention consistent ........
* Issue #8226: sys.setfilesystemencoding() raises a LookupError if the encodingVictor Stinner2010-03-251-1/+5
| | | | is unknown.
* nest if for clarityBenjamin Peterson2010-03-211-8/+8
|
* count keyword only arguments as part of the totalBenjamin Peterson2010-03-211-2/+2
|
* Merged revisions 78028 via svnmerge fromBenjamin Peterson2010-03-211-3/+0
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78028 | benjamin.peterson | 2010-02-06 13:40:18 -0600 (Sat, 06 Feb 2010) | 1 line remove pointless error checking ........
* cleanup a bitBenjamin Peterson2010-03-211-24/+15
|
* Merged revisions 79205,79219,79228,79230,79232-79233,79235,79237 via ↵Benjamin Peterson2010-03-211-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79205 | benjamin.peterson | 2010-03-21 12:34:54 -0500 (Sun, 21 Mar 2010) | 1 line rewrite a bit ........ r79219 | benjamin.peterson | 2010-03-21 14:24:08 -0500 (Sun, 21 Mar 2010) | 1 line flatten condition ........ r79228 | benjamin.peterson | 2010-03-21 14:35:39 -0500 (Sun, 21 Mar 2010) | 1 line remove pointless condition ........ r79230 | benjamin.peterson | 2010-03-21 14:39:52 -0500 (Sun, 21 Mar 2010) | 1 line co_varnames is certainly a tuple, so let's not waste time finding out ........ r79232 | benjamin.peterson | 2010-03-21 14:54:56 -0500 (Sun, 21 Mar 2010) | 1 line fix import ........ r79233 | benjamin.peterson | 2010-03-21 14:56:37 -0500 (Sun, 21 Mar 2010) | 1 line don't write duplicate tests ........ r79235 | benjamin.peterson | 2010-03-21 15:21:00 -0500 (Sun, 21 Mar 2010) | 4 lines improve error message from passing inadequate number of keyword arguments #6474 Note this removes the "non-keyword" or "keyword" phrases from these messages. ........ r79237 | benjamin.peterson | 2010-03-21 15:30:30 -0500 (Sun, 21 Mar 2010) | 1 line take into account keyword arguments when passing too many args ........
* Merged revisions 79034 via svnmerge fromBenjamin Peterson2010-03-171-0/+5
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79034 | benjamin.peterson | 2010-03-17 15:41:42 -0500 (Wed, 17 Mar 2010) | 1 line prevent lambda functions from having docstrings #8164 ........
* * Replaces the internals of the subprocess module from fork through exec onGregory P. Smith2010-03-141-0/+26
| | | | | | | | | | | | | | | POSIX systems with a C extension module. This is required in order for the subprocess module to be made thread safe. The pure python implementation is retained so that it can continue to be used if for some reason the _posixsubprocess extension module is not available. The unittest executes tests on both code paths to guarantee compatibility. * Moves PyLong_FromPid and PyLong_AsPid from posixmodule.c into longobject.h. Code reviewed by jeffrey.yasskin at http://codereview.appspot.com/223077/show
* Issue #8014: Fix incorrect error checks in structmember.c, and re-enableMark Dickinson2010-03-131-3/+4
| | | | previously failing test_structmember.py tests.
* Issue #6697: use %U format instead of _PyUnicode_AsString(), becauseVictor Stinner2010-03-122-4/+4
| | | | | | _PyUnicode_AsString() was not checked for error (NULL). The unicode string is no more truncated to 200 or 400 *bytes*.
* Merged revisions 78826 via svnmerge fromVictor Stinner2010-03-122-18/+9
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78826 | victor.stinner | 2010-03-10 23:30:19 +0100 (mer., 10 mars 2010) | 5 lines 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. ........
* fix bootstrapping on machines with only 2.x installedBenjamin Peterson2010-03-111-1/+1
|
* convert shebang lines: python -> python3Benjamin Peterson2010-03-111-1/+1
|
* prevent generator finalization from invalidating sys.exc_info() #7173Benjamin Peterson2010-03-071-1/+1
|
* Merged revisions 78638 via svnmerge fromVictor Stinner2010-03-031-5/+24
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78638 | victor.stinner | 2010-03-04 00:20:25 +0100 (jeu., 04 mars 2010) | 3 lines Issue #7544: Preallocate thread memory before creating the thread to avoid a fatal error in low memory condition. ........
* Merged revisions 78620 via svnmerge fromFlorent Xicluna2010-03-031-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78620 | florent.xicluna | 2010-03-03 12:49:53 +0100 (mer, 03 mar 2010) | 2 lines Revert a nonexistent docstring typo, r42805. ........
* Merged revisions 78527,78550 via svnmerge fromGregory P. Smith2010-03-011-4/+8
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78527 | gregory.p.smith | 2010-02-28 17:22:39 -0800 (Sun, 28 Feb 2010) | 4 lines 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. ........ r78550 | gregory.p.smith | 2010-02-28 22:01:02 -0800 (Sun, 28 Feb 2010) | 2 lines Fix test to be skipped on windows. ........
* Strip out trailing whitespace.Brett Cannon2010-03-011-19/+19
|
* check PyDict_New() for errorBenjamin Peterson2010-02-271-6/+6
|
* only accept AttributeError as indicating no __prepare__ attribute on a ↵Benjamin Peterson2010-02-271-2/+10
| | | | metaclass, allowing lookup errors to propogate
* Merged revisions 78393 via svnmerge fromAmaury Forgeot d'Arc2010-02-2410-464/+24
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78393 | amaury.forgeotdarc | 2010-02-24 00:19:39 +0100 (mer., 24 févr. 2010) | 2 lines #4852: Remove dead code in every thread implementation, unused for many years. ........
* #4532: fixes to make 3.x compile on QNX 6.3.2 (reported by Matt Kraai)Andrew M. Kuchling2010-02-221-1/+1
|