summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Addresses issue 2802: 'n' formatting for integers.Eric Smith2008-05-111-1/+11
| | | | | | | | | | | | | | Adds 'n' as a format specifier for integers, to mirror the same specifier which is already available for floats. 'n' is the same as 'd', but inserts the current locale-specific thousands grouping. I added this as a stringlib function, but it's only used by str type, not unicode. This is because of an implementation detail in unicode.format(), which does its own str->unicode conversion. But the unicode version will be needed in 3.0, and it may be needed by other code eventually in 2.6 (maybe decimal?), so I left it as a stringlib implementation. As long as the unicode version isn't instantiated, there's no overhead for this.
* Post tag updates.Barry Warsaw2008-05-081-1/+1
|
* Bump to 2.6a3v2.6a3Barry Warsaw2008-05-081-2/+2
|
* Implemented PEP 370Christian Heimes2008-05-061-0/+1
|
* Added PyErr_WarnPy3k function. (issue 2671) I will be converting current ↵Benjamin Peterson2008-04-271-0/+1
| | | | Py3k warnings to the use of this function soon.
* Remove Py_Refcnt, Py_Type, Py_Size, as they were added onlyMartin v. Löwis2008-04-241-5/+0
| | | | for backwards compatibility, yet 2.5 did not have them at all.
* Stupid me. Py_RETURN_NAN should actually return something ...Christian Heimes2008-04-181-1/+1
|
* I finally got the time to update and merge Mark's and my trunk-math branch. ↵Christian Heimes2008-04-185-126/+196
| | | | | | The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math. The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
* #2627 Let it be known what pgen generatesBenjamin Peterson2008-04-131-0/+2
|
* Fix compiler warning Include/warnings.h:19:28: warning: no newline at end of ↵Christian Heimes2008-04-131-1/+2
| | | | file
* Re-implement the 'warnings' module in C. This allows for usage of theBrett Cannon2008-04-125-10/+22
| | | | | | | | | 'warnings' code in places where it was previously not possible (e.g., the parser). It could also potentially lead to a speed-up in interpreter start-up if the C version of the code (_warnings) is imported over the use of the Python version in key places. Closes issue #1631171.
* Make file objects as thread safe as the underlying libc FILE* implementation.Gregory P. Smith2008-04-061-0/+4
| | | | | | | | | | | close() will now raise an IOError if any operations on the file object are currently in progress in other threads. Most code was written by Antoine Pitrou (pitrou). Additional testing, documentation and test suite cleanup done by me (gregory.p.smith). Fixes issue 815646 and 595601 (as well as many other bugs and references to this problem dating back to the dawn of Python).
* Post tag version tweakBarry Warsaw2008-04-031-1/+1
|
* Updating for 2.6a2v2.6a2Barry Warsaw2008-04-031-2/+4
|
* Patch #2511: Give the "excepthandler" AST item proper attributes by making ↵Georg Brandl2008-03-301-5/+12
| | | | it a Sum.
* Properly check for consistency with the third argument ofGeorg Brandl2008-03-291-1/+1
| | | | compile() when compiling an AST node.
* NIL => NULLBenjamin Peterson2008-03-281-1/+1
|
* Patch #1810 by Thomas Lee, reviewed by myself:Georg Brandl2008-03-281-0/+2
| | | | | allow compiling Python AST objects into code objects in compile().
* Revert r61969 which added casts to Py_CHARMASK to avoid compiler warnings.Neal Norwitz2008-03-282-8/+8
| | | | | | Rather than sprinkle casts throughout the code, change Py_CHARMASK to always cast it's result to an unsigned char. This should ensure we do the right thing when accessing an array with the result.
* Fix warnings about using char as an array subscript. This is not portableNeal Norwitz2008-03-271-7/+7
| | | | since char is signed on some platforms and unsigned on others.
* Patch #2477: Added from __future__ import unicode_literalsChristian Heimes2008-03-264-1/+12
| | | | The new PyParser_*Ex() functions are based on Neal's suggestion and initial patch. The new __future__ feature makes all '' and r'' unicode strings. b'' and br'' stay (byte) strings.
* Merged revisions ↵Christian Heimes2008-03-266-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809,61812,61819,61917,61920,61930,61933-61934 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray ........ r61750 | christian.heimes | 2008-03-22 20:47:44 +0100 (Sat, 22 Mar 2008) | 1 line Copied files from py3k w/o modifications ........ r61752 | christian.heimes | 2008-03-22 20:53:20 +0100 (Sat, 22 Mar 2008) | 7 lines Take One * Added initialization code, warnings, flags etc. to the appropriate places * Added new buffer interface to string type * Modified tests * Modified Makefile.pre.in to compile the new files * Added bytesobject.c to Python.h ........ r61754 | christian.heimes | 2008-03-22 21:22:19 +0100 (Sat, 22 Mar 2008) | 2 lines Disabled bytearray.extend for now since it causes an infinite recursion Fixed serveral unit tests ........ r61756 | christian.heimes | 2008-03-22 21:43:38 +0100 (Sat, 22 Mar 2008) | 5 lines Added PyBytes support to several places: str + bytearray ord(bytearray) bytearray(str, encoding) ........ r61760 | christian.heimes | 2008-03-22 21:56:32 +0100 (Sat, 22 Mar 2008) | 1 line Fixed more unit tests related to type('') is not unicode ........ r61763 | christian.heimes | 2008-03-22 22:20:28 +0100 (Sat, 22 Mar 2008) | 2 lines Fixed more unit tests Fixed bytearray.extend ........ r61768 | christian.heimes | 2008-03-22 22:40:50 +0100 (Sat, 22 Mar 2008) | 1 line Implemented old buffer interface for bytearray ........ r61772 | christian.heimes | 2008-03-22 23:24:52 +0100 (Sat, 22 Mar 2008) | 1 line Added backport of the io module ........ r61775 | christian.heimes | 2008-03-23 03:50:49 +0100 (Sun, 23 Mar 2008) | 1 line Fix str assignement to bytearray. Assignment of a str of size 1 is interpreted as a single byte ........ r61805 | christian.heimes | 2008-03-23 19:33:48 +0100 (Sun, 23 Mar 2008) | 3 lines Fixed more tests Fixed bytearray() comparsion with unicode() Fixed iterator assignment of bytearray ........ r61809 | christian.heimes | 2008-03-23 21:02:21 +0100 (Sun, 23 Mar 2008) | 2 lines str(bytesarray()) now returns the bytes and not the representation of the bytearray object Enabled and fixed more unit tests ........ r61812 | christian.heimes | 2008-03-23 21:53:08 +0100 (Sun, 23 Mar 2008) | 3 lines Clear error PyNumber_AsSsize_t() fails Use CHARMASK for ob_svall access disabled a test with memoryview again ........ r61819 | christian.heimes | 2008-03-23 23:05:57 +0100 (Sun, 23 Mar 2008) | 1 line Untested updates to the PCBuild directory ........ r61917 | christian.heimes | 2008-03-26 00:57:06 +0100 (Wed, 26 Mar 2008) | 1 line The type system of Python 2.6 has subtle differences to 3.0's. I've removed the Py_TPFLAGS_BASETYPE flags from bytearray for now. bytearray can't be subclasses until the issues with bytearray subclasses are fixed. ........ r61920 | christian.heimes | 2008-03-26 01:44:08 +0100 (Wed, 26 Mar 2008) | 2 lines Disabled last failing test I don't understand what the test is testing and how it suppose to work. Ka-Ping, please check it out. ........ r61930 | christian.heimes | 2008-03-26 12:46:18 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytes warning code ........ r61933 | christian.heimes | 2008-03-26 13:20:46 +0100 (Wed, 26 Mar 2008) | 1 line Fixed a bug in the new buffer protocol. The buffer slots weren't copied into a subclass. ........ r61934 | christian.heimes | 2008-03-26 13:25:09 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytearray subclassing - all tests are passing. ........
* Backport of the print function, using a __future__ import.Eric Smith2008-03-184-2/+9
| | | | | | | | This work is substantially Anthony Baxter's, from issue 1633807. I just freshened it, made a few minor tweaks, and added the test cases. I also created issue 2412, which is to check for 2to3's behavior with the print function. I also added myself to ACKS.
* 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. :)