summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Re-apply patch #1700288 (first applied in r59931, rolled back in r59940)Amaury Forgeot d'Arc2008-01-141-0/+8
| | | | | | now that ctypes uses a more supported method to create types: Method cache optimization, by Armin Rigo, ported to 2.6 by Kevin Jacobs.
* Back out r59931 - test_ctypes fails with it.Georg Brandl2008-01-131-8/+0
|
* Patch #1700288: Method cache optimization, by Armin Rigo, ported toGeorg Brandl2008-01-121-0/+8
| | | | 2.6 by Kevin Jacobs.
* Patch #602345 by Neal Norwitz and me: add -B option and ↵Georg Brandl2008-01-071-0/+1
| | | | PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
* Modified PyImport_Import and PyImport_ImportModule to always use absolute ↵Christian Heimes2008-01-032-5/+2
| | | | | | imports by calling __import__ with an explicit level of 0 Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
* Some build bots don't compile mathmodule. There is an issue with the long ↵Christian Heimes2008-01-031-2/+9
| | | | definition of pi and euler
* Patch #1583 by Adam Olsen.Guido van Rossum2007-12-191-0/+3
| | | | | | | This adds signal.set_wakeup_fd(fd) which sets a file descriptor to which a zero byte will be written whenever a C exception handler runs. I added a simple C API as well, PySignal_SetWakeupFd(fd).
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-1932-74/+79
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* Applied patch #1635: Float patch for inf and nan on Windows (and other ↵Christian Heimes2007-12-183-0/+56
| | | | | | platforms). The patch unifies float("inf") and repr(float("inf")) on all platforms.
* Give meaning to the oparg for BUILD_MAP: estimated size of the dictionary.Raymond Hettinger2007-12-181-0/+1
| | | | | | | | | | | Allows dictionaries to be pre-sized (upto 255 elements) saving time lost to re-sizes with their attendant mallocs and re-insertions. Has zero effect on small dictionaries (5 elements or fewer), a slight benefit for dicts upto 22 elements (because they had to resize once anyway), and more benefit for dicts upto 255 elements (saving multiple resizes during the build-up and reducing the number of collisions on the first insertions). Beyond 255 elements, there is no addional benefit.
* Speed-up dictionary constructor by about 10%.Raymond Hettinger2007-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | New opcode, STORE_MAP saves the compiler from awkward stack manipulations and specializes for dicts using PyDict_SetItem instead of PyObject_SetItem. Old disassembly: 0 BUILD_MAP 0 3 DUP_TOP 4 LOAD_CONST 1 (1) 7 ROT_TWO 8 LOAD_CONST 2 ('x') 11 STORE_SUBSCR 12 DUP_TOP 13 LOAD_CONST 3 (2) 16 ROT_TWO 17 LOAD_CONST 4 ('y') 20 STORE_SUBSCR New disassembly: 0 BUILD_MAP 0 3 LOAD_CONST 1 (1) 6 LOAD_CONST 2 ('x') 9 STORE_MAP 10 LOAD_CONST 3 (2) 13 LOAD_CONST 4 ('y') 16 STORE_MAP
* Backport of r59456:59458 from py3k to trunkChristian Heimes2007-12-101-0/+4
| | | | | | Issue #1580: New free format floating point representation based on "Floating-Point Printer Sample Code", by Robert G. Burger. For example repr(11./5) now returns '2.2' instead of '2.2000000000000002'. Thanks to noam for the patch! I had to modify doubledigits.c slightly to support X64 and IA64 machines on Windows. I also added the new file to the three project files.
* Fix Issue 1045.Raymond Hettinger2007-12-061-17/+4
| | | | | Factor-out common calling code by simplifying the length_hint API. Speed-up the function by caching the PyObject_String for the attribute lookup.
* Feature #1534Christian Heimes2007-12-011-0/+4
| | | | | Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API. Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
* Backport of the PCbuild9 directory from the py3k branch.Christian Heimes2007-11-221-2/+2
| | | | | I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k. Have fun! :)
* The incremental decoder for utf-7 must preserve its state between calls.Amaury Forgeot d'Arc2007-11-201-0/+7
| | | | | | | Solves issue1460. Might not be a backport candidate: a new API function was added, and some code may rely on details in utf-7.py.
* Patch #1739468: Directories and zipfiles containing __main__.py are now ↵Nick Coghlan2007-11-181-0/+2
| | | | executable
* Fix a crasher where Python code managed to infinitely recurse in C code withoutBrett Cannon2007-09-071-0/+1
| | | | | | | ever going back out to Python code in PyObject_Call(). Required introducing a static RuntimeError instance so that normalizing an exception there is no reliance on a recursive call that would put the exception system over the recursion check itself.
* Backport r57105 and r57145 from the py3k branch: UTF-32 codecs.Walter Dörwald2007-08-171-0/+82
|
* Py_ssize_t is defined regardless of HAVE_LONG_LONG. Will backportNeal Norwitz2007-08-031-1/+3
|
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-2132-74/+80
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Fix #1752132: wrong comment in opcode description.Georg Brandl2007-07-111-1/+1
|
* Add T_PYSSIZET in structmember.h: This can be used forWalter Dörwald2007-06-132-2/+3
| | | | | | | | | Py_ssize_t members. Simplify the implementation of UnicodeError objects: start and end attributes are now stored directly as Py_ssize_t members, which simplifies various get and set functions.
* Provide PY_LLONG_MAX on all systems having long long.Martin v. Löwis2007-06-131-4/+10
| | | | Will backport to 2.5.
* Provide LLONG_MAX for S390.Martin v. Löwis2007-06-091-0/+7
|
* Patch #1733960: Allow T_LONGLONG to accept ints.Martin v. Löwis2007-06-091-0/+3
| | | | Will backport to 2.5.
* Add -3 option to the interpreter to warn about features that areNeal Norwitz2007-05-231-0/+2
| | | | | | | deprecated and will be changed/removed in Python 3.0. This patch is mostly from Anthony. I tweaked some format and added a little doc.
* Stop using PyMem_FREE while the GIL is not held. For details see:Neal Norwitz2007-05-021-0/+2
| | | | http://mail.python.org/pipermail/python-dev/2007-May/072896.html
* Export function sanitize_the_mode from fileobject.c as ↵Kristján Valur Jónsson2007-04-261-0/+5
| | | | _PyFile_SanitizeMode(). Use this function in posixmodule.c when implementing fdopen(). This fixes test_subprocess.py for a VisualStudio 2005 compile.
* Extend work on rev 52962 and 53829 eliminating redundant PyObject_Hash() ↵Raymond Hettinger2007-03-201-1/+2
| | | | calls and fixing set/dict interoperability.
* Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. ↵Collin Winter2007-03-121-0/+1
| | | | | | Fixed by patch #922167. Will backport.
* Variant of patch #697613: don't exit the interpreter on a SystemExitGeorg Brandl2007-03-071-0/+1
| | | | | | | exception if the -i command line option or PYTHONINSPECT environment variable is given, but break into the interactive interpreter just like on other exceptions or normal program exit. (backport)
* Variation of patch # 1624059 to speed up checking if an object is a subclassNeal Norwitz2007-02-259-13/+31
| | | | | | | | | | | | | | | | | | of some of the common builtin types. Use a bit in tp_flags for each common builtin type. Check the bit to determine if any instance is a subclass of these common types. The check avoids a function call and O(n) search of the base classes. The check is done in the various Py*_Check macros rather than calling PyType_IsSubtype(). All the bits are set in tp_flags when the type is declared in the Objects/*object.c files because PyType_Ready() is not called for all the types. Should PyType_Ready() be called for all types? If so and the change is made, the changes to the Objects/*object.c files can be reverted (remove setting the tp_flags). Objects/typeobject.c would also have to be modified to add conditions for Py*_CheckExact() in addition to each the PyType_IsSubtype check.
* Extend work on revision 52962: Eliminate redundant calls to PyObject_Hash().Raymond Hettinger2007-02-191-0/+3
|
* Modify Parser/asdl_c.py so that the __version__ number for Python/Python-ast.cBrett Cannon2007-02-121-1/+1
| | | | | | is specified at the top of the file. Also add a note that Python/Python-ast.c needs to be committed separately after a change to the AST grammar to capture the revision number of the change (which is what __version__ is set to).
* Prefix AST symbols with _Py_. Fixes #1637022.Martin v. Löwis2007-01-191-87/+145
| | | | Will backport.
* Patch #1580872: Remove duplicate declaration of PyCallable_Check.Martin v. Löwis2006-10-221-1/+2
| | | | Will backport to 2.5.
* Add check for the PyArg_ParseTuple format, and declareMartin v. Löwis2006-10-192-1/+10
| | | | it if it is supported.
* Guard uintptr_t test with HAVE_STDINT_H, test forMartin v. Löwis2006-10-021-0/+4
| | | | stdint.h. Will backport.
* Mostly revert this file to the same version as before. Only force settingNeal Norwitz2006-09-221-3/+3
| | | | | of PY_FORMAT_SIZE_T to "l" for Mac OSX. I don't know a better define to use. This should get rid of the warnings on other platforms and Mac too.
* Fix %zd string formatting on Mac OS X so it prints negative numbers.Neal Norwitz2006-09-221-3/+3
| | | | | | | | | | In addition to testing positive numbers, verify negative numbers work in configure. In order to avoid compiler warnings on OS X 10.4, also change the order of the check for the format character to use (PY_FORMAT_SIZE_T) in the sprintf format for Py_ssize_t. This patch changes PY_FORMAT_SIZE_T from "" to "l" if it wasn't defined at configure time. Need to verify the buildbot results. Backport candidate (if everyone thinks this patch can't be improved).
* with and as are now keywords. There are some generated files I can't recreate.Neal Norwitz2006-09-062-0/+4
|
* Move peephole optimizer to separate file. (Forgot .h in previous checkin.)Jeremy Hylton2006-08-211-0/+3
|
* SF #1542693: Remove semi-colon at end of PyImport_ImportModuleEx macroNeal Norwitz2006-08-191-1/+1
|
* Set version to 2.6a0, seems more consistent.Neal Norwitz2006-08-181-1/+1
|
* More post-release wibbleNeal Norwitz2006-08-181-4/+4
|
* preparing for 2.5c1 - no, really this timeAnthony Baxter2006-08-161-1/+1
|
* preparing for 2.5c1Anthony Baxter2006-08-161-2/+2
|
* Slightly revised version of patch #1538956:Marc-André Lemburg2006-08-142-0/+25
| | | | | | | | | | Replace UnicodeDecodeErrors raised during == and != compares of Unicode and other objects with a new UnicodeWarning. All other comparisons continue to raise exceptions. Exceptions other than UnicodeDecodeErrors are also left untouched.
* Patch #1538606, Patch to fix __index__() clipping.Neal Norwitz2006-08-122-4/+18
| | | | | | | I modified this patch some by fixing style, some error checking, and adding XXX comments. This patch requires review and some changes are to be expected. I'm checking in now to get the greatest possible review and establish a baseline for moving forward. I don't want this to hold up release if possible.