summaryrefslogtreecommitdiff
path: root/Python
AgeCommit message (Collapse)AuthorLines
2010-01-04Fix typo in comment.Mark Dickinson-1/+1
2010-01-01Issue #5080: turn the DeprecationWarning from float arguments passedMark Dickinson-2/+19
to integer PyArg_Parse* format codes into a TypeError. Add a DeprecationWarning for floats passed with the 'L' format code, which didn't previously have a warning.
2010-01-01update copyright yearBenjamin Peterson-1/+1
2009-12-30check if the attribute is set before deleting it with T_OBJECT_EX (fixes #7604)Benjamin Peterson-5/+15
Also, add a note to the docs about the better behavior of T_OBJECT_EX as compared to T_OBJECT.
2009-12-28#7033: add new API function PyErr_NewExceptionWithDoc, for easily giving new ↵Georg Brandl-0/+34
exceptions a docstring.
2009-12-21Issue #7518: Move substitute definitions of C99 math functions fromMark Dickinson-199/+0
pymath.c to Modules/_math.c.
2009-12-13account for PyObject_IsInstance's new ability to failBenjamin Peterson-87/+445
2009-12-03Issue #6985: number of range() items should be constrained to lieMark Dickinson-4/+4
in a Py_ssize_t, not an int.
2009-12-02Issue #7406: Fix some occurrences of potential signed overflow in intMark Dickinson-2/+6
arithmetic.
2009-11-28Issue #1678380: When distinguishing between -0.0 and 0.0 inMark Dickinson-26/+15
compiler_add_o, use copysign instead of examining the first and last bytes of the double. The latter method fails for little-endian ARM, OABI, where doubles are little-endian but with the words swapped.
2009-11-24round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this.Mark Dickinson-4/+4
2009-11-20turn goto into do while loopBenjamin Peterson-36/+31
2009-11-20genexps have linenosBenjamin Peterson-1/+1
2009-11-20provide line number for lambdasBenjamin Peterson-2/+1
2009-11-19improve several corner cases related with argument names in parenthesisBenjamin Peterson-1/+16
- Fix #7362: give a good error message for parenthesized arguments with defaults. - Add a py3k warning for any parenthesized arguments since those are not allowed in Py3. This warning is not given in tuple unpacking, since that incurs the tuple unpacking warning.
2009-11-18Issue #7117, continued: Change round implementation to use the ↵Mark Dickinson-19/+38
correctly-rounded string <-> float conversions; this makes sure that the result of the round operation is correctly rounded, and hence displays nicely using the new float repr.
2009-11-17a better callable replacementBenjamin Peterson-1/+1
2009-10-31Set retval on PyOS_string_to_double failure.Mark Dickinson-3/+9
2009-10-31Issue #6603: Fix --with-tsc build failures on x86-64 that resultedMark Dickinson-1/+19
from a gcc inline assembler peculiarity. (gcc's "A" constraint apparently means 'rax or rdx' in 64-bit mode, not edx:eax or rdx:rax as one might expect.)
2009-10-31Deprecate PyOS_ascii_strtod and PyOS_ascii_atof, and document the ↵Mark Dickinson-2/+12
replacement function PyOS_string_to_double.
2009-10-29do a backport of r75928Benjamin Peterson-9/+12
The added test does not fail without the patch, but we still fix the issue of surrogates being used in wide builds where they should not be.
2009-10-27Removed PyOS_ascii_atof from marshal.c, as mentioned in issue 7117. Also ↵Eric Smith-11/+9
brings it more in line with py3k.
2009-10-27Removed PyOS_ascii_atof from ast.c, as mentioned in issue 7117.Eric Smith-6/+6
2009-10-26Finished removing _PyOS_double_to_string, as mentioned in issue 7117.Eric Smith-135/+0
2009-10-26Issue #7117 (backport py3k float repr) continued:Mark Dickinson-92/+698
Backport pystrtod.c from py3k.
2009-10-26Warn against replacing PyNumber_Add with PyNumber_InPlaceAdd in sumMark Dickinson-0/+9
2009-10-24Issue #7117 (backport py3k float repr) continued:Mark Dickinson-0/+10
Add sys.float_repr_style attribute ('short' if short float repr is in used; 'legacy' otherwise).
2009-10-24Remove temporary define from r75653Mark Dickinson-2/+0
2009-10-24Issue #7117 (backport py3k float repr) continued:Mark Dickinson-0/+18
- add double endianness detection to configure script - add configure-time check to see whether we can use inline assembly to get and set x87 control word in configure script - add functions to get and set x87 control word in Python/pymath.c - add pyport.h logic to determine whether it's safe to use the short float repr or not
2009-10-24Temporary define to avoid build failureMark Dickinson-0/+2
2009-10-24Issue #7117: Prepare for backport of py3k float repr.Mark Dickinson-0/+2609
Add the Python/dtoa.c file containing the main algorithms; add corresponding include file and include in Python.h; include license information for Python/dtoa.c; add dtoa.c and dtoa.h to Makefile.
2009-10-22#7035: improve docs of the various <method>_errors() functions, and give ↵Georg Brandl-5/+17
them docstrings.
2009-10-20Issue #1722344: threading._shutdown() is now called in Py_Finalize(), whichAntoine Pitrou-0/+30
fixes the problem of some exceptions being thrown at shutdown when the interpreter is killed. Patch by Adam Olsen.
2009-10-19Removed calls to PyFloat_AsReprString.Eric Smith-42/+63
This is in anticipation of possibly implementing issue 7117 (short float repr). This removes the last calls to PyFloat_AsString, PyFloat_AsReprString, and PyFloat_AsStringEx, which are unsafe. Also, switch to defines for error values to bring this code more in line with the py3k branch.
2009-10-15Allow core Python build to succeed under WITHOUT_COMPLEX. The module build ↵Mark Dickinson-4/+9
stage still fails.
2009-10-14Issue #1754094: Improve the stack depth calculation in the compiler.Neil Schemenauer-12/+21
There should be no other effect than a small decrease in memory use. Patch by Christopher Tur Lesniewski-Laas.
2009-10-03#7050 fix a SystemError when using tuple unpacking and augmented assignmentBenjamin Peterson-0/+13
2009-09-29Issue #7019: Unmarshalling of bad long data could produce unnormalizedMark Dickinson-3/+13
PyLongs. Raise ValueError instead.
2009-09-16Fix issue #1590864, multiple threads and fork() can cause deadlocks, byThomas Wouters-19/+12
acquiring the import lock around fork() calls. This prevents other threads from having that lock while the fork happens, and is the recommended way of dealing with such issues. There are two other locks we care about, the GIL and the Thread Local Storage lock. The GIL is obviously held when calling Python functions like os.fork(), and the TLS lock is explicitly reallocated instead, while also deleting now-orphaned TLS data. This only fixes calls to os.fork(), not extension modules or embedding programs calling C's fork() directly. Solving that requires a new set of API functions, and possibly a rewrite of the Python/thread_*.c mess. Add a warning explaining the problem to the documentation in the mean time. This also changes behaviour a little on AIX. Before, AIX (but only AIX) was getting the import lock reallocated, seemingly to avoid this very same problem. This is not the right approach, because the import lock is a re-entrant one, and reallocating would do the wrong thing when forking while holding the import lock. Will backport to 2.6, minus the tiny AIX behaviour change.
2009-09-09revert unintended changesBenjamin Peterson-86/+8
2009-09-09tabbifyBenjamin Peterson-8/+86
2009-09-07revert r74699 since it loses useful error informationBenjamin Peterson-2/+13
2009-09-06PyObject_GetIter can set an error for its self just fineBenjamin Peterson-13/+2
2009-08-15better col_offsets for "for" statements with tuple unpacking #6704Benjamin Peterson-11/+12
Patch from Frank Wierzbicki.
2009-08-01- Issue #6624: yArg_ParseTuple with "s" format when parsing argument withSean Reifscheider-1/+1
NUL: Bogus TypeError detail string.
2009-07-25Better name a variable: 'buf' seems to imply a mutable buffer.Amaury Forgeot d'Arc-7/+7
2009-07-20the Slice in x[::] has to have step as None to help the interpreterBenjamin Peterson-1/+15
2009-07-17Issue #6415: Fixed warnings.warn sagfault on bad formatted string.Hirokazu Yamamoto-0/+2
2009-07-07Update issue 6070 patch to match the patch that was actually testedR. David Murray-1/+3
on Windows.
2009-07-07Issue 6070: when creating a compiled file, after copying the mode bits, onR. David Murray-1/+3
posix zap the execute bit in case it was set on the .py file, since the compiled files are not directly executable on posix. Patch by Marco N.