summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* #2196 hasattr now allows SystemExit and KeyboardInterrupt to propagateBenjamin Peterson2008-05-121-3/+7
|
* Addresses issue 2802: 'n' formatting for integers.Eric Smith2008-05-111-45/+4
| | | | | | | | | | | | | | 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.
* #2816: clarify error messages for EOF while scanning strings.Georg Brandl2008-05-111-2/+2
|
* #1792: Improve performance of marshal.dumps() on large objects by increasingAndrew M. Kuchling2008-05-111-1/+4
| | | | the size of the buffer more quickly.
* Fix sys.flags to properly expose bytes_warning.Brett Cannon2008-05-081-2/+2
| | | | Closes issue #2790.
* Implemented PEP 370Christian Heimes2008-05-062-5/+6
|
* Fix logic error in Python/_warnings.c and add a test to verifyBenjamin Peterson2008-05-061-0/+2
|
* Fix a bug in the handling of the stacklevel argument in warnings.warn() whereBrett Cannon2008-05-061-3/+1
| | | | the stack was being unwound by two levels instead of one each time.
* Add a DeprecationWarning for when warnings.showwarning() is set to a functionBrett Cannon2008-05-051-13/+43
| | | | that lacks support for the new 'line' argument.
* The compiling struct is now passed around to all AST helpers (see issue 2720)Benjamin Peterson2008-05-031-32/+32
|
* Fix the C implementation of 'warnings' to infer the filename of the module thatBrett Cannon2008-05-031-0/+13
| | | | | | | raised an exception properly when __file__ is not set, __name__ == '__main__', and sys.argv[0] is a false value. Closes issue2743.
* Fix some indentation errors.Brett Cannon2008-05-031-9/+10
|
* Fix a backwards-compatibility mistake where a new optional argument forBrett Cannon2008-05-021-3/+0
| | | | | | | warnings.showwarning() was being used. This broke pre-existing replacements for the function since they didn't support the extra argument. Closes issue 2705.
* #2719: backport next() from 3k.Georg Brandl2008-04-301-0/+42
|
* Issue 2526, float.__format__ 'n' specifier does not support thousands grouping.Eric Smith2008-04-301-128/+229
| | | | | Implemented grouping, with tests. Cleaned up PyOS_ascii_formatd by breaking reformatting into smaller functions.
* Fix a bug introduced by the warnings rewrite where tracebacks were beingBrett Cannon2008-04-281-2/+0
| | | | | | improperly indented. Closes issue #2699.
* A little reformating of Py3k warningsBenjamin Peterson2008-04-273-15/+15
|
* Use PyErr_WarnPy3k throughoutBenjamin Peterson2008-04-273-31/+17
|
* Added PyErr_WarnPy3k function. (issue 2671) I will be converting current ↵Benjamin Peterson2008-04-271-0/+9
| | | | Py3k warnings to the use of this function soon.
* I finally got the time to update and merge Mark's and my trunk-math branch. ↵Christian Heimes2008-04-182-25/+232
| | | | | | 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 :)
* Fix indentation in sysmodule.cBenjamin Peterson2008-04-181-4/+4
|
* Correct a refleak found by "regrtest.py -R:: test_structmembers"Amaury Forgeot d'Arc2008-04-141-5/+6
| | | | | | Some other minor updates in _warnings.c: - make a function static - rename a shadowing local variable
* Improve -X error message.Georg Brandl2008-04-131-1/+1
|
* #2627 Let it be known what pgen generatesBenjamin Peterson2008-04-131-0/+2
|
* Use PyString_InternFromString instead of PyString_FromString for static varsChristian Heimes2008-04-131-3/+3
|
* Fix a bug in PySys_HasWarnOption() where it was not properly checking theBrett Cannon2008-04-131-1/+1
| | | | length of the list storing the warning options.
* Re-implement the 'warnings' module in C. This allows for usage of theBrett Cannon2008-04-125-157/+917
| | | | | | | | | '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.
* Applied patch #2617 from Frank Wierzbicki wit some extras from meChristian Heimes2008-04-121-1/+12
| | | | -J and -X are now reserved for Jython and non-standard arguments (e.g. IronPython). I've added some extra comments to make sure the reservation don't get missed in the future.
* Make AST nodes pickleable.Georg Brandl2008-03-301-2/+27
|
* Fix error message -- "expects either 0 or 0 arguments"Georg Brandl2008-03-301-2/+4
|
* Make _fields attr for no fields consistent with _attributes attr.Georg Brandl2008-03-301-8/+3
|
* #2505: allow easier creation of AST nodes.Georg Brandl2008-03-301-22/+113
|
* Patch #2511: Give the "excepthandler" AST item proper attributes by making ↵Georg Brandl2008-03-304-94/+122
| | | | it a Sum.
* Properly check for consistency with the third argument ofGeorg Brandl2008-03-292-20/+27
| | | | compile() when compiling an AST node.
* Fix a reference leak found by Georg, when compiling a class nested in ↵Amaury Forgeot d'Arc2008-03-281-0/+1
| | | | | | | | another class. Now "regrtest.py -R:: test_compile" is satisfied. Will backport.
* Silence a compilation warningAmaury Forgeot d'Arc2008-03-281-1/+1
|
* Patch #1810 by Thomas Lee, reviewed by myself:Georg Brandl2008-03-283-30/+2919
| | | | | 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-281-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.
* Build bots are working again - removing the hackChristian Heimes2008-03-271-1/+1
|
* Quick 'n dirty hack: Increase the magic by 2 to force a rebuild of pyc/pyo ↵Christian Heimes2008-03-271-1/+1
| | | | files on the build bots
* Fix warnings about using char as an array subscript. This is not portableNeal Norwitz2008-03-271-8/+8
| | | | since char is signed on some platforms and unsigned on others.
* C89 compliance: Microsoft compilers want variable declarations at the topAmaury Forgeot d'Arc2008-03-261-4/+2
|
* Initialize PyCompilerFlags cf_flags with 0Christian Heimes2008-03-262-0/+4
|
* Patch #2477: Added from __future__ import unicode_literalsChristian Heimes2008-03-264-19/+41
| | | | 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-262-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
* Make Py3k warnings consistent w.r.t. punctuation; also respect theGeorg Brandl2008-03-254-10/+14
| | | | EOL 80 limit and supply more alternatives in warning messages.
* Try to fix a bunch of compiler warnings on Win64.Neal Norwitz2008-03-251-2/+2
|
* Added quick hack for bzrChristian Heimes2008-03-241-2/+2
|
* Added quick hack for bzrChristian Heimes2008-03-241-1/+8
|
* Remove compiler warnings (on Alpha at least) about using chars asNeal Norwitz2008-03-231-5/+6
| | | | | array subscripts. Using chars are dangerous b/c they are signed on some platforms and unsigned on others.