summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Typo fixesAndrew M. Kuchling2008-01-151-2/+2
|
* Applied patch #1816: sys.flags patchChristian Heimes2008-01-141-3/+94
|
* Fixed #1776. __import__() no longer imports modules by file nameChristian Heimes2008-01-091-0/+10
|
* Make Python compile with --disable-unicode.Georg Brandl2008-01-071-0/+2
|
* patch #1668: clarify envvar docs; rename THREADDEBUG to PYTHONTHREADDEBUG.Georg Brandl2008-01-072-2/+2
|
* Patch #602345 by Neal Norwitz and me: add -B option and ↵Georg Brandl2008-01-073-2/+11
| | | | PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
* #1755: typo.Georg Brandl2008-01-071-1/+1
|
* Fix C++-style comment.Georg Brandl2008-01-051-3/+3
|
* Continue rolling back pep-3141 changes that changed behavior from 2.5. ThisJeffrey Yasskin2008-01-051-17/+25
| | | | | | | | | | | | round included: * Revert round to its 2.6 behavior (half away from 0). * Because round, floor, and ceil always return float again, it's no longer necessary to have them delegate to __xxx___, so I've ripped that out of their implementations and the Real ABC. This also helps in implementing types that work in both 2.6 and 3.0: you return int from the __xxx__ methods, and let it get enabled by the version upgrade. * Make pow(-1, .5) raise a ValueError again.
* Patch #1725 by Mark Dickinson, fixes incorrect conversion of -1e1000Guido van Rossum2008-01-051-22/+52
| | | | and adds errors for -0x.
* Moved include "Python.h" in front of other imports to silence a warning.Christian Heimes2008-01-041-1/+2
|
* Partial port of r59682 from py3k.Amaury Forgeot d'Arc2008-01-041-1/+2
| | | | | | | | | | | On Windows, when import fails to load a dll module, the message says "error code 193" instead of a more informative text. It turns out that FormatMessage needs additional parameters for some error codes. For example: 193 means "%1 is not a valid Win32 application". Since it is impossible to know which parameter to pass, we use FORMAT_MESSAGE_IGNORE_INSERTS to get the raw message, which is still better than the number.
* Modified PyImport_Import and PyImport_ImportModule to always use absolute ↵Christian Heimes2008-01-033-25/+53
| | | | | | 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
* Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (justJeffrey Yasskin2008-01-031-23/+30
| | | | | | | the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361, r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new documentation. The only significant difference is that round(x) returns a float to preserve backward-compatibility. See http://bugs.python.org/issue1689.
* Improve performance of built-in any()/all() by avoiding PyIter_Next() --Guido van Rossum2007-12-201-8/+28
| | | | | using a trick found in ifilter(). Feel free to backport to 2.5.
* Add commentsRaymond Hettinger2007-12-201-3/+3
|
* Bigger range for non-extended opargs.Raymond Hettinger2007-12-191-1/+1
|
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-1/+1
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* Zap a duplicate lineRaymond Hettinger2007-12-191-1/+0
|
* Applied patch #1635: Float patch for inf and nan on Windows (and other ↵Christian Heimes2007-12-181-0/+25
| | | | | | 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-182-5/+3
| | | | | | | | | | | 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-183-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Silence a warning about an unsed variable in debug buildsChristian Heimes2007-12-141-2/+3
|
* Note that open() is the preferred way to open files (issue 1510).Skip Montanaro2007-12-081-1/+2
|
* Fix Issue 1045.Raymond Hettinger2007-12-061-24/+3
| | | | | Factor-out common calling code by simplifying the length_hint API. Speed-up the function by caching the PyObject_String for the attribute lookup.
* Fix typo.Georg Brandl2007-12-051-1/+1
|
* Implement PEP 366Nick Coghlan2007-12-031-26/+86
|
* Feature #1534Christian Heimes2007-12-011-0/+2
| | | | | 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.
* Issue #1521: on 64bit platforms, str.decode fails on very long strings.Amaury Forgeot d'Arc2007-11-301-3/+4
| | | | | | The t# and w# formats were not correctly handled. Will backport.
* Issue #1402: PyInterpreterState_Clear() may still invoke user codeAmaury Forgeot d'Arc2007-11-291-5/+5
| | | | | | | | (in deallocation of running threads, for example), so the PyGILState_Release() function must still be functional. On the other hand, _PyGILState_Fini() only frees memory, and can be called later. Backport candidate, but only after some experts comment on it.
* Expose Py_Py3kWarningFlag as sys.py3kwarning as discussed in #1504Christian Heimes2007-11-271-0/+2
| | | | Also added a warning.warnpy3k() as convenient method for Python 3.x related deprecation warnings.
* Added filename to compiling struct based on Martin's suggestion.Christian Heimes2007-11-241-1/+3
| | | | I'm wonder why I was trying to add the filename to the node all the time. The compiling struct is more obvious.
* And yet another fix for the patch. Paul Moore has send me a note that I've ↵Christian Heimes2007-11-231-8/+9
| | | | missed a declaration. The additional code has moved the declaration in the middle of the block.
* How did the comment get there?Christian Heimes2007-11-231-1/+1
|
* Fixed problems in the last commit. Filenames and line numbers weren't ↵Christian Heimes2007-11-231-4/+8
| | | | | | reported correctly. Backquotes still don't report the correct file. The AST nodes only contain the line number but not the file name.
* Applied patch #1754273 and #1754271 from Thomas GleeChristian Heimes2007-11-231-0/+4
| | | | The patches are adding deprecation warnings for back ticks and <>
* Backport of the PCbuild9 directory from the py3k branch.Christian Heimes2007-11-221-1/+1
| | | | | 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! :)
* Patch #1739468: Directories and zipfiles containing __main__.py are now ↵Nick Coghlan2007-11-181-7/+20
| | | | executable
* Merge from py3k branch:Amaury Forgeot d'Arc2007-11-131-7/+12
| | | | | | | | | | | | | | | | | | | | | | Correction for issue1265 (pdb bug with "with" statement). When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx is called with a GeneratorExit exception set. This leads to funny results if the sys.settrace function itself makes use of generators. A visible effect is that the settrace function is reset to None. Another is that the eventual "finally" block of the generator is not called. It is necessary to save/restore the exception around the call to the trace function. This happens a lot with py3k: isinstance() of an ABCMeta instance runs def __instancecheck__(cls, instance): """Override for isinstance(instance, cls).""" return any(cls.__subclasscheck__(c) for c in {instance.__class__, type(instance)}) which lets an opened generator expression each time it returns True. Backport candidate, even if the case is less frequent in 2.5.
* Patch #1418: Make the AC_REPLACE_FUNCS object files actually work.Martin v. Löwis2007-11-121-2/+1
|
* Backport of Guido's review of my patch.Christian Heimes2007-11-071-7/+5
|
* Backported fix for bug #1392 from py3k branch r58903.Christian Heimes2007-11-071-1/+19
|
* Add build option for faster loop execution.Raymond Hettinger2007-11-071-0/+11
|
* Fix marshal's incorrect handling of subclasses of builtin types (backport ↵Raymond Hettinger2007-11-071-10/+10
| | | | candidate).
* Missing DECREFsRaymond Hettinger2007-10-251-0/+2
|
* Fixup error return and add support for intermixed ints and floats/Raymond Hettinger2007-10-241-1/+7
|
* Optimize sum() for integer and float inputs.Raymond Hettinger2007-10-241-0/+70
|
* Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memoryNeal Norwitz2007-10-121-0/+2
| | | | | | would be accessed. Will backport.
* Fix Coverity #158: Check the correct variable.Neal Norwitz2007-10-051-1/+1
|
* Try harder to stay within the 79-column limit. There's still two places that ↵Thomas Wouters2007-09-201-44/+55
| | | | go (way) over, but those are harder to fix without suffering in readability.