Commit Graph

3513 Commits

Author SHA1 Message Date
Georg Brandl 845c403c08 #1087741: make mmap.mmap the type of mmap objects, not a
factory function. Allow it to be subclassed.
2008-01-21 14:16:46 +00:00
Georg Brandl 66e7363c10 #1269: fix a bug in pstats.add_callers() and add a unit test file for pstats. 2008-01-21 10:24:59 +00:00
Georg Brandl 5235398323 #1669: don't allow shutil.rmtree() to be called on a symlink. 2008-01-20 14:17:42 +00:00
Georg Brandl 56112895d6 #1648: add sys.gettrace() and sys.getprofile(). 2008-01-20 13:59:46 +00:00
Georg Brandl d5e6cf2b15 #1664522: in urllib, don't read non-existing directories in ftp mode,
returning a 0-byte file -- raise an IOError instead.
Original patch from Phil Knirsch.
2008-01-20 12:18:17 +00:00
Georg Brandl 2235011d49 #856047: respect the ``no_proxy`` env var when checking for proxies
in urllib and using the other ``_proxy`` env vars.
Original patch by Donovan Baarda.
2008-01-20 12:05:43 +00:00
Georg Brandl 9b0d46db11 #1178141: add addinfourl.code to get http status code from urllib. 2008-01-20 11:43:03 +00:00
Gregory P. Smith f25680afd0 note for r60121 2008-01-20 01:26:04 +00:00
Andrew M. Kuchling 4a2762d146 Patch #1048820 from Stefan Wehr: add insert-mode editing to Textbox.
Fix an off-by-one error I noticed.
2008-01-20 00:00:38 +00:00
Gregory P. Smith 350d03b18a Fixes/Accepts Patch for issue1189216 - Work properly with archives
that have file headers past the 2**31 byte boundary.
2008-01-19 23:10:52 +00:00
Gregory P. Smith b9ba075400 note about r60104 2008-01-19 21:00:37 +00:00
Andrew M. Kuchling 060e6855a8 Patch #1019808 from Federico Schwindt: Return correct socket error when
a default timeout has been set, by using getsockopt() to get the error
condition (instead of trying another connect() call, which seems to be
a Linuxism).

2.5 bugfix candidate, assuming no one reports any problems with this change.
2008-01-19 20:47:59 +00:00
Georg Brandl 309501a617 #1663329: add os.closerange() to close a range of fds,
ignoring errors, and use this in subprocess to speed up
subprocess creation in close_fds mode. Patch by Mike Klaas.
2008-01-19 20:22:13 +00:00
Georg Brandl c6fde7293e Fix #1146: TextWrap vs words 1-character shorter than the width.
Patch by Quentin Gallet-Gilles.
2008-01-19 19:48:19 +00:00
Georg Brandl 14404b68d8 Fix #1679: "0x" was taken as a valid integer literal.
Fixes the tokenizer, tokenize.py and int() to reject this.
Patches by Malte Helmert.
2008-01-19 19:27:05 +00:00
Skip Montanaro 562133b8be missing from r60088 checkin. 2008-01-19 18:47:24 +00:00
Facundo Batista 6e22be7226 Comment in NEWS regarding the change in trace.py. 2008-01-19 18:45:46 +00:00
Andrew M. Kuchling 5c60bfcfbf Patch #976880: add mmap .rfind() method, and 'end' paramter to .find().
Contributed by John Lenton.
2008-01-19 18:18:41 +00:00
Andrew M. Kuchling 4be0bc642e Sort two names into position 2008-01-19 18:08:52 +00:00
Andrew M. Kuchling e45a77adbe Patch #742598 from Michael Pomraning: add .timeout attribute to SocketServer that will call
.handle_timeout() method when no requests are received within the timeout period.
2008-01-19 16:26:13 +00:00
Facundo Batista 2b1b195d39 Fix issue #1822: MIMEMultipart.is_multipart() behaves correctly for a
just-created (and empty) instance.  Added tests for this. Thanks
Jonathan Share.
2008-01-19 12:32:27 +00:00
Christian Heimes 288e89acfc Added bytes and b'' as aliases for str and '' 2008-01-18 18:24:07 +00:00
Christian Heimes bd865db90c Added win_add2path.py to Tools/scripts/
Added builddoc.bat to Doc/
2008-01-18 11:58:50 +00:00
Raymond Hettinger 44bd6c0a4f Issue #1861: Add read-only attribute listing upcoming events in the order they will be run. 2008-01-17 19:31:38 +00:00
Gregory P. Smith bde4ae4bde Fixes (accepts patch) issue1339 - http://bugs.python.org/issue1339
- Factor out the duplication of EHLO/HELO in login() and sendmail() to
  a new function, ehlo_or_helo_if_needed().
- Use ehlo_or_helo_if_needed() in starttls()
- Check for the starttls exception in starttls() in the same way as
  login() checks for the auth extension.
Contributed by Bill Fenner.
2008-01-17 08:35:49 +00:00
Gregory P. Smith 2b3ba58bf4 entry for r60015 2008-01-17 08:03:17 +00:00
Raymond Hettinger 473170908e Make starmap() match its pure python definition and accept any itertable input (not just tuples). 2008-01-17 03:02:14 +00:00
Raymond Hettinger 3ad2acc857 Add news entry. 2008-01-16 23:49:35 +00:00
Thomas Heller 415c1e36a9 Raise a TypeError instead of a ValueError when too many initializers
are used in a Structure or Union constructor.
2008-01-16 19:45:51 +00:00
Thomas Heller 02ec289f3e Raise a TypeError if conflicting positional and named arguments are
passed to a Structure or Union constructor.
2008-01-16 19:37:33 +00:00
Thomas Heller 902d30752f Convert the internal ctypes array type cache to a WeakValueDict so
that array types do not live longer than needed.
2008-01-16 19:16:27 +00:00
Guido van Rossum cad3724352 Issue #1786 (by myself): pdb should use its own stdin/stdout around an
exec call and when creating a recursive instance.
2008-01-15 17:59:29 +00:00
Raymond Hettinger cbf8f6cffb Temporarily revert 59967 until GC can be added. 2008-01-15 05:39:59 +00:00
Raymond Hettinger c216df9288 Issue 1820: structseq objects did not work with the % formatting operator or isinstance(t, tuple).
Orignal patch (without tests) by Leif Walsh.
2008-01-15 03:02:37 +00:00
Raymond Hettinger 351e1a3e88 Fix 1698398: Zipfile.printdir() crashed because the format string expected a tuple object of length six instead of a time.struct_time object. 2008-01-14 22:58:05 +00:00
Christian Heimes c94e2b5c12 Now that I've learnt about structseq objects I felt like converting sys.float_info to a structseq. It's
readonly and help(sys.float_info) explains the attributes nicely.
2008-01-14 04:13:37 +00:00
Christian Heimes f31b69f9db Applied patch #1816: sys.flags patch 2008-01-14 03:42:48 +00:00
Christian Heimes 9c2019632b Added new an better structseq representation. E.g. repr(time.gmtime(0)) now returns 'time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=1, tm_isdst=0)' instead of '(1970, 1, 1, 0, 0, 0, 3, 1, 0)'. The feature is part of #1816: sys.flags 2008-01-14 03:33:52 +00:00
Amaury Forgeot d'Arc e4c270c2a8 Re-apply patch #1700288 (first applied in r59931, rolled back in r59940)
now that ctypes uses a more supported method to create types:

Method cache optimization, by Armin Rigo, ported to 2.6 by Kevin Jacobs.
2008-01-14 00:29:41 +00:00
Georg Brandl d1c131a6e3 Back out r59931 - test_ctypes fails with it. 2008-01-13 15:04:05 +00:00
Georg Brandl 27e26ec418 Patch #1700288: Method cache optimization, by Armin Rigo, ported to
2.6 by Kevin Jacobs.
2008-01-12 13:47:57 +00:00
Mark Dickinson 59bc20bb27 Issue 1780: Allow leading and trailing whitespace in Decimal constructor,
when constructing from a string. Disallow trailing newlines in
Context.create_decimal.
2008-01-12 01:56:00 +00:00
Georg Brandl 2f32c39227 News entries for rev. 5990[567]. 2008-01-11 09:20:58 +00:00
Raymond Hettinger fff4e6e171 Doctest results return a named tuple for readability 2008-01-11 01:25:54 +00:00
Neal Norwitz 3fc15b8ba4 Reword entry, not sure I made it much better though. 2008-01-10 05:42:58 +00:00
Christian Heimes 3403f1589d Fixed #1776. __import__() no longer imports modules by file name 2008-01-09 19:56:33 +00:00
Fred Drake d4e5613c5f minor cleaning 2008-01-09 03:11:28 +00:00
Facundo Batista 4473d225a8 Issue 846388. Adds a call to PyErr_CheckSignals to
SRE_MATCH so that signal handlers can be invoked during
long regular expression matches.  It also adds a new
error return value indicating that an exception
occurred in a signal handler during the match, allowing
exceptions in the signal handler to propagate up to the
main loop.  Thanks Josh Hoyt and Ralf Schmitt.
2008-01-08 21:10:12 +00:00
Christian Heimes b39a756afd Added __enter__ and __exit__ functions to HKEY object
Added ExpandEnvironmentStrings to the _winreg module.
2008-01-08 15:46:10 +00:00
Andrew M. Kuchling 62182c8b72 Patch 1114: fix compilation of curses module on 64-bit AIX, and any other LP64 platforms where attr_t isn't a C long 2008-01-08 14:56:02 +00:00
Andrew M. Kuchling e0a49b6e05 Patch 1137: allow assigning to .buffer_size attribute of PyExpat.parser objects 2008-01-08 14:30:55 +00:00
Facundo Batista 52b25795c0 Issue #1757: The hash of a Decimal instance is no longer affected
by the current context.  Thanks Mark Dickinson.
2008-01-08 12:25:20 +00:00
Georg Brandl 62416bcf5a #467924, patch by Alan McIntyre: Add ZipFile.extract and ZipFile.extractall. 2008-01-07 18:47:44 +00:00
Georg Brandl aed6c66aa8 patch #1668: clarify envvar docs; rename THREADDEBUG to PYTHONTHREADDEBUG. 2008-01-07 17:25:53 +00:00
Georg Brandl 2da0fceba7 Patch #602345 by Neal Norwitz and me: add -B option and PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode. 2008-01-07 17:09:35 +00:00
Christian Heimes fb2d25a154 Issue #1646: Make socket support TIPC. The socket module now has support
for TIPC under Linux, see http://tipc.sf.net/ for more information.
Thanks to Alberto Bertogli for the patch
2008-01-07 16:12:44 +00:00
Facundo Batista e9766c8acb Added Mark Dickinson. 2008-01-06 21:13:12 +00:00
Georg Brandl 183a084da3 #1742: don't raise exception on os.path.relpath("a", "a"), but return os.curdir.
Reported by Jesse Towner.
2008-01-06 14:27:15 +00:00
Guido van Rossum eb94d4c3e3 Add John Nagle (of issue #1637). 2008-01-05 22:20:01 +00:00
Guido van Rossum c6a04c2629 Patch #1637: fix urlparse for URLs like 'http://x.com?arg=/foo'.
Fix by John Nagle.
2008-01-05 22:19:06 +00:00
Guido van Rossum ced4eb06e4 Patch #1698 by Senthil: allow '@' in username when parsed by urlparse.py. 2008-01-05 01:21:57 +00:00
Christian Heimes 04ae916fa2 Added interface to Windows' WSAIoctl and a simple example for a network sniffer. 2008-01-04 15:23:30 +00:00
Lars Gustäbel 2ee1c760cc Issue #1735: TarFile.extractall() now correctly sets
directory permissions and times.

(will backport to 2.5)
2008-01-04 14:00:33 +00:00
Christian Heimes 0687561c94 Bug #1713: posixpath.ismount() claims symlink to a mountpoint is a mountpoint. 2008-01-04 13:21:07 +00:00
Andrew M. Kuchling adc60ab626 Typo fix 2008-01-04 02:26:00 +00:00
Amaury Forgeot d'Arc e0b7695286 Partial port of r59682 from py3k.
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.
2008-01-04 02:04:15 +00:00
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
Brett Cannon a6ae8974c1 Make trailing whitespace explicit (including when it is an all-whitespace
line).
2007-12-24 23:43:30 +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
Guido van Rossum 137c49ce6a Patch #1643738 by Ulisses Furquim -- make the is_tripped variable
in signalmodule.c more robust.  Includes Martin von Loewis's suggestion
to set is_tripped after .tripped.
2007-12-10 23:00:12 +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
Georg Brandl 953f5faade Add Jeff Wheeler. 2007-12-09 22:38:26 +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
Georg Brandl dc563a655f Fix Eren's name. 2007-12-08 11:05:36 +00:00
Guido van Rossum 901464f131 Be (just a bit :) more specific about release date. 2007-12-08 04:38:23 +00:00
Georg Brandl 5d1b4d44aa Increase unit test coverage of SimpleXMLRPCServer.
Written for GHOP by Turkay Eren.
2007-12-07 09:07:10 +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
Georg Brandl e4317fade8 Add test suite for cmd module.
Written by Michael Schneider for GHOP.
2007-12-01 22:38:48 +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
Martin v. Löwis d3d0baf0a1 Add Amaury Forgeot d'Arc. 2007-11-09 22:56:30 +00:00
Raymond Hettinger 1760c8a017 Add set.isdisjoint() 2007-11-08 02:52:43 +00:00
Nick Coghlan 90b858e1b3 Add missing NEWS entry 2007-11-07 11:57:51 +00:00
Raymond Hettinger dc1d1ba9cf Add build option for faster loop execution. 2007-11-07 02:45:46 +00:00
Raymond Hettinger 12e94200c0 Fix marshal's incorrect handling of subclasses of builtin types (backport candidate). 2007-11-07 01:13:09 +00:00
Gregory P. Smith e1ac4f1930 Fixes Issue 1385: The hmac module now computes the correct hmac when using
hashes with a block size other than 64 bytes (such as sha384 and sha512).
2007-11-06 00:19:03 +00:00
Gregory P. Smith ac11e02143 Add the bsddb.db.DBEnv.lock_id_free method.
Improve test_lock's tempdir creation and cleanup.
2007-11-05 02:56:31 +00:00
Gregory P. Smith ec10a4a402 Fixes bug 477182 on pybsddb.sf.net. DB objects now load the flags and
pay attention to them when opening an existing database.  This means
that d[] behaves properly even on databases previously created with DB_DUP
or DB_DUPSORT flags to allow duplicate keys.

http://sourceforge.net/tracker/index.php?func=detail&aid=477182&group_id=13900&atid=113900

Do not backport, this bugfix could be considered an API change.
2007-11-05 02:32:26 +00:00
Thomas Heller 486b1b0268 Issue #1292: On alpha, arm, ppc, and s390 linux systems the
--with-system-ffi configure option defaults to "yes" because the
bundled libffi sources are too old.
2007-11-02 19:10:24 +00:00
Gregory P. Smith f7601ee2c0 false "fix" undone as correct problem was found and fixed. 2007-11-01 21:17:47 +00:00
Martin v. Löwis 50bf1155a8 Adding Christian Heimes. 2007-10-31 17:19:33 +00:00
Hye-Shik Chang a838a801f2 - Add support for FreeBSD 8 which is recently forked from FreeBSD 7.
- Regenerate IN module for most recent maintenance tree of FreeBSD 6 and 7.
2007-10-28 11:19:02 +00:00
Georg Brandl 1a94ec2664 Bug #1287: make os.environ.pop() work as expected. 2007-10-24 21:40:38 +00:00
Matthias Klose 9afb9850f2 - Build using system ffi library on arm*-linux*. 2007-10-24 20:00:44 +00:00
Raymond Hettinger 3f8caa3ba7 Optimize sum() for integer and float inputs. 2007-10-24 01:28:33 +00:00
Raymond Hettinger cd3c108ca1 Fixup news entry 2007-10-23 21:23:07 +00:00
Raymond Hettinger 01a0957f06 Shorter name for namedtuple() 2007-10-23 20:37:41 +00:00
Neal Norwitz aef8e55269 Add Chris Monson so he can edit PEPs. 2007-10-22 04:47:54 +00:00
Thomas Heller 91ac42243c Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
See also https://bugs.launchpad.net/bugs/72505.

Ported from release25-maint branch.
2007-10-19 18:11:41 +00:00
Gregory P. Smith 82eafe6adf mention bsddb fixes. 2007-10-18 17:17:57 +00:00
Martin v. Löwis d476a400b4 Bug #1216: Restore support for Visual Studio 2002.
Will backport to 2.5.
2007-10-12 08:56:52 +00:00
Thomas Heller 7fee6dd2a3 On OS X, use os.uname() instead of gestalt.sysv(...) to get the
operating system version.  This allows to use ctypes when Python
was configured with --disable-toolbox-glue.
2007-10-11 19:51:32 +00:00
Raymond Hettinger a48a29947a Eliminate camelcase function name 2007-10-08 21:26:58 +00:00
Neal Norwitz 44f326ef2a Add a note about fixing some more warnings found by Coverity. 2007-10-05 05:29:17 +00:00
Raymond Hettinger a7fc4b13e0 Add __asdict__() to NamedTuple and refine the docs.
Add maxlen support to deque() and fixup docs.
Partially fix __reduce__().  The None as a third arg was no longer supported.
Still needs work on __reduce__() to handle recursive inputs.
2007-10-05 02:47:07 +00:00
Raymond Hettinger 50e90e265f itertools.count() no longer limited to sys.maxint. 2007-10-04 00:20:27 +00:00
Raymond Hettinger 8f6693701c enumerate() is no longer bounded to using sequences shorter than LONG_MAX. The possibility of overflow was sending some newsgroup posters into a tizzy. 2007-10-03 21:18:11 +00:00
Brett Cannon 0b14f243c4 tuple.__repr__ did not consider a reference loop as it is not possible from
Python code; but it is possible from C.  object.__str__ had the issue of not
expecting a type to doing something within it's tp_str implementation that
could trigger an infinite recursion, but it could in C code..  Both found
thanks to BaseException and how it handles its repr.

Closes issue #1686386.  Thanks to Thomas Herve for taking an initial stab at
coming up with a solution.
2007-09-30 19:45:10 +00:00
Georg Brandl aff85e2d26 Patch #1541463: optimize performance of cgi.FieldStorage operations. 2007-09-20 16:06:07 +00:00
Facundo Batista 673debfd63 Annotated the correction to urllib.py, issue #1177 2007-09-19 14:02:03 +00:00
Facundo Batista b67da23718 Decimal is updated, :) 2007-09-17 16:26:50 +00:00
Brett Cannon 0153159e67 Add a bunch of GIL release/acquire points in tp_print implementations and for
PyObject_Print().

Closes issue #1164.
2007-09-17 03:28:34 +00:00
Georg Brandl 8fd3ecf928 Bug #1153: repr.repr() now doesn't require set and dictionary items
to be orderable to properly represent them.
2007-09-12 19:00:07 +00:00
Brett Cannon 4c20bc40d7 Generators had their throw() method allowing string exceptions. That's a
no-no.

Fixes issue #1147.  Need to fix 2.5 to raise a proper warning if a string
exception is passed in.
2007-09-11 21:02:28 +00:00
Brett Cannon a0c05512ec Fix a possible segfault from recursing too deep to get the repr of a list.
Closes issue #1096.
2007-09-10 21:38:27 +00:00
Thomas Heller 2825b2ea44 Add a 'c_longdouble' type to the ctypes module. 2007-09-07 06:32:17 +00:00
Brett Cannon 1e534b5425 Fix a crasher where Python code managed to infinitely recurse in C code without
ever going back out to Python code in PyObject_Call().  Required introducing a
static RuntimeError instance so that normalizing an exception there is no
reliance on a recursive call that would put the exception system over the
recursion check itself.
2007-09-07 04:18:30 +00:00
Martin v. Löwis d44a4e9719 Patch #786737: Allow building in a tree of symlinks pointing to
a readonly source.
2007-09-05 11:47:34 +00:00
Matthias Klose 38336406eb - Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*. 2007-09-04 20:46:02 +00:00
Matthias Klose 642ac8530a - Makefile.pre.in(buildbottest): Run an optional script pybuildbot.identify
to include some information about the build environment.
2007-09-04 18:17:36 +00:00
Martin v. Löwis a5136196bc Patch #1031213: Decode source line in SyntaxErrors back to its original
source encoding. Will backport to 2.5.
2007-09-04 14:19:28 +00:00
Martin v. Löwis 58bd49f5fe Patch #1388440: Add set_completion_display_matches_hook and
get_completion_type to readline.
2007-09-04 13:13:14 +00:00
Matthias Klose 691632f14d - Added support for linking the bsddb module against BerkeleyDB 4.6.x. 2007-09-03 23:33:04 +00:00
Martin v. Löwis 8bc77e4b33 Bug #1737210: Change Manufacturer of Windows installer to PSF.
Will backport to 2.5.
2007-09-01 06:36:03 +00:00
Martin v. Löwis 7dcb83cdc5 Bug #1709599: Run test_1565150 only if the file system is NTFS. 2007-08-30 19:04:09 +00:00
Martin v. Löwis 75c23bddbe Bug #1746880: Correctly install DLLs into system32 folder on Win64. 2007-08-30 18:25:47 +00:00
Bill Janssen f413fb06b9 added note on new ssl module and deprecation of socket.ssl 2007-08-30 18:08:06 +00:00
Neal Norwitz 4a40f0ceb7 Add Bill as a developer 2007-08-29 06:15:33 +00:00
Skip Montanaro 3e275363b6 Recent items. 2007-08-29 01:33:45 +00:00
Lars Gustäbel 0f4a14b56f TarFile.__init__() no longer fails if no name argument is passed and
the fileobj argument has no usable name attribute (e.g. StringIO).

(will backport to 2.5)
2007-08-28 12:31:09 +00:00
Guido van Rossum 95f1a1be3d News about functools.reduce. 2007-08-27 20:52:10 +00:00
Guido van Rossum 4f2c3ddca4 Server-side SSL and certificate validation, by Bill Janssen.
While cleaning up Bill's C style, I may have cleaned up some code
he didn't touch as well (in _ssl.c).
2007-08-25 15:08:43 +00:00
Georg Brandl 8ec5754086 uuid creation is now threadsafe, backport from py3k rev. 57375. 2007-08-24 06:10:01 +00:00
Brett Cannon dbed7a7394 Make test_runpy re-entrant. 2007-08-23 14:53:17 +00:00
Hye-Shik Chang 2390104d81 Add cheot-ga-keut composed make-up sequence support in EUC-KR codec. 2007-08-20 06:49:18 +00:00
Brett Cannon f839e494fc Remove Mikael as the maintainer of BeOS at his request. With no maintainer
should the port be deprecated in 2.6?
2007-08-18 18:30:36 +00:00
Brett Cannon 414f3f90f0 Remove news entry for test.test_support.guard_warnings_filter as it has been
removed.
2007-08-17 18:59:58 +00:00
Walter Dörwald 6e39080649 Backport r57105 and r57145 from the py3k branch: UTF-32 codecs. 2007-08-17 16:41:28 +00:00
Neal Norwitz 82955f6787 Update the tools before building the docs 2007-08-17 04:10:55 +00:00
Neal Norwitz 5c404aed0e Try to make the comment a little clearer. 2007-08-16 05:16:09 +00:00
Neal Norwitz 7def3e05ce Support the new doc system. 2007-08-16 05:07:03 +00:00
Neal Norwitz 35c20969c8 Added Jeffrey Yasskin, reformat some lines to be consistent (and shorter). 2007-08-10 05:47:30 +00:00
Georg Brandl 9616444427 Revert the fix for #1548891, it broke backwards compatibility with arbitrary read buffers.
Fixes #1730114.
2007-08-08 13:03:41 +00:00
Hye-Shik Chang f3e93a0268 Fix gb18030 codec's bug that doesn't map two-byte characters on
GB18030 extension in encoding. (bug reported by Bjorn Stabell)
2007-08-04 04:10:18 +00:00
Neal Norwitz 766d880a2f Py_ssize_t is defined regardless of HAVE_LONG_LONG. Will backport 2007-08-03 06:46:29 +00:00
Matthias Klose eb8ff67fd7 - Allow Emacs 22 for building the documentation in info format. 2007-08-02 21:33:13 +00:00
Martin v. Löwis 76760b0e8f Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD 4.1+. 2007-07-31 19:57:56 +00:00
Martin v. Löwis f1e0b3f630 Bug #1704793: Return UTF-16 pair if unicodedata.lookup cannot
represent the result in a single character.
2007-07-28 07:03:05 +00:00
Martin v. Löwis f25e35b9ec Bug #978833: Close https sockets by releasing the _ssl object. 2007-07-27 18:28:22 +00:00
Martin v. Löwis 254b8f9096 Change location of the package index to pypi.python.org/pypi 2007-07-25 16:24:23 +00:00
Martin v. Löwis 6819210b9e PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Thomas Heller ef4fff3435 Fix for SF# 1649098: avoid zero-sized array declaration in structure. 2007-07-13 17:46:54 +00:00
Thomas Heller fa704c6ade Fix for SF# 1701409: segfault in c_char_p of ctypes. The repr output
of c_char_p and c_wchar_p has changed as a sideeffect.
2007-07-13 17:12:23 +00:00
Georg Brandl 4b3ab6fcc0 Patch #1675424: Added tests for uncovered code in the zipfile module.
The KeyError raised by Zipfile.getinfo for nonexistent names now has
  a descriptive message.
2007-07-12 09:59:22 +00:00
Georg Brandl 9467bc5ad1 Bug #1637365: add subsection about "__name__ == __main__" to the
Python tutorial.
2007-07-12 09:37:49 +00:00
Georg Brandl 7c3b50db66 Patch #1673759: add a missing overflow check when formatting floats
with %G.
2007-07-12 08:38:00 +00:00
Lars Gustäbel 104490e615 Added exclude keyword argument to the TarFile.add() method. 2007-06-18 11:42:11 +00:00
Martin v. Löwis cd1690e62d Mention Senthil Kumaran. 2007-06-16 10:08:43 +00:00
Neal Norwitz df4622690b urllib2_localnet says it leaks probably due to threads. So ignore it.
popen2 is also complaining probably for similar reasons.
make install always reports failure, so don't mail in this case.
2007-06-15 03:11:41 +00:00
Walter Dörwald 84a3efec37 Add T_PYSSIZET in structmember.h: This can be used for
Py_ssize_t members.

Simplify the implementation of UnicodeError objects:
start and end attributes are now stored directly as
Py_ssize_t members, which simplifies various get and
set functions.
2007-06-13 16:57:12 +00:00
Neal Norwitz db2b1b3389 Reflow long line 2007-06-11 07:36:24 +00:00
Neal Norwitz c161cb9955 Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute.
Will backport
2007-06-11 07:29:43 +00:00
Neal Norwitz 59953571fb Ignore valgrind problems on Ubuntu from ld 2007-06-11 01:22:03 +00:00
Neal Norwitz 67862ba34c Add Atul Varma for patch # 1667860 2007-06-11 00:42:11 +00:00
Martin v. Löwis 6371cd8177 Patch #1733960: Allow T_LONGLONG to accept ints.
Will backport to 2.5.
2007-06-09 07:42:52 +00:00
Neal Norwitz 7dbd2a3720 Prevent expandtabs() on string and unicode objects from causing a segfault when
a large width is passed on 32-bit platforms.  Found by Google.

It would be good for people to review this especially carefully and verify
I don't have an off by one error and there is no other way to cause overflow.
2007-06-09 03:36:34 +00:00
Martin v. Löwis da587ab43e Bug #1733488: Fix compilation of bufferobject.c on AIX.
Will backport to 2.5.
2007-06-08 17:29:20 +00:00
Facundo Batista 10951d51e2 Added an optional timeout parameter to function urllib2.urlopen,
with tests in test_urllib2net.py (must have network resource
enabled to execute them). Also modified test_urllib2.py because
testing mock classes must take it into acount. Docs are also
updated.
2007-06-06 17:15:23 +00:00
Facundo Batista 9249312020 FTP.ntransfercmd method now uses create_connection when passive,
using the timeout received in connection time.
2007-06-06 15:13:37 +00:00
Hye-Shik Chang 9b5414090b Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it
reads a file that ends with incomplete sequence and sizehint argument
for .read() is specified.
2007-06-05 18:58:51 +00:00
Brett Cannon f7188cefb3 Make _strptime.TimeRE().pattern() use ``\s+`` for matching whitespace instead
of ``\s*``.  This prevents patterns from "stealing" bits from other patterns in
order to make a match work.

Closes bug #1730389.  Will be backported.
2007-06-03 23:13:41 +00:00
Brett Cannon 19fab761b7 Have configure raise an error when building on AtheOS. Code specific to AtheOS
will be removed in Python 2.7.
2007-06-02 03:02:29 +00:00
Georg Brandl 25497a1fa1 Fix wrong issue number. 2007-06-01 19:20:27 +00:00
Georg Brandl a5ea68905a Bug #1722484: remove docstrings again when running with -OO. 2007-06-01 11:33:33 +00:00
Neal Norwitz 4a700bb469 SF 1668596/1720897: distutils now copies data files
even if package_dir is empty.

This needs to be backported.  I'm too tired tonight.  It would be great
if someone backports this if the buildbots are ok with it.  Otherwise,
I will try to get to it tomorrow.
2007-06-01 07:29:12 +00:00
Neal Norwitz 19a7daa507 Mail if there is an installation failure. 2007-06-01 04:56:47 +00:00
Brett Cannon f0cb1d7ad6 Have cfmfile raise a DeprecationWarning as per PEP 4. 2007-05-31 20:01:11 +00:00
Brett Cannon 791d56f1f7 Cause buildtools to raise a DeprecationWarning. 2007-05-31 19:40:42 +00:00
Brett Cannon c2aa09ad80 Have the sha module raise a DeprecationWarning as specified in PEP 4. 2007-05-31 19:20:00 +00:00
Brett Cannon 7eec217908 Have md5 raise a DeprecationWarning as per PEP 4. 2007-05-30 22:24:28 +00:00
Brett Cannon c249bdab92 Have mimify raise a DeprecationWarning. The docs and PEP 4 have listed the
module as deprecated for a while.
2007-05-30 21:48:58 +00:00
Brett Cannon 90134c9a05 Have MimeWriter raise a DeprecationWarning as per PEP 4 and its documentation. 2007-05-30 20:46:26 +00:00
Neal Norwitz adf694bd95 Fix typo in doc 2007-05-29 07:51:39 +00:00
Lars Gustäbel a0fcb9384e Added errors argument to TarFile class that allows the user to
specify an error handling scheme for character conversion. Additional
scheme "utf-8" in read mode. Unicode input filenames are now
supported by design. The values of the pax_headers dictionary are now
limited to unicode objects.

Fixed: The prefix field is no longer used in PAX_FORMAT (in
conformance with POSIX).
Fixed: In read mode use a possible pax header size field.
Fixed: Strip trailing slashes from pax header name values.
Fixed: Give values in user-specified pax_headers precedence when
writing.

Added unicode tests. Added pax/regtype4 member to testtar.tar all
possible number fields in a pax header.

Added two chapters to the documentation about the different formats
tarfile.py supports and how unicode issues are handled.
2007-05-27 19:49:30 +00:00
Neal Norwitz 0ac601995c Add the new function object attribute names from py3k. 2007-05-27 04:08:54 +00:00
Facundo Batista 711a54ebde Added an optional timeout parameter to urllib.ftpwrapper, with tests
(for this and a basic one, because there weren't any). Changed also
NEWS, but didn't find documentation for this function, assumed it
wasn't public...
2007-05-24 17:50:54 +00:00
Georg Brandl c90bc75994 shlex.split() now has an optional "posix" parameter. 2007-05-24 16:49:29 +00:00
Neal Norwitz 8b2bfbc198 Add -3 option to the interpreter to warn about features that are
deprecated and will be changed/removed in Python 3.0.

This patch is mostly from Anthony.  I tweaked some format and added
a little doc.
2007-05-23 06:35:32 +00:00
Georg Brandl 2134e754f2 Patch #1686487: you can now pass any mapping after '**' in function calls. 2007-05-21 20:34:16 +00:00
Facundo Batista 70f996be24 Added timeout support to HTTPSConnection, through the
socket.create_connection function. Also added a small
test for this, and updated NEWS file.
2007-05-21 17:32:32 +00:00
Martin v. Löwis 6f738162ae Add Alexandre Vassalotti. 2007-05-21 04:35:47 +00:00
Brett Cannon 41bf2fad62 Cause posixfile to raise a DeprecationWarning. Documented as deprecated since
Ptyhon 1.5.
2007-05-20 23:57:38 +00:00
Brett Cannon 5e2635103c Remove the macfs module. This led to the deprecation of macostools.touched();
it completely relied on macfs and is a no-op on OS X according to code
comments.
2007-05-20 23:17:38 +00:00
Brett Cannon dc48b74497 Remove the rgbimg module. It has been deprecated since Python 2.5. 2007-05-20 07:09:50 +00:00
Neal Norwitz 59f58aaeed Clear data so random memory does not get freed. Will backport. 2007-05-19 03:48:47 +00:00
Collin Winter 6290305e67 Backport PEP 3110's new 'except' syntax to 2.6. 2007-05-18 23:11:24 +00:00
Brett Cannon d75f043c33 Remove the gopherlib module. It has been raising a DeprecationWarning since
Python 2.5.

Also remove gopher support from urllib/urllib2.  As both imported gopherlib the
usage of the support would have raised a DeprecationWarning.
2007-05-16 22:42:29 +00:00
Neal Norwitz b1a9b37aa8 Fix bug in marshal where bad data would cause a segfault due to
lack of an infinite recursion check.

Contributed by Damien Miller at Google.
2007-05-16 20:05:11 +00:00
Brett Cannon fa155111b4 Change the maintainer of the BeOS port. 2007-05-16 05:50:03 +00:00
Neal Norwitz e0e70a42fa Mention removal of some directories for obsolete platforms 2007-05-16 05:06:33 +00:00
Georg Brandl a09a96a544 HTML-escape the plain traceback in cgitb's HTML output, to prevent
the traceback inadvertently or maliciously closing the comment and
injecting HTML into the error page.
2007-05-15 20:19:34 +00:00
Neal Norwitz 25e4461666 Remove references to stdwin which was removed long ago. 2007-05-13 20:54:19 +00:00
Neal Norwitz 42dd86b8e2 Deprecate os.popen* and popen2 module in favor of the subprocess module. 2007-05-11 06:57:33 +00:00
Neal Norwitz d9841039db Don't ever report a failure when the sum of the reference count differences
are zero.  This should help reduce the false positives.

The message about references leaking is maintained to provide as much
info as possible rather than simply suppressing the message at the source.
2007-05-11 05:55:15 +00:00
Neal Norwitz 58e123d75e Verify changes to the trunk go to the normal checkins list 2007-05-07 07:02:26 +00:00
Vinay Sajip 8549ce335f Updates of recent changes to logging. 2007-05-06 17:53:37 +00:00
Brett Cannon 229cee2d3d Deprecate BaseException.message as per PEP 352. 2007-05-05 01:34:02 +00:00
Armin Rigo 9790a27065 Fix for #1303614 and #1174712:
- __dict__ descriptor abuse for subclasses of built-in types
- subclassing from both ModuleType and another built-in types

Thanks zseil for the patch.
2007-05-02 19:23:31 +00:00
Neal Norwitz 714e19a7bd There really are some tests that are problematic. 2007-04-29 23:53:24 +00:00