summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Finish backporting new buffer API to Python 2.6. Left to do: memoryview ↵Travis E. Oliphant2008-03-182-3/+5
| | | | object and structmodule. But, these need to be finished in Python 3.0 first. No objects support the new buffer API in Python 2.6 as of yet, and except for the memoryview object, I don't think they will.
* Add necessary headers to back-port new buffer protocol to Python 2.6Travis E. Oliphant2008-03-173-0/+173
|
* Set things up for 2.6a2.Barry Warsaw2008-03-011-1/+1
|
* Bump to version 2.6a1Barry Warsaw2008-03-011-2/+2
|
* Move abc._Abstract into object by adding a new flag Py_TPFLAGS_IS_ABSTRACT,Jeffrey Yasskin2008-02-281-0/+3
| | | | | | | | which forbids constructing types that have it set. The effect is to speed ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__ = abc.ABCMeta' 'Foo()' up from 2.5us to 0.201us. This fixes issue 1762.
* Thomas Herve explained to me that PyCrypto depends on the constants. I'm ↵Christian Heimes2008-02-251-1/+6
| | | | adding the aliases because C code for Python 2.x should compile under 2.6 as well. The aliases aren't available in Python 3.x though.
* Patch #1759: Backport of PEP 3129 class decoratorsChristian Heimes2008-02-232-84/+87
| | | | with some help from Georg
* Backport of PEP 3101, Advanced String Formatting, from py3k.Eric Smith2008-02-173-0/+31
| | | | | | | | | | | | | | | Highlights: - Adding PyObject_Format. - Adding string.Format class. - Adding __format__ for str, unicode, int, long, float, datetime. - Adding builtin format. - Adding ''.format and u''.format. - str/unicode fixups for formatters. The files in Objects/stringlib that implement PEP 3101 (stringdefs.h, unicodedefs.h, formatter.h, string_format.h) are identical in trunk and py3k. Any changes from here on should be made to trunk, and changes will propogate to py3k).
* Implemented Martin's suggestion to clear the free lists during the garbage ↵Christian Heimes2008-02-145-0/+11
| | | | collection of the highest generation.
* Forgot to modify header file in r60707.Eric Smith2008-02-101-0/+9
|
* Added PyNumber_ToBase and supporting routines _PyInt_Format andEric Smith2008-02-102-0/+13
| | | | | | | | | | | | | | | | | _PyLong_Format. In longobject.c, changed long_format to _PyLong_Format. In intobject.c, changed uses of PyOS_snprintf to _PyInt_Format instead. _PyLong_Format is similar to py3k's routine of the same name, except it has 2 additional parameters: addL and newstyle. addL was existing in long_format, and controls adding the trailing "L". This is unneeded in py3k. newstyle is used to control whether octal prepends "0" (the pre-2.6 style), or "0o" (the 3.0 sytle). PyNumber_ToBase is needed for PEP 3127 (Integer Literal Support and Syntax) and PEP 3101 (Advanced String Formatting). This changeset does not need merging into py3k.
* Deallocate content of the dict free list on interpreter shutdownChristian Heimes2008-02-081-0/+1
|
* Patch #1953Christian Heimes2008-02-042-0/+5
| | | | | I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers. The patch also renames sys._cleartypecache to sys._clear_type_cache
* Make int() and long() fall back to __trunc__(). See issue 2002.Jeffrey Yasskin2008-02-041-0/+13
|
* Nasty typo in setobject.hAmaury Forgeot d'Arc2008-02-031-1/+1
|
* Ensure that PySet_Add() operates on a newly created frozenset, like ↵Amaury Forgeot d'Arc2008-02-031-1/+5
| | | | | | | | PyTuple_SetItem does. Add PyFrozenSet_Check(), which was not needed before; The list of Py*Set_Check* macros seems to be complete now. Add missing NEWS entries about all this.
* Fixed bug #1983: Return from fork() is pid_t, not intChristian Heimes2008-01-311-1/+5
|
* Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and linebreak ↵Christian Heimes2008-01-301-1/+8
| | | | detection. The speedup is about 25% for split() (571 / 457 usec) and 35% (175 / 127 usec )for splitlines()
* Factor-out common code with a new macroRaymond Hettinger2008-01-281-0/+2
|
* Added clear cache methods to clear the internal type lookup cache for ref ↵Christian Heimes2008-01-271-0/+1
| | | | leak test runs.
* Add stdarg include for va_list to get this to compile on cygwinNeal Norwitz2008-01-271-0/+2
|
* #1473257: add generator.gi_code attribute that refers toGeorg Brandl2008-01-261-0/+3
| | | | the original code object backing the generator. Patch by Collin Winter.
* Backport of several functions from Python 3.0 to 2.6 including ↵Christian Heimes2008-01-253-7/+33
| | | | | | | PyUnicode_FromString, PyUnicode_Format and PyLong_From/AsSsize_t. The functions are partly required for the backport of the bytearray type and _fileio module. They should also make it easier to port C to 3.0. First chapter of the Python 3.0 io framework back port: _fileio The next step depends on a working bytearray type which itself depends on a backport of the nwe buffer API.
* Don't repeat yourselfChristian Heimes2008-01-221-1/+2
| | | | Added the macros PyModule_AddIntMacro and PyModule_AddStringMacro. They shorten PyModule_AddIntConstant(m, "AF_INET", AF_INET) to PyModule_AddIntMacro(m, AF_INET)
* Fixed a missing (X) in defineChristian Heimes2008-01-221-1/+1
|
* Patch #1720595: add T_BOOL to the range of structmember types.Georg Brandl2008-01-211-0/+3
| | | | Patch by Angelo Mottola, reviewed by MvL, tests by me.
* Fixed a wrong assumption in configure.in and Include/pyport.h. The is finite ↵Christian Heimes2008-01-201-2/+2
| | | | function is not called isfinite() but finite(). Sorry, my fault. :)
* 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.