summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* alias PyUnicode_CompareWithASCIIBenjamin Peterson2010-05-071-0/+2
|
* Make (most of) Python's tests pass under Thread Sanitizer.Jeffrey Yasskin2010-05-034-2/+685
| | | | | | | | | | | | | | | | | | 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-242-0/+2
| | | | | This adds PyArg_ValidateKeywordArguments, which checks that keyword arguments are all strings, using an optimized method if possible.
* Issue #8485: PyUnicode_FSConverter() doesn't accept bytearray object anymore,Victor Stinner2010-04-221-2/+2
| | | | you have to convert your bytearray filenames to bytes
* Merged revisions 80178 via svnmerge fromRonald Oussoren2010-04-181-1/+10
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80178 | ronald.oussoren | 2010-04-18 15:47:49 +0200 (Sun, 18 Apr 2010) | 2 lines Fix for issue #7072 ........
* Move _Py_char2wchar from python.c to main.c.Ronald Oussoren2010-04-181-1/+1
| | | | | | | This fixes issue #8441: python.c is not included in the framework while main.c is and without this patch you get a link error when building Python.framework on OSX.
* Fix the --with-cxx-main build.Collin Winter2010-04-171-0/+6
|
* PEP 3147Barry Warsaw2010-04-171-0/+3
|
* Issue #7316: the acquire() method of lock objects in the :mod:`threading`Antoine Pitrou2010-04-141-0/+35
| | | | | | 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.
* #7301: decode $PYTHONWARNINGS in the same way as argv, test non-ascii valuesPhilip Jenvey2010-04-141-0/+3
|
* Merged revisions 79555 via svnmerge fromAntoine Pitrou2010-04-011-4/+0
| | | | | | | | | | | | 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 79060 via svnmerge fromCollin Winter2010-03-181-0/+1
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79060 | collin.winter | 2010-03-18 14:54:01 -0700 (Thu, 18 Mar 2010) | 4 lines Add support for weak references to code objects. This will be used by an optimization in the incoming Python 3 JIT. Patch by Reid Kleckner! ........
* Change PARSE_PID to _Py_PARSE_PID (cleanup for r78946).Gregory P. Smith2010-03-141-3/+3
|
* * Replaces the internals of the subprocess module from fork through exec onGregory P. Smith2010-03-143-0/+23
| | | | | | | | | | | | | | | 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
* Merged revisions 78638 via svnmerge fromVictor Stinner2010-03-031-0/+2
| | | | | | | | | | | 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 78393 via svnmerge fromAmaury Forgeot d'Arc2010-02-241-9/+0
| | | | | | | | | | 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. ........
* Issue #5988: Delete deprecated functions PyOS_ascii_formatd, ↵Eric Smith2010-02-221-3/+0
| | | | PyOS_ascii_strtod, and PyOS_ascii_atof.
* Merged revisions 78189 via svnmerge fromMark Dickinson2010-02-141-4/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78189 | mark.dickinson | 2010-02-14 13:40:30 +0000 (Sun, 14 Feb 2010) | 1 line Silence more 'comparison between signed and unsigned' warnings. ........
* Merged revisions 77842 via svnmerge fromMark Dickinson2010-01-301-0/+1
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77842 | mark.dickinson | 2010-01-30 10:08:33 +0000 (Sat, 30 Jan 2010) | 4 lines Issue #7767: Add new C-API function PyLong_AsLongLongAndOverflow, a long long variant of PyLong_AsLongAndOverflow. Patch by Case Van Horsen. ........
* Merged revisions 77581 via svnmerge fromAntoine Pitrou2010-01-171-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77581 | antoine.pitrou | 2010-01-17 16:55:45 +0100 (dim., 17 janv. 2010) | 3 lines Use PyAPI_DATA. ........
* Merged revisions 77573 via svnmerge fromAntoine Pitrou2010-01-171-1/+5
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77573 | antoine.pitrou | 2010-01-17 13:26:20 +0100 (dim., 17 janv. 2010) | 6 lines Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`) could crash in many places because of the PyByteArray_AS_STRING() macro returning NULL. The macro now returns a statically allocated empty string instead. ........
* Merged revisions 77234 via svnmerge fromMark Dickinson2010-01-021-7/+7
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77234 | mark.dickinson | 2010-01-02 14:45:40 +0000 (Sat, 02 Jan 2010) | 7 lines Refactor some longobject internals: PyLong_AsDouble and _PyLong_AsScaledDouble (the latter renamed to _PyLong_Frexp) now use the same core code. The exponent produced by _PyLong_Frexp now has type Py_ssize_t instead of the previously used int, and no longer needs scaling by PyLong_SHIFT. This frees the math module from having to know anything about the PyLong implementation. This closes issue #5576. ........
* Merged revisions 77088 via svnmerge fromGeorg Brandl2009-12-281-2/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77088 | georg.brandl | 2009-12-28 09:34:58 +0100 (Mo, 28 Dez 2009) | 1 line #7033: add new API function PyErr_NewExceptionWithDoc, for easily giving new exceptions a docstring. ........
* Merged revisions 76978 via svnmerge fromMark Dickinson2009-12-211-19/+3
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76978 | mark.dickinson | 2009-12-21 15:22:00 +0000 (Mon, 21 Dec 2009) | 3 lines Issue #7518: Move substitute definitions of C99 math functions from pymath.c to Modules/_math.c. ........
* Merged revisions 76822,76824 via svnmerge fromBenjamin Peterson2009-12-131-1/+1
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76822 | benjamin.peterson | 2009-12-13 15:21:43 -0600 (Sun, 13 Dec 2009) | 1 line initialize to NULL ........ r76824 | benjamin.peterson | 2009-12-13 15:27:53 -0600 (Sun, 13 Dec 2009) | 1 line add a test of loading the datetime capi ........
* Merged revisions 76740 via svnmerge fromMark Dickinson2009-12-101-2/+2
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76740 | mark.dickinson | 2009-12-10 10:36:32 +0000 (Thu, 10 Dec 2009) | 8 lines Replace the size check for PyMem_MALLOC and PyMem_REALLOC with an almost equivalent[*] check that doesn't produce compiler warnings about a 'x < 0' check on an unsigned type. [*] it's equivalent for inputs of type size_t or Py_ssize_t, or any smaller unsigned or signed integer type. ........
* Merged revisions 76712 via svnmerge fromRonald Oussoren2009-12-081-2/+4
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76712 | ronald.oussoren | 2009-12-08 17:32:52 +0100 (Tue, 08 Dec 2009) | 4 lines Fix for issue 7452: HAVE_GCC_ASM_FOR_X87 gets set when doing a universal build on an i386 based machine, but should only be active when compiling the x86 part of the universal binary. ........
* Merged revisions 76623 via svnmerge fromRonald Oussoren2009-12-011-0/+6
| | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76623 | ronald.oussoren | 2009-12-01 16:54:01 +0100 (Tue, 01 Dec 2009) | 9 lines Fix for issue #7416: SIZEOF_UINTPTR_T can be invalid when configuring a multi-architecture build (in particular when the architectures don't share a common pointer size). Fixed the same issue for SIZEOF_PTHREAD_T. (No update to the NEWS file because this is a bugfix for an as yet unreleased feature) ........
* Merged revisions 76561 via svnmerge fromMark Dickinson2009-11-281-0/+4
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76561 | mark.dickinson | 2009-11-28 12:30:36 +0000 (Sat, 28 Nov 2009) | 5 lines Include ieeefp.h (when available) in pyport.h instead of individually in Objects/floatobject.c and Objects/complexobject.c. This should silence compiler warnings about implicit declaration of the 'finite' function on Solaris. ........
* Merged revisions 76308 via svnmerge fromMark Dickinson2009-11-161-0/+16
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76308 | mark.dickinson | 2009-11-15 16:18:58 +0000 (Sun, 15 Nov 2009) | 3 lines Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString, PyFormat_FromStringV and PyErr_Format. ........
* Merge in the new GIL.Antoine Pitrou2009-11-103-5/+6
|
* Issue 7147 - remove ability to attempt to build Python without complex ↵Skip Montanaro2009-10-181-2/+0
| | | | number support (was broken anyway)
* Merged revisions 74841 via svnmerge fromBenjamin Peterson2009-10-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74841 | thomas.wouters | 2009-09-16 14:55:54 -0500 (Wed, 16 Sep 2009) | 23 lines Fix issue #1590864, multiple threads and fork() can cause deadlocks, by acquiring the import lock around fork() calls. This prevents other threads from having that lock while the fork happens, and is the recommended way of dealing with such issues. There are two other locks we care about, the GIL and the Thread Local Storage lock. The GIL is obviously held when calling Python functions like os.fork(), and the TLS lock is explicitly reallocated instead, while also deleting now-orphaned TLS data. This only fixes calls to os.fork(), not extension modules or embedding programs calling C's fork() directly. Solving that requires a new set of API functions, and possibly a rewrite of the Python/thread_*.c mess. Add a warning explaining the problem to the documentation in the mean time. This also changes behaviour a little on AIX. Before, AIX (but only AIX) was getting the import lock reallocated, seemingly to avoid this very same problem. This is not the right approach, because the import lock is a re-entrant one, and reallocating would do the wrong thing when forking while holding the import lock. Will backport to 2.6, minus the tiny AIX behaviour change. ........
* http://bugs.python.org/issue6836Kristján Valur Jónsson2009-09-282-3/+10
| | | | Merging revisions 75103,75104 from trunk to py3k
* fix an ambiguity in the grammar from the implementation of extended unpackingBenjamin Peterson2009-09-271-63/+63
| | | | | | | (one which was strangely "resolved" by pgen) This also kills the unused testlist1 rule and fixes parse tree validation of extended unpacking.
* Issue #6713: Improve performance of str(n) and repr(n) for integers nMark Dickinson2009-09-161-0/+4
| | | | | (up to 3.1 times faster in tests), by special-casing base 10 in _PyLong_Format.
* Merged revisions 74693 via svnmerge fromMark Dickinson2009-09-061-1/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74693 | mark.dickinson | 2009-09-06 22:21:05 +0100 (Sun, 06 Sep 2009) | 2 lines Issue #6848: Fix curses module build failure on OS X 10.6. ........
* Issue #6151: Make PyDescr_COMMON conform to standard C.Alexandre Vassalotti2009-07-221-6/+8
|
* Merged revisions 72487-72488,72879 via svnmerge fromAlexandre Vassalotti2009-07-212-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72487 | jeffrey.yasskin | 2009-05-08 17:51:06 -0400 (Fri, 08 May 2009) | 7 lines PyCode_NewEmpty: Most uses of PyCode_New found by http://www.google.com/codesearch?q=PyCode_New are trying to build an empty code object, usually to put it in a dummy frame object. This patch adds a PyCode_NewEmpty wrapper which lets the user specify just the filename, function name, and first line number, instead of also requiring lots of code internals. ........ r72488 | jeffrey.yasskin | 2009-05-08 18:23:21 -0400 (Fri, 08 May 2009) | 13 lines Issue 5954, PyFrame_GetLineNumber: Most uses of PyCode_Addr2Line (http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get the line number of a specified frame, but there's no way to do that directly. Forcing people to go through the code object makes them know more about the guts of the interpreter than they should need. The remaining uses of PyCode_Addr2Line seem to be getting the line from a traceback (for example, http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line), which is replaced by the tb_lineno field. So we may be able to deprecate PyCode_Addr2Line entirely for external use. ........ r72879 | jeffrey.yasskin | 2009-05-23 19:23:01 -0400 (Sat, 23 May 2009) | 14 lines Issue #6042: lnotab-based tracing is very complicated and isn't documented very well. There were at least 3 comment blocks purporting to document co_lnotab, and none did a very good job. This patch unifies them into Objects/lnotab_notes.txt which tries to completely capture the current state of affairs. I also discovered that we've attached 2 layers of patches to the basic tracing scheme. The first layer avoids jumping to instructions that don't start a line, to avoid problems in if statements and while loops. The second layer discovered that jumps backward do need to trace at instructions that don't start a line, so it added extra lnotab entries for 'while' and 'for' loops, and added a special case for backward jumps within the same line. I replaced these patches by just treating forward and backward jumps differently. ........
* remove duplicate declartions #6405Benjamin Peterson2009-07-031-2/+0
|
* a little more fiddling to make flags like 2.xBenjamin Peterson2009-07-022-1/+3
|
* the old CO_FUTURE flags can't be commented outBenjamin Peterson2009-07-022-3/+3
|
* remove comment about PyNumber_IntBenjamin Peterson2009-07-011-6/+0
|
* remove PyCObjectBenjamin Peterson2009-07-012-62/+0
|
* Merged revisions 73701 via svnmerge fromMark Dickinson2009-06-301-0/+6
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73701 | mark.dickinson | 2009-06-30 16:32:30 +0100 (Tue, 30 Jun 2009) | 3 lines Issue #6347: Add inttypes.h to the pyport.h #includes; fixes a build failure on HP-UX 11.00. ........
* Merged revisions 73660 via svnmerge fromMark Dickinson2009-06-282-8/+0
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73660 | mark.dickinson | 2009-06-28 23:37:13 +0100 (Sun, 28 Jun 2009) | 1 line Remove unused stdint.h includes ........
* Merged revisions ↵Benjamin Peterson2009-06-282-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73376 | benjamin.peterson | 2009-06-11 17:29:23 -0500 (Thu, 11 Jun 2009) | 1 line remove check for case handled in sub-function ........ r73393 | alexandre.vassalotti | 2009-06-12 13:56:57 -0500 (Fri, 12 Jun 2009) | 2 lines Clear reference to the static PyExc_RecursionErrorInst in _PyExc_Fini. ........ r73398 | alexandre.vassalotti | 2009-06-12 15:57:12 -0500 (Fri, 12 Jun 2009) | 3 lines Add const qualifier to PyErr_SetFromErrnoWithFilename and to PyErr_SetFromErrnoWithUnicodeFilename. ........ r73400 | alexandre.vassalotti | 2009-06-12 16:43:47 -0500 (Fri, 12 Jun 2009) | 2 lines Delete outdated make file for building the parser with MSVC 6. ........ r73404 | benjamin.peterson | 2009-06-12 20:40:00 -0500 (Fri, 12 Jun 2009) | 1 line keep the slice.step field as NULL if no step expression is given ........ r73405 | benjamin.peterson | 2009-06-12 22:46:30 -0500 (Fri, 12 Jun 2009) | 1 line prevent import statements from assigning to None ........ r73409 | benjamin.peterson | 2009-06-13 08:06:21 -0500 (Sat, 13 Jun 2009) | 1 line allow importing from a module named None if it has an 'as' clause ........ r73419 | benjamin.peterson | 2009-06-13 11:19:19 -0500 (Sat, 13 Jun 2009) | 1 line set Print.values to NULL if there are no values ........ r73420 | benjamin.peterson | 2009-06-13 12:08:53 -0500 (Sat, 13 Jun 2009) | 1 line give a better error message when deleting () ........ r73421 | benjamin.peterson | 2009-06-13 15:23:33 -0500 (Sat, 13 Jun 2009) | 1 line when no module is given in a 'from' relative import, make ImportFrom.module NULL ........ r73432 | amaury.forgeotdarc | 2009-06-14 16:20:40 -0500 (Sun, 14 Jun 2009) | 3 lines #6227: Because of a wrong indentation, the test was not testing what it should. Ensure that the snippet in doctest_aliases actually contains aliases. ........ r73457 | benjamin.peterson | 2009-06-16 18:13:09 -0500 (Tue, 16 Jun 2009) | 1 line add underscores ........ r73460 | benjamin.peterson | 2009-06-16 22:23:04 -0500 (Tue, 16 Jun 2009) | 1 line remove unused 'encoding' member from the compiler struct ........ r73485 | benjamin.peterson | 2009-06-19 17:07:47 -0500 (Fri, 19 Jun 2009) | 1 line remove duplicate test ........ r73486 | benjamin.peterson | 2009-06-19 17:09:17 -0500 (Fri, 19 Jun 2009) | 1 line add missing assertion #6313 ........ r73488 | benjamin.peterson | 2009-06-19 17:16:28 -0500 (Fri, 19 Jun 2009) | 1 line show that this one isn't used ........ r73489 | benjamin.peterson | 2009-06-19 17:21:12 -0500 (Fri, 19 Jun 2009) | 1 line use closures ........ r73501 | benjamin.peterson | 2009-06-21 18:01:07 -0500 (Sun, 21 Jun 2009) | 1 line don't need to add the name 'lambda' as assigned ........ r73502 | benjamin.peterson | 2009-06-21 18:03:36 -0500 (Sun, 21 Jun 2009) | 1 line remove tmpname support since it's no longer used ........ r73513 | benjamin.peterson | 2009-06-22 20:18:57 -0500 (Mon, 22 Jun 2009) | 1 line fix grammar ........ r73514 | benjamin.peterson | 2009-06-22 22:01:56 -0500 (Mon, 22 Jun 2009) | 1 line remove some unused symtable constants ........
* Merged revisions 72912,72920,72940 via svnmerge fromBenjamin Peterson2009-06-281-1/+3
| | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72912 | benjamin.peterson | 2009-05-25 08:13:44 -0500 (Mon, 25 May 2009) | 5 lines add a SETUP_WITH opcode It speeds up the with statement and correctly looks up the special methods involved. ........ r72920 | benjamin.peterson | 2009-05-25 15:12:57 -0500 (Mon, 25 May 2009) | 1 line take into account the fact that SETUP_WITH pushes a finally block ........ r72940 | benjamin.peterson | 2009-05-26 07:49:59 -0500 (Tue, 26 May 2009) | 1 line teach the peepholer about SETUP_WITH ........
* fix mistake in version bumpBenjamin Peterson2009-06-271-2/+2
|
* bump to 3.2a0Benjamin Peterson2009-06-271-2/+2
|