Commit Graph

2295 Commits

Author SHA1 Message Date
Christian Heimes 8267d1dfe5 Bug #1481296: Fixed long(float('nan'))!=0L. 2008-01-04 00:37:34 +00:00
Christian Heimes 0613188bc3 Fixed #1687: plistlib.py restricts <integer> to Python int when writing 2008-01-04 00:04:52 +00:00
Guido van Rossum 076d9eef7b Bug #1301: fixed a bad assert in _tkinter. 2008-01-03 23:54:04 +00:00
Christian Heimes eebb79cc69 Added copysign(x, y) function to the math module 2008-01-03 22:32:26 +00:00
Christian Heimes 000a074c95 Modified PyImport_Import and PyImport_ImportModule to always use absolute 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
2008-01-03 22:16:32 +00:00
Christian Heimes e2ca4245c9 Added math.isinf() and math.isnan() 2008-01-03 20:23:15 +00:00
Guido van Rossum ae04c3356e Issue #1700, reported by Nguyen Quan Son, fix by Fredruk Lundh:
Regular Expression inline flags not handled correctly for some unicode
characters.  (Forward port from 2.5.2.)
2008-01-03 19:12:44 +00:00
Christian Heimes 1beea3be3e Issue #1726: Remove Python/atof.c from PCBuild/pythoncore.vcproj 2008-01-03 15:41:30 +00:00
Jeffrey Yasskin 2f3c16be73 Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just
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.
2008-01-03 02:21:52 +00:00
Christian Heimes d9fbab2621 Removed PCbuild8/ directory and added a new build directory for VS 2005
based on the VS 2008 build directory to PC/VS8.0. The script
PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0.

Kristjan, the initial creator of the PCbuild8 directory is fine with the replacement. I've moved the new version of the VS 2005 build directory next to the other legacy build directories. The new sync script is based on the work of wreck and syncs changes in the project, property and solution files.
2008-01-02 17:43:40 +00:00
Martin v. Löwis 84b9aab82d News item for r59653. 2008-01-01 21:09:07 +00:00
Christian Heimes 3adfe9aaae Renamed PCBuild9 directory to PCBuild 2007-12-31 15:18:55 +00:00
Christian Heimes cdaa2cbfd5 Added wininst-9.0.exe executable for VS 2008
Integrated bdist_wininst into PCBuild9 directory
2007-12-31 14:47:07 +00:00
Martin v. Löwis cb78de6d25 Bug #1699: Define _BSD_SOURCE only on OpenBSD. 2007-12-29 18:49:21 +00:00
Christian Heimes e93237dfcc #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
Christian Heimes 0a8143f646 Applied patch #1635: Float patch for inf and nan on Windows (and other platforms).
The patch unifies float("inf") and repr(float("inf")) on all platforms.
2007-12-18 23:22:54 +00:00
Raymond Hettinger fd7ed407d7 Give meaning to the oparg for BUILD_MAP: estimated size of the dictionary.
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.
2007-12-18 21:24:09 +00:00
Thomas Heller 153038efa4 Issue #1642: Fix segfault in ctypes when trying to delete attributes. 2007-12-18 19:00:34 +00:00
Christian Heimes db3d6cbce0 Fixed #1638: %zd configure test fails on Linux 2007-12-16 21:39:43 +00:00
Christian Heimes 90e10e79ea Fixed bug #1620: New @spam.getter property syntax modifies the property in place.
I added also the feature that a @prop.getter decorator does not overwrite the doc string of the property if it was given as an argument to property().
2007-12-14 02:35:23 +00:00
Guido van Rossum 7c862f8077 Patch #1608. Someone with access to autoconf 2.61 or higher needs to
run it and check in the resulting configure file.
2007-12-13 20:50:10 +00:00
Raymond Hettinger adf9ffdfbe Fix bug 1604. deque.__init__() did not clear existing contents like list.__init__. Not a backport candidate. 2007-12-13 00:08:37 +00:00
Christian Heimes 284d927625 Backport of r59456:59458 from py3k to trunk
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.
2007-12-10 22:28:56 +00:00
Christian Heimes 7c7f6afa92 Added wide char api variants of getch and putch to msvcrt module. The wide char methods are required to fix #1578 in py3k. I figured out that they might be useful in 2.6, too. 2007-12-10 15:12:41 +00:00
Skip Montanaro 26015494f2 When splitting, avoid making a copy of the string if the split doesn't find
anything (issue 1538).
2007-12-08 15:33:24 +00:00
Guido van Rossum 901464f131 Be (just a bit :) more specific about release date. 2007-12-08 04:38:23 +00:00
Andrew M. Kuchling 395fe44210 Spelling fix 2007-12-05 13:27:20 +00:00
Christian Heimes 7cc1c6f0af Added msg to Misc/NEWS 2007-12-05 12:52:34 +00:00
Martin v. Löwis 69233e87c4 Move nt.access change into the right section. 2007-12-04 08:39:16 +00:00
Martin v. Löwis 7b3cc06a9a Forward-port r59310:
os.access now returns True on Windows for any existing directory.
2007-12-03 23:09:04 +00:00
Christian Heimes 44eeaec173 Patch #1537 from Chad Austin
Change GeneratorExit's base class from Exception to BaseException
(This time I'm applying the patch to the correct sandbox.)
2007-12-03 20:01:02 +00:00
Martin v. Löwis 6b449f4f2b Issue #1727780: Support loading pickles of random.Random objects created
on 32-bit systems on 64-bit systems, and vice versa. As a consequence
of the change, Random pickles created by Python 2.6 cannot be loaded
in Python 2.5.
2007-12-03 19:20:02 +00:00
Christian Heimes c654fc2cad Added comment to Misc/NEWS for r59290 2007-12-03 13:55:16 +00:00
Nick Coghlan ef01d822aa Implement PEP 366 2007-12-03 12:55:17 +00:00
Lars Gustäbel 77b2d63b40 Issue #1531: Read fileobj from the current offset, do not seek to
the start.

(will backport to 2.5)
2007-12-01 21:02:12 +00:00
Christian Heimes dfdfaab1c5 Feature #1534
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.
2007-12-01 11:20:10 +00:00
Amaury Forgeot d'Arc dafd32b730 Issue #1521: on 64bit platforms, str.decode fails on very long strings.
The t# and w# formats were not correctly handled.

Will backport.
2007-11-30 20:51:40 +00:00
Amaury Forgeot d'Arc be49a90eb3 Add a NEWS entry for r59231 2007-11-30 20:37:22 +00:00
Christian Heimes 28104c58d2 Expose Py_Py3kWarningFlag as sys.py3kwarning as discussed in #1504
Also added a warning.warnpy3k() as convenient method for Python 3.x related deprecation warnings.
2007-11-27 23:16:44 +00:00
Skip Montanaro 58a6f446db back in these go - thanks to Titus Brown for the fix 2007-11-24 14:30:47 +00:00
Amaury Forgeot d'Arc ce7d10ccc4 Issue #1445: Fix a SystemError when accessing the ``cell_contents``
attribute of an empty cell object.  Now a ValueError is raised.
2007-11-24 13:44:17 +00:00
Skip Montanaro 98f4079fa0 revert 2007-11-24 04:31:15 +00:00
Skip Montanaro 90b5bc3a7d issue 1429818 2007-11-23 17:12:47 +00:00
Amaury Forgeot d'Arc f57375af28 Add a NEWS entry for r59076. 2007-11-21 01:38:26 +00:00
Christian Heimes 3f065a414a Added NEWS entry
Thanks for the reminder, Brett
2007-11-21 01:17:28 +00:00
Brett Cannon 43e53f85b6 doctest assumed that a package's __loader__.get_data() method used universal
newlines; it doesn't.  To rectify this the string returned replaces all
instances of os.linesep with '\n' to fake universal newline support.

Backport candidate.
2007-11-21 00:47:36 +00:00
Nick Coghlan 327a39b047 Patch #1739468: Directories and zipfiles containing __main__.py are now executable 2007-11-18 11:56:28 +00:00
Amaury Forgeot d'Arc 0d75f09177 Merge from py3k branch:
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.
2007-11-13 21:54:28 +00:00
Martin v. Löwis 63bf149a26 Patch #1418: Make the AC_REPLACE_FUNCS object files actually work. 2007-11-12 05:14:05 +00:00
Raymond Hettinger 1760c8a017 Add set.isdisjoint() 2007-11-08 02:52:43 +00:00