Commit Graph

2759 Commits

Author SHA1 Message Date
Brett Cannon 90134c9a05 Have MimeWriter raise a DeprecationWarning as per PEP 4 and its documentation. 2007-05-30 20:46:26 +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
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
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 42dd86b8e2 Deprecate os.popen* and popen2 module in favor of the subprocess module. 2007-05-11 06:57:33 +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
Georg Brandl 3dc6e90a2e Patch #1698768: updated the "using Python on the Mac" intro. 2007-04-25 06:24:59 +00:00
Georg Brandl fb4b3b77c7 Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file
(as opposed to the command line) will now write file names ending in
".cpp" too.
2007-04-24 15:27:13 +00:00
Facundo Batista d918a65802 Added a comment about last change in urllib2.py (all 2xx responses
are ok now).
2007-04-24 13:54:38 +00:00
Neal Norwitz cbd9ee69ee When __slots__ are set to a unicode string, make it work the same as
setting a plain string, ie don't expand to single letter identifiers.
2007-04-14 05:25:50 +00:00
Walter Dörwald 4234827e99 Fix utf-8-sig incremental decoder, which didn't recognise a BOM when the
first chunk fed to the decoder started with a BOM, but was longer than 3 bytes.
2007-04-12 10:35:00 +00:00
Raymond Hettinger 4db5fe970c SF 1193128: Let str.translate(None) be an identity transformation 2007-04-12 04:10:00 +00:00
Raymond Hettinger 13936697f6 SF 1191699: Make slices picklable 2007-04-11 18:40:58 +00:00
Brett Cannon 55a1864832 Doc that file.next() has undefined behaviour when called on a file opened with
'w'.  Closes bug #1569057.

To be backported once 2.5 branch is unfrozen.
2007-04-08 04:29:32 +00:00
Martin v. Löwis 3bf573f918 Bug #1686475: Support stat'ing open files on Windows again.
Will backport to 2.5.
2007-04-04 18:30:36 +00:00
Walter Dörwald e6dae6c655 Implement a contextmanager test.test_support.catch_warning that can
be used to catch the last warning issued by the warning framework.

Change test_warnings.py and test_structmembers.py to use this
new contextmanager.
2007-04-03 18:33:29 +00:00
Matthias Klose e19e0c21ae - Fix an off-by-one bug in locale.strxfrm().
patch taken from http://bugs.debian.org/416934.
2007-04-03 04:35:59 +00:00
Brett Cannon c69066501b time.strptime's caching of its locale object was being recreated when the
locale changed but not used during the function call it was recreated during.

The test in this checkin is untested (OS X does not have the proper locale
support for me to test), although the fix for the bug this deals with
was tested by the OP (#1290505).  Once the buildbots verify the test at least
doesn't fail it becomes a backport candidate.
2007-04-01 18:47:27 +00:00
Neal Norwitz 8f35f44af3 SF #1685563, MSVCCompiler creates redundant and long PATH strings
If MSVCCompiler.initialize() was called multiple times, the path
would get duplicated.  On Windows, this is a problem because the
path is limited to 4k.  There's no benefit in adding a path multiple
times, so prevent that from occuring.  We also normalize the path
before checking for duplicates so things like /a and /a/ won't both
be stored.

Will backport.
2007-04-01 18:24:22 +00:00
Georg Brandl db84603760 Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
returned by python-config if Python was built with --enable-shared
because that prevented the shared library from being used.
2007-03-31 18:56:11 +00:00
Facundo Batista b6a5c9d605 Added timout parameter to telnetlib.Telnet. Also created
test_telnetlib.py with a basic test and timeout ones.
Docs are also updated.
2007-03-29 18:22:35 +00:00
Žiga Seilnacht c64ad484a9 Patch #1489771: update syntax rules in Python Reference Manual.
Python 2.5 added support for explicit relative import statements and
yield expressions, which were missing in the manual.
Also fix grammar productions that used the names from the Grammar file,
markup that broke the generated grammar.txt, and wrap some lines that
broke the pdf output.  Will backport.
2007-03-24 14:24:26 +00:00
Guido van Rossum 234b1ff24f Add note about type.__init__(). 2007-03-23 19:39:01 +00:00
Facundo Batista 07c78be0b4 Added a 'create_connect()' function to socket.py, which creates a
connection with an optional timeout, and modified httplib.py to
use this function in HTTPConnection. Applies patch 1676823.
2007-03-23 18:54:07 +00:00
Martin v. Löwis 0af338859b Bug #978833: Revert r50844, as it broke _socketobject.dup.
Will backport.
2007-03-23 13:27:15 +00:00
Martin v. Löwis 2f401d7186 Patch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.
Will backport.
2007-03-23 10:35:49 +00:00
Guido van Rossum 143b564059 - Bug #1683368: The object.__init__() and object.__new__() methods are
now stricter in rejecting excess arguments.  The only time when
  either allows excess arguments is when it is not overridden and the
  other one is.  For backwards compatibility, when both are
  overridden, it is a deprecation warning (for now; maybe a Py3k
  warning later).

When merging this into 3.0, the warnings should become errors.

Note: without the change to string.py, lots of spurious warnings happen.
What's going on there?
2007-03-23 04:58:42 +00:00
Thomas Heller f493cbd824 Back out "Patch #1643874: memory leak in ctypes fixed."
The code in this patch leaves no way to give up the ownership of a
BSTR instance.
2007-03-22 19:44:31 +00:00
Žiga Seilnacht 7492e4260e Bug #1675967: re patterns pickled with older Python versions can
now be unpickled. Will backport.
2007-03-21 20:07:56 +00:00
Georg Brandl cae9f3d916 New test for rev. 54407 which only uses directories under TESTFN. 2007-03-21 09:10:29 +00:00
Georg Brandl 5cb76c19ba Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
2007-03-21 09:00:39 +00:00
Neal Norwitz aa754b70b0 Remove unused file spotted by Paul Hankin 2007-03-21 06:39:48 +00:00
Neal Norwitz c990f6454f Try backing out 54407 to see if it corrects the problems on the Windows
buildbots.  This rev was backported, so we will need to keep both branches
in sync, pending the outcome of the test after this checkin.
2007-03-20 05:23:09 +00:00
Collin Winter a8785cc26a Patch #1630118: add a SpooledTemporaryFile class to tempfile. 2007-03-19 18:52:08 +00:00
Gregory P. Smith f09c626a42 move note to the correct section 2007-03-17 22:33:35 +00:00
Georg Brandl 2b869943fa Patch #1675423: PyComplex_AsCComplex() now tries to convert an object
to complex using its __complex__() method before falling back to the
__float__() method. Therefore, the functions in the cmath module now
can operate on objects that define a __complex__() method.
 (backport)
2007-03-17 16:08:45 +00:00
Collin Winter 6f187743ff Patch 1339796: add a relpath() function to os.path. 2007-03-16 22:16:08 +00:00
Žiga Seilnacht 6f2d09c949 Patch #1623563: allow __class__ assignment for classes with __slots__.
The old and the new class are still required to have the same slot
names, but the order in which they are specified is not relevant.
2007-03-16 11:59:38 +00:00
Georg Brandl 8844e438b1 Patch #1273829: os.walk() now has a "followlinks" parameter. If set to
True (which is not the default), it visits symlinks pointing to
directories.
2007-03-16 08:22:40 +00:00
Georg Brandl 8f06d02935 Bug #1681228: the webbrowser module now correctly uses the default
GNOME or KDE browser, depending on whether there is a session of one
of those present. Also, it tries the Windows default browser before
trying Mozilla variants.
 (backport)
2007-03-16 07:55:09 +00:00
Collin Winter 77c67bd585 Patch #1642547: Fix an error/crash when encountering syntax errors in complex if statements.
Will backport.
2007-03-16 04:11:30 +00:00
Žiga Seilnacht 20f43d3018 Patch #1462488: prevent a segfault in object_reduce_ex() by splitting
the implementation for __reduce__ and __reduce_ex__ into two separate
functions. Fixes bug #931877. Will backport.
2007-03-15 11:44:55 +00:00
Georg Brandl ab1f4674ad Patch #1681153: the wave module now closes a file object it opened if
initialization failed.
2007-03-15 07:41:30 +00:00
Neal Norwitz 72d9eec1bb Wrap a long line and fix a typo (is -> if) 2007-03-15 04:41:20 +00:00
Brett Cannon ea2835a860 Raise ResourceDenied in test_urllib2net when the Net connection goes bad. 2007-03-14 21:44:15 +00:00
Brett Cannon ed001842cf Note how test_socket_ssl has various exceptions that deal with a flaky Net
connection are silenced.
2007-03-14 21:40:13 +00:00
Martin v. Löwis cd1210a55f Patch #1559413: Fix test_cmd_line if sys.executable contains a space.
Will backport.
2007-03-14 20:02:31 +00:00
Žiga Seilnacht 71436f0229 Patch #1680015: Don't modify __slots__ tuple if it contains an unicode
name. Remove a reference leak that happened if the name could not be
converted to string. Will backport.
2007-03-14 12:24:09 +00:00
Georg Brandl f66b6039c1 Bug #767111: fix long-standing bug in urllib which caused an
AttributeError instead of an IOError when the server's response didn't
contain a valid HTTP status line.
2007-03-14 08:27:52 +00:00
Georg Brandl 4aef7275cb Patch #1185447: binascii.b2a_qp() now correctly quotes binary characters
with ASCII value less than 32. Also, it correctly quotes dots only if
they occur on a single line, as opposed to the previous behavior of
quoting dots if they are the second character of any line.
2007-03-13 22:49:43 +00:00
Georg Brandl 03b90d8cfd Patch #957650: "%var%" environment variable references are now properly
expanded in ntpath.expandvars(), also "~user" home directory references
are recognized and handled on Windows.
2007-03-13 22:07:36 +00:00
Georg Brandl b6ae6aa8ac Patch #1429539: pdb now correctly initializes the __main__ module for
the debugged script, which means that imports from __main__ work
correctly now.
2007-03-13 21:58:44 +00:00
Georg Brandl bad6f1904b NEWS entry for getstatus() deprecation. 2007-03-13 21:32:56 +00:00
Georg Brandl 8e84c65660 Patch #1393667: pdb now has a "run" command which restarts the debugged
Python program, optionally with different arguments.
2007-03-13 21:08:15 +00:00
Georg Brandl 5240d7416c Patch #1444529: the builtin compile() now accepts keyword arguments.
(backport)
2007-03-13 20:46:32 +00:00
Thomas Heller 5dc4fe09b7 Patch #1649190: Adding support for _Bool to ctypes as c_bool, by David Remahl. 2007-03-13 20:42:52 +00:00
Georg Brandl 8441f15626 Patch #1530482: add pydoc.render_doc() which returns the documentation
for a thing instead of paging it to stdout, which pydoc.doc() does.
2007-03-13 20:02:57 +00:00
Georg Brandl d9bef35e3c Patch #1533909: the timeit module now accepts callables in addition to
strings for the code to time and the setup code. Also added two
convenience functions for instantiating a Timer and calling its methods.
2007-03-13 19:32:21 +00:00
Georg Brandl 35ef9c19fe Patch #1537850: tempfile.NamedTemporaryFile now has a "delete" parameter
which can be set to False to prevent the default delete-on-close
behavior.
2007-03-13 18:31:49 +00:00
Georg Brandl 9e6b47002a Patch #1581073: add a flag to textwrap that prevents the dropping of
whitespace while wrapping.
2007-03-13 18:15:41 +00:00
Georg Brandl 92a6baed7b Patch #1603688: ConfigParser.SafeConfigParser now checks values that
are set for invalid interpolation sequences that would lead to errors
on reading back those values.
2007-03-13 17:43:32 +00:00
Georg Brandl a47337fba5 Bug #1622896: fix a rare corner case where the bz2 module raised an
error in spite of a succesful compression.
2007-03-13 12:34:25 +00:00
Lars Gustäbel c64e40215d This is the implementation of POSIX.1-2001 (pax) format read/write
support.

The TarInfo class now contains all necessary logic to process and
create tar header data which has been moved there from the TarFile
class. The fromtarfile() method was added. The new path and linkpath
properties are aliases for the name and linkname attributes in
correspondence to the pax naming scheme.

The TarFile constructor and classmethods now accept a number of
keyword arguments which could only be set as attributes before (e.g.
dereference, ignore_zeros). The encoding and pax_headers arguments
were added for pax support. There is a new tarinfo keyword argument
that allows using subclassed TarInfo objects in TarFile.

The boolean TarFile.posix attribute is deprecated, because now three
tar formats are supported. Instead, the desired format for writing is
specified using the constants USTAR_FORMAT, GNU_FORMAT and PAX_FORMAT
as the format keyword argument. This change affects TarInfo.tobuf()
as well.

The test suite has been heavily reorganized and partially rewritten.
A new testtar.tar was added that contains sample data in many formats
from 4 different tar programs.

Some bugs and quirks that also have been fixed:
Directory names do no longer have a trailing slash in TarInfo.name or
TarFile.getnames().
Adding the same file twice does not create a hardlink file member.
The TarFile constructor does no longer need a name argument.
The TarFile._mode attribute was renamed to mode and contains either
'r', 'w' or 'a'.
2007-03-13 10:47:19 +00:00
Martin v. Löwis bdd0f39de5 Patch #1449244: Support Unicode strings in
email.message.Message.{set_charset,get_content_charset}.
Will backport.
2007-03-13 10:24:00 +00:00
Georg Brandl 18c47f6a3b Patch #1569798: fix a bug in distutils when building Python from a
directory within sys.exec_prefix.
2007-03-13 10:19:22 +00:00
Georg Brandl b6a87542b3 Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
pydoc's help keywords.
2007-03-13 10:06:48 +00:00
Georg Brandl 4ffc8f5107 Patch #1555098: use str.join() instead of repeated string
concatenation in robotparser.
2007-03-13 09:41:31 +00:00
Georg Brandl 94fe3f58d0 Patch #1635454: the csv.DictWriter class now includes the offending
field names in its exception message if you try to write a record with
a dictionary containing fields not in the CSV field names list.
2007-03-13 09:32:11 +00:00
Georg Brandl ceede5c359 Patch #1668100: urllib2 now correctly raises URLError instead of
OSError if accessing a local file via the file:// protocol fails.
2007-03-13 08:14:27 +00:00
Georg Brandl 0692a2621c Patch #1679379: add documentation for fnmatch.translate(). 2007-03-13 07:50:57 +00:00
Collin Winter 276887b16d Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167.
Will backport.
2007-03-12 16:11:39 +00:00
Georg Brandl 7b9c555520 Bug #1678647: write a newline after printing an exception in any
case, even when converting the value to a string failed.
2007-03-12 14:30:05 +00:00
Georg Brandl 871f1bc601 Backport from Py3k branch:
Patch #1591665: implement the __dir__() special function lookup in PyObject_Dir.

Had to change a few bits of the patch because classobjs and __methods__ are still
in Py2.6.
2007-03-12 13:17:36 +00:00
Martin v. Löwis 2681beb23e Patch #1677862: Require a space or tab after import in .pth files. 2007-03-12 11:01:10 +00:00
Martin v. Löwis eb62357a2e Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86. 2007-03-12 10:50:39 +00:00
Collin Winter 2faa9e1466 Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap the IndexError caused by passing in an invalid breakpoint number.
Will backport.
2007-03-11 16:00:20 +00:00
Žiga Seilnacht 8903208776 Patch #1675981: remove unreachable code from type.__new__() method.
__dict__ and __weakref__ are removed from the slots tuple earlier
in the code, in the loop that mangles slot names. Will backport.
2007-03-11 15:54:54 +00:00
Collin Winter ae04106a0e Patch #1599845: Add an option to disable the implicit calls to server_bind() and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer and DocXMLRPCServer. 2007-03-10 14:41:48 +00:00
Collin Winter faaa204129 Add proper attribution for a bug fix. 2007-03-10 03:35:34 +00:00
Collin Winter 22c42ba88c Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket.
Will backport.
2007-03-10 02:51:26 +00:00
Thomas Heller 2456a3c02a Bug #1651235: When a tuple was passed to a ctypes function call,
Python would crash instead of raising an error.

The crash was caused by a section of code that should have been
removed long ago, at that time ctypes had other ways to pass
parameters to function calls.
2007-03-09 20:39:22 +00:00
Collin Winter e38051db87 Patch #1491866: change the complex() constructor to allow parthensized forms. This means complex(repr(x)) now works instead of raising a ValueError. 2007-03-09 20:33:07 +00:00
Thomas Heller c2f7725c86 Fix bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
returned string up to the first NUL character.
2007-03-09 19:21:28 +00:00
Collin Winter b7b2b4eecf Bug #1629566: clarify the docs on the return values of parsedate() and parsedate_tz() in email.utils and rfc822. 2007-03-09 18:09:10 +00:00
Martin v. Löwis 1190a38d33 Patch #957003: Implement smtplib.LMTP. 2007-03-09 15:35:55 +00:00
Collin Winter fb728de5f4 Add NEWS item for patch #1481079 (r54234). 2007-03-09 03:26:32 +00:00
Brett Cannon a30fcb4dae Introduce test.test_support.TransientResource. It's a context manager to
surround calls to resources that may or may not be available.  Specifying the
expected exception and attributes to be raised if the resource is not available
prevents overly broad catching of exceptions.

This is meant to help suppress spurious failures by raising
test.test_support.ResourceDenied if the exception matches.  It would probably
be good to go through the various network tests and surround the calls to catch
connection timeouts (as done with test_socket_ssl in this commit).
2007-03-08 23:58:11 +00:00
Georg Brandl 9caadf80a1 Add a NEWS entry for rev. 54207,8. 2007-03-08 18:37:31 +00:00
Martin v. Löwis 05c075d629 Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', ''). 2007-03-07 11:04:33 +00:00
Georg Brandl d0a962506b Patch #787789: allow to pass custom TestRunner instances to unittest's
main() function.
2007-03-07 09:21:06 +00:00
Georg Brandl 15c5ce936f Patches #1550273, #1550272: fix a few bugs in unittest and add a
comprehensive test suite for the module.
2007-03-07 09:09:40 +00:00
Georg Brandl 71ff646743 Patch #1001604: glob.glob() now returns unicode filenames if it was
given a unicode argument and os.listdir() returns unicode filenames.
2007-03-07 08:31:51 +00:00
Georg Brandl aa2321b0f8 Patch #703779: unset __file__ in __main__ after running a file. This
makes the filenames the warning module prints much more sensible when
a PYTHONSTARTUP file is used.
2007-03-07 00:40:28 +00:00
Georg Brandl 49aafc9f2c Variant of patch #697613: don't exit the interpreter on a SystemExit
exception if the -i command line option or PYTHONINSPECT environment
variable is given, but break into the interactive interpreter just like
on other exceptions or normal program exit.
 (backport)
2007-03-07 00:34:46 +00:00
Walter Dörwald 8537c303c7 Document change to curses. 2007-03-06 21:15:24 +00:00
Georg Brandl 40c626159d Patch #1654417: make operator.{get,set,del}slice use the full range
of Py_ssize_t.
2007-03-06 18:59:11 +00:00
Georg Brandl 00cd818dea Patch #1638879: don't accept strings with embedded NUL bytes in long(). 2007-03-06 18:41:12 +00:00
Guido van Rossum 2054ee9b6f Patch #1646728: datetime.fromtimestamp fails with negative
fractional times.  With unittest.

Somebody please backport to 2.5.
2007-03-06 15:50:01 +00:00
Skip Montanaro d1287323ca patch 1673619 - identify extension modules which cannot be built 2007-03-06 15:41:38 +00:00
Martin v. Löwis ab8a6bba25 Patch #912410: Replace HTML entity references for attribute values
in HTMLParser.
2007-03-06 14:43:00 +00:00
Georg Brandl ff432e6f4a Patch #1663234: you can now run doctest on test files and modules
using "python -m doctest [-v] filename ...".
2007-03-06 13:37:45 +00:00
Georg Brandl 098cd69ff9 Bug #1674503: close the file opened by execfile() in an error condition. 2007-03-06 12:17:50 +00:00
Martin v. Löwis 3eb7648986 Patch #1121142: Implement ZipFile.open. 2007-03-06 10:41:24 +00:00
Georg Brandl d28b9fc686 Patch #1671450: add a section about subclassing builtin types to the
"extending and embedding" tutorial.
2007-03-06 10:02:47 +00:00
Georg Brandl 0fca97a5fb Patch #1674228: when assigning a slice (old-style), check for the
sq_ass_slice instead of the sq_slice slot.
2007-03-05 22:28:08 +00:00
Skip Montanaro f694b1b741 note MacPorts/BerkDB change in setup.py 2007-03-04 20:54:12 +00:00
Raymond Hettinger c37e5e04eb Add collections.NamedTuple 2007-03-01 06:16:43 +00:00
Jeremy Hylton cca75403c4 Add news about changes to metaclasses and __bases__ error checking. 2007-02-27 18:33:31 +00:00
Neal Norwitz 88516a6039 When printing an unraisable error, don't print exceptions. before the name.
This duplicates the behavior whening normally printing exceptions.
2007-02-26 22:41:45 +00:00
Jeremy Hylton c5ceb251b3 Fix crash in exec when unicode filename can't be decoded.
I can't think of an easy way to test this behavior.  It only occurs
when the file system default encoding and the interpreter default
encoding are different, such that you can open the file but not decode
its name.
2007-02-25 15:57:45 +00:00
Raymond Hettinger d36862cf78 Add itertools.izip_longest(). 2007-02-21 05:20:38 +00:00
Martin v. Löwis 382abeff0f Patch #1490190: posixmodule now includes os.chflags() and os.lchflags()
functions on platforms where the underlying system calls are available.
2007-02-19 10:55:19 +00:00
Lars Gustäbel 0713a68dc5 Moved misplaced news item. 2007-02-19 09:54:47 +00:00
Raymond Hettinger 00166c5532 Add merge() function to heapq. 2007-02-19 04:08:43 +00:00
Brett Cannon 971a012ce1 Update the encoding package's search function to use absolute imports when
calling __import__.  This helps make the expected search locations for encoding
modules be more explicit.

One could use an explicit value for __path__ when making the call to __import__
to force the exact location searched for encodings.  This would give the most
strict search path possible if one is worried about malicious code being
imported.  The unfortunate side-effect of that is that if __path__ was modified
on 'encodings' on purpose in a safe way it would not be picked up in future
__import__ calls.
2007-02-15 22:54:39 +00:00
Georg Brandl 983d100202 Patch #1494140: Add documentation for the new struct.Struct object. 2007-02-15 11:29:04 +00:00
Martin v. Löwis 45423a7571 Patch #1432399: Add HCI sockets. 2007-02-14 10:07:37 +00:00
Lars Gustäbel 5b1a785702 Patch #1647484: Renamed GzipFile's filename attribute to name. The
filename attribute is still accessible as a property that emits a
DeprecationWarning.
2007-02-13 16:09:24 +00:00
Martin v. Löwis b1cc1d407b Patch #1657276: Make NETLINK_DNRTMSG conditional.
Will backport.
2007-02-13 12:14:19 +00:00
Martin v. Löwis 84f6de9d7e Patch #1517891: Make 'a' create the file if it doesn't exist.
Fixes #1514451.
2007-02-13 10:10:39 +00:00
Martin v. Löwis c6d626ed9f Patch #698833: Support file decryption in zipfile. 2007-02-13 09:49:38 +00:00
Martin v. Löwis 07aa3ed372 Patch #685268: Consider a package's __path__ in imputil.
Will backport.
2007-02-13 08:34:45 +00:00
Martin v. Löwis 2bad58f5a4 Patch 1463026: Support default namespace in XMLGenerator.
Fixes #847665. Will backport.
2007-02-12 12:21:10 +00:00
Skip Montanaro 691acf2879 fix trace.py --ignore-dir 2007-02-11 18:24:37 +00:00
Martin v. Löwis 0a2032673c Bug #1600860: Search for shared python library in LIBDIR, not
lib/python/config, on "linux" and "gnu" systems.
Will backport.
2007-02-09 12:36:48 +00:00
Martin v. Löwis fd963265e2 Bug #1653736: Properly discard third argument to slot_nb_inplace_power.
Will backport.
2007-02-09 12:19:32 +00:00
Martin v. Löwis 4c11a92625 Bug #1653736: Complain about keyword arguments to time.isoformat.
Will backport to 2.5.
2007-02-08 09:13:36 +00:00
Lars Gustäbel 3f8aca1164 Patch #1652681: create nonexistent files in append mode and
allow appending to empty files.
2007-02-06 18:38:13 +00:00
Peter Astrand 5f9c6ae545 Applied patch 1124861.3.patch to solve bug #1124861: Automatically create pipes on Windows, if GetStdHandle fails. Will backport. 2007-02-06 15:37:50 +00:00
Brett Cannon 129bd52146 No more raising of string exceptions!
The next step of PEP 352 (for 2.6) causes raising a string exception to trigger
a TypeError.  Trying to catch a string exception raises a DeprecationWarning.
References to string exceptions has been removed from the docs since they are
now just an error.
2007-01-30 21:34:36 +00:00
Brett Cannon e05e6b0032 Add a test for slicing an exception. 2007-01-29 04:41:44 +00:00
Georg Brandl 4ba9e5bdc7 Patch #1634778: add missing encoding aliases for iso8859_15 and
iso8859_16.
2007-01-27 17:59:42 +00:00
Georg Brandl ab49684f55 Patch #1638243: the compiler package is now able to correctly compile
a with statement; previously, executing code containing a with statement
compiled by the compiler package crashed the interpreter.
2007-01-27 17:43:02 +00:00
Brett Cannon 07e1db317d Fix time.strptime's %U support. Basically rewrote the algorithm to be more
generic so that one only has to shift certain values based on whether the week
was specified to start on Monday or Sunday.  Cut out a lot of edge case code
compared to the previous version.  Also broke algorithm out into its own
function (that is private to the module).

Fixes bug #1643943 (thanks Biran Nahas for the report).
2007-01-25 20:22:02 +00:00
Thomas Heller 4378215474 Fix for #1643874: When calling SysAllocString, create a PyCObject
which will eventually call SysFreeString to free the BSTR resource.
2007-01-25 18:34:14 +00:00
Brett Cannon f5bee30e30 Fix crasher for when an object's __del__ creates a new weakref to itself.
Patch only fixes new-style classes; classic classes still buggy.

Closes bug #1377858.  Already backported.
2007-01-23 23:21:22 +00:00
Martin v. Löwis 6c5c502b91 Make PyTraceBack_Here use the current thread, not the
frame's thread state. Fixes #1579370.
Will backport.
2007-01-23 21:11:47 +00:00
Thomas Wouters 6ed1965308 Add news entry about last checkin (oops.) 2007-01-23 13:50:49 +00:00
Lars Gustäbel d2e22903d3 Patch #1507247: tarfile.py: use current umask for intermediate
directories.
2007-01-23 11:17:33 +00:00
Georg Brandl dd7b0525e9 Patch #1627441: close sockets properly in urllib2. 2007-01-21 10:35:10 +00:00
Georg Brandl b84c13792d Bug #1486663: don't reject keyword arguments for subclasses of builtin
types.
2007-01-21 10:28:43 +00:00
Martin v. Löwis aef4c6bc00 Patch #1610575: Add support for _Bool to struct. 2007-01-21 09:33:07 +00:00
Martin v. Löwis 4885e7d098 Prefix AST symbols with _Py_. Fixes #1637022.
Will backport.
2007-01-19 06:42:22 +00:00
Georg Brandl b26b1c6d6b Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next docs. 2007-01-17 21:19:58 +00:00
Sjoerd Mullender 33a0a06d31 Fixed ntpath.expandvars to not replace references to non-existing
variables with nothing.  Also added tests.
This fixes bug #494589.
2007-01-16 16:42:38 +00:00
Marc-André Lemburg fa3d08b4a9 Add news items for the recent pybench and platform changes. 2007-01-16 13:03:06 +00:00
Guido van Rossum bb2cc698c1 Patch #1635058 by Mark Roberts: ensure that htonl and friends never accept or
return negative numbers, per the underlying C implementation.
2007-01-14 17:03:32 +00:00
Brett Cannon 093b67061a Deprecate the sets module. 2007-01-13 00:29:49 +00:00
Thomas Heller 6fd4549bc6 patch #1610795: BSD version of ctypes.util.find_library, by Martin
Kammerhofer.
2007-01-12 20:21:53 +00:00
Thomas Heller 8138c26a83 Fixes for 64-bit Windows: In ctypes.wintypes, correct the definitions
of HANDLE, WPARAM, LPARAM data types.  Make parameterless foreign
function calls work.
2007-01-11 21:18:56 +00:00
Matthias Klose a398e2d059 - idle: Honor the "Cancel" action in the save dialog (Debian bug #299092). 2007-01-11 11:44:04 +00:00
Thomas Heller fb9d78733e Change the ctypes version number to "1.1.0". 2007-01-10 20:12:13 +00:00
Vinay Sajip ab41c109fa Added entry about addition of _open() method to logging.FileHandler. 2007-01-09 14:51:36 +00:00
Vinay Sajip c9137263d5 Added entries about removal of some bare except clauses from logging. 2007-01-08 18:52:36 +00:00
Neal Norwitz 72cd02c041 Prevent crash on shutdown which can occur if we are finalizing
and the module dict has been cleared already and some object
raises a warning (like in a __del__).

Will backport.
2007-01-05 05:25:22 +00:00
Gregory P. Smith 8b96a35d14 Support linking of the bsddb module against BerkeleyDB 4.5.x
(will backport to 2.5)
2007-01-05 01:59:42 +00:00
Martin v. Löwis 7b7c9d4208 Bug #1566280: Explicitly invoke threading._shutdown from Py_Main,
to avoid relying on atexit.
Will backport to 2.5.
2007-01-04 21:06:12 +00:00
Brett Cannon 92d54d5e9c Add EnvironmentVarGuard to test.test_support. Provides a context manager to
temporarily set or unset environment variables.
2007-01-04 00:23:49 +00:00
Lars Gustäbel a7ba6fc548 Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument.
Will backport to 2.5.
2006-12-27 10:30:46 +00:00
Andrew M. Kuchling 7166232399 [Rest of patch #1182394] Add ._current() method so that we can use the written-in-C .hexdigest() method 2006-12-27 03:31:24 +00:00
Lars Gustäbel a4b2381b20 Patch #1262036: Prevent TarFiles from being added to themselves under
certain conditions.

Will backport to 2.5.
2006-12-23 17:57:23 +00:00
Lars Gustäbel 6baa502769 Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell()
work correctly together with readline().

Will backport to 2.5.
2006-12-23 16:40:13 +00:00
Raymond Hettinger 94547f7646 Bug #1590891: random.randrange don't return correct value for big number
Needs to be backported.
2006-12-20 06:42:06 +00:00
Georg Brandl ebbeed781d Patch #1484695: The tarfile module now raises a HeaderError exception
if a buffer given to frombuf() is invalid.
2006-12-19 22:06:46 +00:00
Vinay Sajip 76fdb8c050 Added news on recent changes to logging 2006-12-14 08:53:55 +00:00
Brett Cannon 6d9520c4f0 Add test.test_support.guard_warnings_filter . This function returns a context
manager that protects warnings.filter from being modified once the context is
exited.
2006-12-13 23:09:53 +00:00
Matthias Klose ebde1498e7 - Fix the build of the library reference in info format. 2006-12-09 12:15:27 +00:00
Georg Brandl b130743e97 Patch #1608267: fix a race condition in os.makedirs() is the directory
to be created is already there.
2006-12-09 09:08:29 +00:00
Georg Brandl 87fa559479 Patch #1610437: fix a tarfile bug with long filename headers. 2006-12-06 22:21:18 +00:00
Matthias Klose d149d0c76a - Fix build failure on kfreebsd and on the hurd. 2006-12-03 17:16:41 +00:00
Martin v. Löwis a00bcac003 Patch #1371075: Make ConfigParser accept optional dict type
for ordering, sorting, etc.
2006-12-03 12:01:53 +00:00
Martin v. Löwis 046c4d13be Patch #1544279: Improve thread-safety of the socket module by moving
the sock_addr_t storage out of the socket object.
Will backport to 2.5.
2006-12-03 11:23:45 +00:00
Martin v. Löwis 8609da9b17 Move IDLE news into NEWS.txt. 2006-12-03 09:54:46 +00:00
Thomas Heller ef583a4992 Fix #1563807: _ctypes built on AIX fails with ld ffi error.
The contents of ffi_darwin.c must be compiled unless __APPLE__ is
defined and __ppc__ is not.

Will backport.
2006-11-28 20:21:54 +00:00
Martin v. Löwis 4d542ec13c Disable _XOPEN_SOURCE on NetBSD 1.x.
Will backport to 2.5
2006-11-25 15:39:19 +00:00
Thomas Heller 25d208bd46 Fix bug #1598620: A ctypes structure cannot contain itself. 2006-11-24 18:45:39 +00:00
Martin v. Löwis 4ebbefe677 Patch #1362975: Rework CodeContext indentation algorithm to
avoid hard-coding pixel widths. Also make the text's scrollbar
a child of the text frame, not the top widget.
2006-11-22 08:50:02 +00:00
Martin v. Löwis 2607e6c021 Conditionalize definition of _CRT_SECURE_NO_DEPRECATE
and _CRT_NONSTDC_NO_DEPRECATE.
Will backport.
2006-11-21 18:20:25 +00:00
Neal Norwitz 4fe442383d Bug #1599782: Fix segfault on bsddb.db.DB().type().
The problem is that _DB_get_type() can't be called without the GIL
because it calls a bunch of PyErr_* APIs when an error occurs.
There were no other cases in this file that it was called without the GIL.
Removing the BEGIN/END THREAD around _DB_get_type() made everything work.

Will backport.
2006-11-21 05:26:22 +00:00
Neal Norwitz 45e230a8e1 Speed up function calls into the math module by using METH_O.
There should be no functional changes. However, the error msgs are
slightly different.  Also verified that the module dict is not NULL on init.
2006-11-19 21:26:53 +00:00
Martin v. Löwis 07529354db Patch #1070046: Marshal new-style objects like InstanceType
in xmlrpclib.
2006-11-19 18:51:54 +00:00
Martin v. Löwis cffcc8b195 Make cStringIO.truncate raise IOError for negative
arguments (even for -1). Fixes the last bit of
#1359365.
2006-11-19 10:41:41 +00:00
Georg Brandl 283a1353a0 Patch [ 1586791 ] better error msgs for some TypeErrors 2006-11-19 08:48:30 +00:00
Martin v. Löwis bba003ef24 Patch #1472877: Fix Tix subwidget name resolution.
Will backport to 2.5.
2006-11-18 18:42:11 +00:00
Martin v. Löwis ef5fd3e7c9 Patch #1594554: Always close a tkSimpleDialog on ok(), even
if an exception occurs.
Will backport to 2.5.
2006-11-18 18:05:35 +00:00
Martin v. Löwis c73a4a4f51 Patch #1538878: Don't make tkSimpleDialog dialogs transient if
the parent window is withdrawn. This mirrors what dialog.tcl
does.
Will backport to 2.5.
2006-11-18 18:00:23 +00:00
Georg Brandl 25aabf4cbb Bug #1588217: don't parse "= " as a soft line break in binascii's
a2b_qp() function, instead leave it in the string as quopri.decode()
does.
2006-11-16 17:08:45 +00:00
Georg Brandl 540821183b Bug #1597824: return the registered function from atexit.register()
to facilitate usage as a decorator.
2006-11-16 16:50:59 +00:00
Martin v. Löwis 45cd4ff95d Patch #1360200: Use unmangled_version RPM spec field to deal with
file name mangling.
Will backport to 2.5.
2006-11-12 18:56:03 +00:00
Martin v. Löwis 36cbc08f3f Patch #1359217: Ignore 2xx response before 150 response.
Will backport to 2.5.
2006-11-12 18:48:13 +00:00
Martin v. Löwis 056dac1bcf Bug #1067760: Deprecate passing floats to file.seek. 2006-11-12 18:24:26 +00:00
Martin v. Löwis 065f0c8a06 Patch #1355023: support whence argument for GzipFile.seek. 2006-11-12 10:41:39 +00:00
Martin v. Löwis 040a927cd1 Patch #1065257: Support passing open files as body in
HTTPConnection.request().
2006-11-12 10:32:47 +00:00
Andrew M. Kuchling 77c7ac26b7 Reword entry 2006-11-10 13:14:01 +00:00
Andrew M. Kuchling 978d8286ae [Patch #1514543] mailbox (Maildir): avoid losing messages on name clash
Two changes:

Where possible, use link()/remove() to move files into a directory; this
makes it easier to avoid overwriting an existing file.

Use _create_carefully() to create files in tmp/, which uses O_EXCL.

Backport candidate.
2006-11-09 21:16:46 +00:00
Andrew M. Kuchling b5686da24f [Patch #1514544 by David Watson] use fsync() to ensure data is really on disk 2006-11-09 13:51:14 +00:00
Andrew M. Kuchling a3e5d3757c [Bug #1569790] mailbox.Maildir.get_folder() loses factory information
Both the Maildir and MH classes had this bug; the patch fixes both classes
and adds a test.

Will backport to 25-maint.
2006-11-09 13:27:07 +00:00
Martin v. Löwis 038cad7ee4 Patch #1592250: Add elidge argument to Tkinter.Text.search. 2006-11-09 11:27:32 +00:00
Martin v. Löwis b2bba739c5 Patch #838546: Make terminal become controlling in pty.fork().
Will backport to 2.5.
2006-11-09 11:06:03 +00:00
Martin v. Löwis 5361e9a54e Patch #1351744: Add askyesnocancel helper for tkMessageBox. 2006-11-08 07:35:55 +00:00
Martin v. Löwis a346c09291 News entry for 52662. 2006-11-08 06:48:36 +00:00
Neal Norwitz 85dbec6da7 Bug #1588287: fix invalid assertion for `1,2` in debug builds.
Will backport
2006-11-04 19:25:22 +00:00
Martin v. Löwis 5310e5078a - Patch #1060577: Extract list of RPM files from spec file in
bdist_rpm
Will backport to 2.5.
2006-11-04 18:14:06 +00:00
Georg Brandl b9f4ad3a9a Bug #1576657: when setting a KeyError for a tuple key, make sure that
the tuple isn't used as the "exception arguments tuple".
2006-10-29 18:31:42 +00:00
Georg Brandl 2c9838e30f Bug #1586613: fix zlib and bz2 codecs' incremental en/decoders. 2006-10-29 14:39:09 +00:00
Georg Brandl 3354f285b9 Patch #1583880: fix tarfile's problems with long names and posix/
GNU modes.
2006-10-29 09:16:12 +00:00
Georg Brandl 5addf70078 Bug #1586448: the compiler module now emits the same bytecode for
list comprehensions as the builtin compiler, using the LIST_APPEND
opcode.
2006-10-29 08:53:06 +00:00
Georg Brandl 8f99f81dfc Fix codecs.EncodedFile which did not use file_encoding in 2.5.0, and
fix all codecs file wrappers to work correctly with the "with"
statement (bug #1586513).
2006-10-29 08:39:22 +00:00
Neal Norwitz 21997afb0c Fix bug #1565514, SystemError not raised on too many nested blocks.
It seems like this should be a different error than SystemError, but
I don't have any great ideas and SystemError was raised in 2.4 and earlier.

Will backport.
2006-10-28 21:19:07 +00:00
Georg Brandl 2756278304 Patch #1552024: add decorator support to unparse.py demo script. 2006-10-27 20:39:43 +00:00
Thomas Heller 112d1a64ac Modulefinder now handles absolute and relative imports, including
tests.

Will backport to release25-maint.
2006-10-27 19:05:53 +00:00
Thomas Heller df08f0b9a0 WindowsError.str should display the windows error code,
not the posix error code; with test.
Fixes #1576174.

Will backport to release25-maint.
2006-10-27 18:31:36 +00:00
Martin v. Löwis ee82c0e6b7 Patch #1567274: Support SMTP over TLS. 2006-10-27 07:13:28 +00:00
Martin v. Löwis b5bc537c5e Patch #1549049: Rewrite type conversion in structmember.
Fixes #1545696 and #1566140. Will backport to 2.5.
2006-10-27 06:16:31 +00:00
Martin v. Löwis 1b2f627f96 - Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that
ctypes isn't considered as requiring executable stacks.
Will backport to 2.5.
2006-10-22 10:55:15 +00:00
Martin v. Löwis aac1316222 Add check for the PyArg_ParseTuple format, and declare
it if it is supported.
2006-10-19 10:58:46 +00:00
Thomas Heller d2ea4a2584 ctypes callback functions only support 'fundamental' result types.
Check this and raise an error when something else is used - before
this change ctypes would hang or crash when such a callback was
called.  This is a partial fix for #1574584.

Will backport to release25-maint.
2006-10-17 19:30:48 +00:00
Martin v. Löwis fefbc2029c Forward-port r52358:
- Bug #1578513: Cross compilation was broken by a change to configure.
Repair so that it's back to how it was in 2.4.3.
2006-10-17 18:59:23 +00:00
Brett Cannon d80e0c8677 Fix turtle so that you can launch the demo2 function on its own instead of only
when the module is launched as a script.
2006-10-16 03:09:52 +00:00
Martin v. Löwis 012bc7253b Bug #1567666: Emulate GetFileAttributesExA for Win95.
Will backport to 2.5.
2006-10-15 09:43:39 +00:00
Martin v. Löwis 18aaa568fd Patch #1576166: Support os.utime for directories on Windows NT+. 2006-10-15 08:43:33 +00:00
Martin v. Löwis c9e82f6234 Patch #1576954: Update VC6 build directory; remove redundant
files in VC7. Will backport to 2.5.
2006-10-15 07:54:40 +00:00
Neal Norwitz cbeb687c68 Update the peephole optimizer to remove more dead code (jumps after returns)
and inline jumps to returns.
2006-10-14 21:33:38 +00:00
Georg Brandl 2c1375c8db Bug #1545497: when given an explicit base, int() did ignore NULs
embedded in the string to convert.
2006-10-12 11:27:59 +00:00
Georg Brandl 5597e261b2 Bug #1548891: The cStringIO.StringIO() constructor now encodes unicode
arguments with the system default encoding just like the write()
method does, instead of converting it to a raw buffer.
2006-10-12 09:47:12 +00:00
Georg Brandl a4c8e32a1f Bug #1565919: document set types in the Language Reference. 2006-10-12 08:22:53 +00:00
Georg Brandl d076153ee8 Bug #813342: Start the IDLE subprocess with -Qnew if the parent
is started with that option.
2006-10-12 07:57:21 +00:00
Martin v. Löwis f43893a878 Bug #1565150: Fix subsecond processing for os.utime on Windows. 2006-10-09 20:44:25 +00:00
Georg Brandl 412a9ea10e Patch #1572724: fix typo ('=' instead of '==') in _msi.c. 2006-10-09 19:03:06 +00:00
Andrew M. Kuchling 99994790a0 Add news item for rev. 52211 change 2006-10-09 17:10:12 +00:00
Hye-Shik Chang b788346573 Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters.  (Submitted by Ray Chason)
2006-10-08 13:48:34 +00:00
Georg Brandl 846f73a530 Add missing NEWS entry for rev. 52129. 2006-10-08 07:11:54 +00:00
Martin v. Löwis 8b274265f0 Add MSVC8 project files to create wininst-8.exe. 2006-10-04 15:25:28 +00:00
Armin Rigo 7ccbca93a2 Forward-port of r52136,52138: a review of overflow-detecting code.
* unified the way intobject, longobject and mystrtoul handle
  values around -sys.maxint-1.

* in general, trying to entierely avoid overflows in any computation
  involving signed ints or longs is extremely involved.  Fixed a few
  simple cases where a compiler might be too clever (but that's all
  guesswork).

* more overflow checks against bad data in marshal.c.

* 2.5 specific: fixed a number of places that were still confusing int
  and Py_ssize_t.  Some of them could potentially have caused
  "real-world" breakage.

* list.pop(x): fixing overflow issues on x was messy.  I just reverted
  to PyArg_ParseTuple("n"), which does the right thing.  (An obscure
  test was trying to give a Decimal to list.pop()... doesn't make
  sense any more IMHO)

* trying to write a few tests...
2006-10-04 12:17:45 +00:00
Martin v. Löwis 820d6ac9d7 Fix integer negation and absolute value to not rely
on undefined behaviour of the C compiler anymore.
Will backport to 2.5 and 2.4.
2006-10-04 05:47:34 +00:00
Brett Cannon 373d90b365 Convert test_imp over to unittest. 2006-10-03 23:23:14 +00:00
Martin v. Löwis ebe26709d2 Fix test for uintptr_t. Fixes #1568842.
Will backport.
2006-10-02 14:55:51 +00:00
Georg Brandl 44a7b3a765 Bug #1546052: clarify that PyString_FromString(AndSize) copies the
string pointed to by its parameter.
2006-09-30 12:02:57 +00:00
Georg Brandl a92979a1db Bug #1446043: correctly raise a LookupError if an encoding name given
to encodings.search_function() contains a dot.
2006-09-30 11:22:28 +00:00
Georg Brandl 4ddfcd3b60 Bug #1556784: allow format strings longer than 127 characters in
datetime's strftime function.
2006-09-30 11:17:34 +00:00
Georg Brandl 154324a8c3 Bug #1560617: in pyclbr, return full module name not only for classes,
but also for functions.
2006-09-30 11:06:47 +00:00
Georg Brandl 05b3c450a8 Bug #1457823: cgi.(Sv)FormContentDict's constructor now takes
keep_blank_values and strict_parsing keyword arguments.
2006-09-30 10:58:01 +00:00
Georg Brandl 8d1e5bffc1 Bug #1566602: correct failure of posixpath unittest when $HOME ends
with a slash.
2006-09-30 09:13:21 +00:00
Georg Brandl fb25773862 Bug #1566663: remove obsolete example from datetime docs. 2006-09-30 09:06:45 +00:00
Georg Brandl 3267d28f9d Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
2006-09-30 09:03:42 +00:00
Georg Brandl 5d59c09834 Patch #1567691: super() and new.instancemethod() now don't accept
keyword arguments any more (previously they accepted them, but didn't
use them).
2006-09-30 08:43:30 +00:00
Georg Brandl 8c6674511b Bug #1565661: in webbrowser, split() the command for the default
GNOME browser in case it is a command with args.
2006-09-30 07:31:57 +00:00
Gregory P. Smith f8508cca47 wording change 2006-09-30 06:08:20 +00:00
Andrew M. Kuchling 43889c0b9f Add news item for rev. 51815 2006-09-27 16:37:30 +00:00
Brett Cannon 11b3535280 Make the error message for when the time data and format do not match clearer. 2006-09-26 23:38:24 +00:00
Georg Brandl c7986cee76 Fix a bug in traceback.format_exception_only() that led to an error
being raised when print_exc() was called without an exception set.
In version 2.4, this printed "None", restored that behavior.
2006-09-24 12:50:24 +00:00
Georg Brandl a10d3afed2 Fix a bug in the parser's future statement handling that led to "with"
not being recognized as a keyword after, e.g., this statement:
from __future__ import division, with_statement
2006-09-24 12:35:36 +00:00
Georg Brandl 2c94bf7d41 Fix webbrowser.BackgroundBrowser on Windows. 2006-09-24 10:36:01 +00:00
Neal Norwitz 3a23017bb2 Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).
These tests should be improved.  Hopefully this fixes variations when
flipping back and forth between fpdef and fplist.

Backport candidate.
2006-09-22 08:18:10 +00:00
Neal Norwitz 4a8fbdb1b2 Fix %zd string formatting on Mac OS X so it prints negative numbers.
In addition to testing positive numbers, verify negative numbers work in configure.
In order to avoid compiler warnings on OS X 10.4, also change the order of the check
for the format character to use (PY_FORMAT_SIZE_T) in the sprintf format
for Py_ssize_t.  This patch changes PY_FORMAT_SIZE_T from "" to "l" if it wasn't
defined at configure time.  Need to verify the buildbot results.

Backport candidate (if everyone thinks this patch can't be improved).
2006-09-22 08:16:26 +00:00
Jack Diederich d10a0f7766 added itertools.count(-n) fix 2006-09-21 20:34:49 +00:00
Brett Cannon c8939d23fe Make python.vim output more deterministic. 2006-09-20 19:28:35 +00:00
Brett Cannon f6aa86e33b Allow exceptions to be directly sliced again
(e.g., ``BaseException(1,2,3)[0:2]``).

Discovered in Python 2.5.0 by Thomas Heller and reported to python-dev.  This
should be backported to 2.5 .
2006-09-20 18:43:13 +00:00
Brett Cannon 9adeab7b96 Accidentally didn't commit Misc/NEWS entry on when __unicode__() was removed
from exceptions.
2006-09-20 18:34:28 +00:00
Gregory P. Smith 2fa067982c Fixes a bug with bsddb.DB.stat where the flags and txn keyword
arguments are transposed.  (reported by Louis Zechtzer)
..already committed to release24-maint
..needs committing to release25-maint
2006-09-19 17:35:04 +00:00
Martin v. Löwis 43fd99c8f8 Patch #1557515: Add RLIMIT_SBSIZE. 2006-09-16 17:36:37 +00:00
Georg Brandl ec6c2dfb63 Forward-port of rev. 51857:
Building with HP's cc on HP-UX turned up a couple of problems.
_PyGILState_NoteThreadState was declared as static inconsistently.
Make it static as it's not necessary outside of this module.

Some tests failed because errno was reset to 0. (I think the tests
that failed were at least: test_fcntl and test_mailbox).
Ensure that errno doesn't change after a call to Py_END_ALLOW_THREADS.
This only affected debug builds.
2006-09-11 09:38:35 +00:00
Neal Norwitz bcc119a22c Forward port of 51850 from release25-maint branch.
As mentioned on python-dev, reverting patch #1504333 because it introduced
an infinite loop in rev 47154.

This patch also adds a test to prevent the regression.
2006-09-11 04:24:09 +00:00
Nick Coghlan b3c18f87e4 Add missing NEWS entry for rev 51803 2006-09-08 10:04:38 +00:00
Gustavo Niemeyer c36bede6ff Fixed subprocess bug #1531862 again, after removing tests
offending buildbot
2006-09-07 00:48:33 +00:00
Marc-André Lemburg 9614868ece Add news item for bug fix of SF bug report #1546372. 2006-09-06 20:40:22 +00:00
Georg Brandl 4e933137af Fix missing import of the types module in logging.config. 2006-09-06 20:05:58 +00:00
Neal Norwitz ca460d9722 with and as are now keywords. There are some generated files I can't recreate. 2006-09-06 06:28:06 +00:00
Georg Brandl 98775dfebc Bug #1550983: emit better error messages for erroneous relative
imports (if not in package and if beyond toplevel package).
2006-09-06 06:09:31 +00:00
Georg Brandl 74bb783c2f Bug #1551427: fix a wrong NULL pointer check in the win32 version
of os.urandom().
2006-09-06 06:03:59 +00:00
Neal Norwitz 314bef9fff Revert 51758 because it broke all the buildbots 2006-09-06 03:58:34 +00:00
Gustavo Niemeyer 8cb64eaaf3 Fixing #1531862: Do not close standard file descriptors in the
subprocess module.
2006-09-06 01:58:52 +00:00
Hye-Shik Chang 2cad3e9299 Fix a typo: 2013 -> 0213 2006-09-05 12:14:57 +00:00
Hye-Shik Chang 199f1db1fa Fix a few bugs on cjkcodecs found by Oren Tirosh:
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
- iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
  codepoints to conform the standard.
- iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 2013:2
  codepoints now.
2006-09-05 12:07:09 +00:00
Neal Norwitz dac090d3e6 Bug #1520864 (again): unpacking singleton tuples in list comprehensions and
generator expressions (x for x, in ... ) works again.

Sigh, I only fixed for loops the first time, not list comps and genexprs too.
I couldn't find any more unpacking cases where there is a similar bug lurking.

This code should be refactored to eliminate the duplication.  I'm sure
the listcomp/genexpr code can be refactored.  I'm not sure if the for loop
can re-use any of the same code though.

Will backport to 2.5 (the only place it matters).
2006-09-05 03:53:08 +00:00
Neal Norwitz 4bc2c0919b Patch #1540470, for OpenBSD 4.0. Backport candidate for 2.[34]. 2006-09-05 02:57:01 +00:00
Neal Norwitz d34e4272e0 Add a NEWS entry for str.rpartition() change 2006-09-05 02:36:20 +00:00
Neal Norwitz 919d5cc163 This was found by Guido AFAIK on p3yk (sic) branch. 2006-09-05 02:35:08 +00:00
Neal Norwitz a22975fb35 Fix SF bug #1546288, crash in dict_equal. 2006-09-05 02:24:03 +00:00
Tim Peters c10c9d0d6b "Conceptual" merge of rev 51711 from the 2.5 branch.
i_divmod():  As discussed on Python-Dev, changed the overflow
checking to live happily with recent gcc optimizations that
assume signed integer arithmetic never overflows.

This differs from the corresponding change on the 2.5 and 2.4
branches, using a less obscure approach, but one that /may/
tickle platform idiocies in their definitions of LONG_MIN.
The 2.4 + 2.5 change avoided introducing a dependence on
LONG_MIN, at the cost of substantially goofier code.
2006-09-05 02:18:09 +00:00
Nick Coghlan bb0996ccc5 NEWS entry on trunk for decimal module changes 2006-09-03 01:20:46 +00:00
Neal Norwitz 69e8897505 Bug #1550714: fix SystemError from itertools.tee on negative value for n.
Needs backport to 2.5.1 and earlier.
2006-09-02 02:58:13 +00:00
Neal Norwitz 6aefa916a9 Bug #1548092: fix curses.tparm seg fault on invalid input. Needs backport to 2.5.1 and earlier. 2006-09-02 02:50:35 +00:00
Neal Norwitz 4f096d9487 Patch #1542451: disallow continue anywhere under a finally
I'm undecided if this should be backported to 2.5 or 2.5.1.
Armin suggested to wait (I'm of the same opinion).  Thomas W thinks
it's fine to go in 2.5.
2006-08-21 19:47:08 +00:00
Georg Brandl 8c036ccf93 Patch #1542948: fix urllib2 header casing issue. With new test. 2006-08-20 13:15:39 +00:00
Neal Norwitz 8a26706d75 SF #1542693: Remove semi-colon at end of PyImport_ImportModuleEx macro 2006-08-19 04:25:29 +00:00
Georg Brandl 648c110671 Bug #1541682: Fix example in the "Refcount details" API docs.
Additionally, remove a faulty example showing PySequence_SetItem applied
to a newly created list object and add notes that this isn't a good idea.
2006-08-18 07:27:59 +00:00
Neal Norwitz 92422fb33b Add template for 2.6 on HEAD 2006-08-18 03:57:54 +00:00
Martin v. Löwis 2eb8c4f292 Bug #1541863: uuid.uuid1 failed to generate unique identifiers
on systems with low clock resolution.
2006-08-18 03:47:18 +00:00
Neil Schemenauer 4c6b0d5bec Fix a bug in the ``compiler`` package that caused invalid code to be
generated for generator expressions.
2006-08-16 23:38:05 +00:00
Andrew M. Kuchling c13324e313 Grammar fix 2006-08-16 17:11:18 +00:00
Marc-André Lemburg 574cfea993 Add NEWS item mentioning the reverted distutils version number patch. 2006-08-16 16:11:01 +00:00
Thomas Heller b4a0cf17c4 Remove the special casing of Py_None when converting the return value
of the Python part of a callback function to C.  If it cannot be
converted, call PyErr_WriteUnraisable with the exception we got.
Before, arbitrary data has been passed to the calling C code in this
case.

(I'm not really sure the NEWS entry is understandable, but I cannot
find better words)
2006-08-16 15:10:12 +00:00
Andrew M. Kuchling f9b5b8e9f8 Wording/typo fixes 2006-08-16 14:21:14 +00:00
Thomas Heller b0aa98fd4f The __repr__ method of a NULL py_object does no longer raise an
exception.  Remove a stray '?' character from the exception text
when the value is retrieved of such an object.

Includes tests.
2006-08-16 14:07:44 +00:00
Anthony Baxter 581795902d news entry for 51307 2006-08-16 13:08:25 +00:00
Martin v. Löwis a09fd6efdd Build _hashlib on Windows. Build OpenSSL with masm assembler code.
Fixes #1535502.
2006-08-16 12:55:10 +00:00
Kurt B. Kaiser d112bc7958 Patch #1540892: site.py Quitter() class attempts to close sys.stdin
before raising SystemExit, allowing IDLE to honor quit() and exit().

M    Lib/site.py
M    Lib/idlelib/PyShell.py
M    Lib/idlelib/CREDITS.txt
M    Lib/idlelib/NEWS.txt
M    Misc/NEWS
2006-08-16 05:01:42 +00:00
Anthony Baxter b409666e8c preparing for 2.5c1 2006-08-16 03:42:26 +00:00
Neal Norwitz b476fdf7c3 Fix the test for SocketServer so it should pass on cygwin and not fail
sporadically on other platforms.  This is really a band-aid that doesn't
fix the underlying issue in SocketServer.  It's not clear if it's worth
it to fix SocketServer, however, I opened a bug to track it:

	http://python.org/sf/1540386
2006-08-15 04:58:28 +00:00
Neal Norwitz bf8c19536e Georg fixed one of my bugs, so I'll repay him with 2 NEWS entries.
Now we're even. :-)
2006-08-15 04:14:57 +00:00
Georg Brandl 7a1af770b9 Patch #1536071: trace.py should now find the full module name of a
file correctly even on Windows.
2006-08-14 21:55:28 +00:00
Georg Brandl 3335a7ad63 Patch #1535500: fix segfault in BZ2File.writelines and make sure it
raises the correct exceptions.
2006-08-14 21:42:55 +00:00
Thomas Heller 1ce433e937 News item for rev 51281. 2006-08-14 16:20:04 +00:00
Marc-André Lemburg 757ea27b0f Readd NEWS items that were accidentally removed by r51276. 2006-08-14 11:44:34 +00:00
Thomas Heller 867200483b Apply the patch #1532975 plus ideas from the patch #1533481.
ctypes instances no longer have the internal and undocumented
'_as_parameter_' attribute which was used to adapt them to foreign
function calls; this mechanism is replaced by a function pointer in
the type's stgdict.

In the 'from_param' class methods, try the _as_parameter_ attribute if
other conversions are not possible.

This makes the documented _as_parameter_ mechanism work as intended.

Change the ctypes version number to 1.0.1.
2006-08-14 11:17:48 +00:00
Marc-André Lemburg 040f76b79c Slightly revised version of patch #1538956:
Replace UnicodeDecodeErrors raised during == and !=
compares of Unicode and other objects with a new
UnicodeWarning.

All other comparisons continue to raise exceptions.
Exceptions other than UnicodeDecodeErrors are also left
untouched.
2006-08-14 10:55:19 +00:00
Neal Norwitz 56423e5762 Fix segfault when doing string formatting on subclasses of long if
__oct__, __hex__ don't return a string.

Klocwork 308
2006-08-13 18:11:08 +00:00
Neal Norwitz 1872b1c01f Fix a couple of bugs exposed by the new __index__ code. The 64-bit buildbots
were failing due to inappropriate clipping of numbers larger than 2**31
with new-style classes. (typeobject.c)  In reviewing the code for classic
classes, there were 2 problems.  Any negative value return could be returned.
Always return -1 if there was an error.  Also make the checks similar
with the new-style classes.  I believe this is correct for 32 and 64 bit
boxes, including Windows64.

Add a test of classic classes too.
2006-08-12 18:44:06 +00:00
Neal Norwitz 8a87f5d37e Patch #1538606, Patch to fix __index__() clipping.
I modified this patch some by fixing style, some error checking, and adding
XXX comments.  This patch requires review and some changes are to be expected.
I'm checking in now to get the greatest possible review and establish a
baseline for moving forward.  I don't want this to hold up release if possible.
2006-08-12 17:03:09 +00:00
Georg Brandl 0a7d1bb168 logging's atexit hook now runs even if the rest of the module has
already been cleaned up.
2006-08-11 07:26:10 +00:00
Neal Norwitz 003c9e2952 Fix the failures on cygwin (2006-08-10 fixed the actual locking issue).
The first hunk changes the colon to an ! like other Windows variants.
We need to always wait on the child so the lock gets released and
no other tests fail.  This is the try/finally in the second hunk.
2006-08-11 06:09:41 +00:00
Tim Peters 4643c2fda1 Followup to bug #1069160.
PyThreadState_SetAsyncExc():  internal correctness changes wrt
refcount safety and deadlock avoidance.  Also added a basic test
case (relying on ctypes) and repaired the docs.
2006-08-10 22:45:34 +00:00
Guido van Rossum c69ac2527d Fix title -- it's rc1, not beta3. 2006-08-10 18:09:25 +00:00
Guido van Rossum 133f4e465b News item for SF bug 1112549. 2006-08-10 17:42:50 +00:00
Martin v. Löwis ab2f8f7bd5 __hash__ may now return long int; the final hash
value is obtained by invoking hash on the long int.
Fixes #1536021.
2006-08-09 07:57:39 +00:00
Thomas Heller ab1049c046 memcmp() can return values other than -1, 0, and +1 but tp_compare
must not.
2006-08-08 17:37:00 +00:00
Andrew MacIntyre 16ee33adfc test_threading now skips testing alternate thread stack sizes on
platforms that don't support changing thread stack size.
2006-08-06 12:37:03 +00:00
Georg Brandl 7e3ba2a699 Bug #1535165: fixed a segfault in input() and raw_input() when
sys.stdin is closed.
2006-08-06 08:23:54 +00:00
Georg Brandl 9908d1656c Bug #1535182: really test the xreadlines() method of bz2 objects. 2006-08-06 07:06:33 +00:00
Georg Brandl 212b587a52 Patch #1534922: correct and enhance unittest docs. 2006-08-05 06:10:54 +00:00
Bob Ippolito e6c9f982a0 Fix #1530559, struct.pack raises TypeError where it used to convert.
Passing float arguments to struct.pack when integers are expected
now triggers a DeprecationWarning.
2006-08-04 23:59:21 +00:00
Thomas Heller db7b443d8a Fix #1534738: win32 debug version of _msi must be _msi_d.pyd, not _msi.pyd.
Fix the name of the pdb file as well.
2006-08-04 19:49:31 +00:00
Thomas Heller 1798489547 Fix #1530448 - fix ctypes build failure on solaris 10.
The '-mimpure-text' linker flag is required when linking _ctypes.so.
2006-08-04 18:57:34 +00:00
Thomas Heller 74d36f0d95 On Windows, make PyErr_Warn an exported function again. 2006-08-04 18:17:40 +00:00
Georg Brandl e9462c72bd Change fix for segfaulting property(), add a NEWS entry and a test. 2006-08-04 18:03:37 +00:00
Neil Schemenauer 06ded09d40 Fix the 'compiler' package to generate correct code for MAKE_CLOSURE.
In the 2.5 development cycle, MAKE_CLOSURE as changed to take free
variables as a tuple rather than as individual items on the stack.
Closes patch #1534084.
2006-08-04 16:20:30 +00:00
Neal Norwitz 0cbd805a10 Bug #1333982: string/number constants were inappropriately stored
in the byte code and co_consts even if they were not used, ie
immediately popped off the stack.
2006-08-04 05:09:28 +00:00
Neal Norwitz 4ffedadb10 Bug #1191458: tracing over for loops now produces a line event
on each iteration.  I'm not positive this is the best way to handle
this.  I'm also not sure that there aren't other cases where
the lnotab is generated incorrectly.  It would be great if people
that use pdb or tracing could test heavily.

Also:
 * Remove dead/duplicated code that wasn't used/necessary
   because we already handled the docstring prior to entering the loop.
 * add some debugging code into the compiler (#if 0'd out).
2006-08-04 04:58:47 +00:00
Neal Norwitz ff4b63b80f Bug #1531405, format_exception no longer raises an exception if
str(exception) raised an exception.
2006-08-04 04:50:21 +00:00
Martin v. Löwis 961b91bd3c Correction of patch #1455898: In the mbcs decoder, set final=False
for stream decoder, but final=True for the decode function.
2006-08-02 13:53:55 +00:00
Anthony Baxter 5d32a9f188 pre-release machinations 2006-08-02 07:43:09 +00:00
Neal Norwitz 9b0ca79213 Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during
a socket operation on a socket with a timeout, the exception will be
caught correctly.  Previously, the exception was not caught.
2006-08-02 06:46:21 +00:00
Neal Norwitz c5e060dee6 _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t instead of long. 2006-08-02 06:14:22 +00:00
Ronald Oussoren 26cad08748 This fixes bug #1527397: PythonLauncher runs scripts with the wrong working
directory. It also fixes a bug where PythonLauncher failed to launch scripts
when the scriptname (or the path to the script) contains quotes.
2006-08-01 21:00:57 +00:00
Georg Brandl 07fec3aa5a os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
2006-08-01 18:49:24 +00:00
Martin v. Löwis 0907f4dc5b Drop usage of test -e in configure as it is not portable.
Fixes #1439538
Will backport to 2.4
Also regenerate pyconfig.h.in.
2006-07-30 14:09:47 +00:00
Martin v. Löwis 77621585e4 Mention Cygwin in distutils error message about a missing VS 2003.
Fixes #1257728.
2006-07-30 13:27:31 +00:00
Martin v. Löwis 1f30c3777c Base __version__ on sys.version_info, as distutils is
no longer maintained separatedly.
2006-07-30 13:14:05 +00:00
Martin v. Löwis 4e67838d6c Don't copy directory stat times in shutil.copytree on Windows
Fixes #1525866.
2006-07-30 13:00:31 +00:00
Georg Brandl e34ac7ce7a Bug #1002398: The documentation for os.path.sameopenfile now correctly
refers to file descriptors, not file objects.
2006-07-30 11:07:23 +00:00
Neal Norwitz f71ec5a0ac Bug #1515471: string.replace() accepts character buffers again.
Pass the char* and size around rather than PyObject's.
2006-07-30 06:57:04 +00:00
Neal Norwitz 07aadb14f3 Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
This provides the proper warning for struct.pack().
PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
As mentioned by Tim Peters on python-dev.
2006-07-30 06:55:48 +00:00
Neal Norwitz 0d62a06206 Patch #1531113: Fix augmented assignment with yield expressions.
Also fix a SystemError when trying to assign to yield expressions.
2006-07-30 06:53:31 +00:00
Fred Drake fbdeaad069 expunge the xmlcore changes:
41667, 41668 - initial switch to xmlcore
  47044        - mention of xmlcore in What's New
  50687        - mention of xmlcore in the library reference

re-apply xmlcore changes to xml:
  41674        - line ending changes (re-applied manually), directory props
  41677        - add cElementTree wrapper
  41678        - PSF licensing for etree
  41812        - whitespace normalization
  42724        - fix svn:eol-style settings
  43681, 43682 - remove Python version-compatibility cruft from minidom
  46773        - fix encoding of \r\n\t in attr values in saxutils
  47269        - added XMLParser alias for cElementTree compatibility

additional tests were added in Lib/test/test_sax.py that failed with
the xmlcore changes; these relate to SF bugs #1511497, #1513611
2006-07-29 16:56:15 +00:00
Fred Drake 5391216050 update target version number 2006-07-29 13:22:49 +00:00
Georg Brandl edd9b0dfb3 Bug #1441397: The compiler module now recognizes module and function
docstrings correctly as it did in Python 2.4.
2006-07-29 09:33:26 +00:00
Thomas Heller 1393d6a4ca Patch #1529514: More openbsd platforms for ctypes.
Regenerated Modules/_ctypes/libffi/configure with autoconf 2.59.

Approved by Neal.
2006-07-28 21:43:20 +00:00
Phillip J. Eby 84b7d3a932 Fix svn merge spew. 2006-07-28 21:31:54 +00:00
Phillip J. Eby f7575d0cb7 Bug #1529871: The speed enhancement patch #921466 broke Python's compliance
with PEP 302.  This was fixed by adding an ``imp.NullImporter`` type that is
used in ``sys.path_importer_cache`` to cache non-directory paths and avoid
excessive filesystem operations during imports.
2006-07-28 21:12:07 +00:00
Georg Brandl 4793aa39a9 Patch #1529686: also run test_email_codecs with regrtest.py. 2006-07-28 18:31:39 +00:00
Matt Fleming ec9265094a Allow socketmodule to compile on NetBSD -current, whose bluetooth API
differs from both Linux and FreeBSD. Accepted by Neal Norwitz.
2006-07-28 11:27:27 +00:00
Gregory P. Smith 641cddf0fa - pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrename
methods now allow their database parameter to be None as the
  sleepycat API allows.

Also adds an appropriate test case for DBEnv.dbrename and dbremove.
2006-07-28 01:35:25 +00:00
Tim Peters 9cab593c0e News about the repaired memory leak in defaultdict. 2006-07-28 00:30:00 +00:00
Tim Peters 6f6814706e Bug #1529297: The rewrite of doctest for Python 2.4 unintentionally
lost that tests are sorted by name before being run.  ``DocTestFinder``
has been changed to sort the list of tests it returns.
2006-07-27 23:44:37 +00:00
Barry Warsaw 00decd7835 Patch #1520294: Support for getset and member descriptors in types.py,
inspect.py, and pydoc.py.  Specifically, this allows for querying the type of
an object against these built-in C types and more importantly, for getting
their docstrings printed in the interactive interpreter's help() function.

This patch includes a new built-in module called _types which provides
definitions of getset and member descriptors for use by the types.py module.
These types are exposed as types.GetSetDescriptorType and
types.MemberDescriptorType.  Query functions are provided as
inspect.isgetsetdescriptor() and inspect.ismemberdescriptor().  The
implementations of these are robust enough to work with Python implementations
other than CPython, which may not have these fundamental types.

The patch also includes documentation and test suite updates.

I commit these changes now under these guiding principles:

1. Silence is assent.  The release manager has not said "no", and of the few
   people that cared enough to respond to the thread, the worst vote was "0".

2. It's easier to ask for forgiveness than permission.

3. It's so dang easy to revert stuff in svn, that you could view this as a
   forcing function. :)

Windows build patches will follow.
2006-07-27 23:43:15 +00:00
Georg Brandl 6cea7d74ad Amend news entry. 2006-07-27 15:38:33 +00:00
Tim Peters 3e246a811d News for patch #1529686. 2006-07-27 15:09:20 +00:00
Martin v. Löwis 997ceffe07 Bump distutils version to 2.5, as several new features
have been introduced since 2.4.
2006-07-27 06:38:16 +00:00
Tim Peters bc24eee333 Bug #1521947: possible bug in mystrtol.c with recent gcc.
In general, C doesn't define anything about what happens when
an operation on a signed integral type overflows, and PyOS_strtol()
did several formally undefined things of that nature on signed
longs.  Some version of gcc apparently tries to exploit that now,
and PyOS_strtol() could fail to detect overflow then.

Tried to repair all that, although it seems at least as likely to me
that we'll get screwed by bad platform definitions for LONG_MIN
and/or LONG_MAX now.  For that reason, I don't recommend backporting
this.

Note that I have no box on which this makes a lick of difference --
can't really test it, except to note that it didn't break anything
on my boxes.

Silent change:  PyOS_strtol() used to return the hard-coded 0x7fffffff
in case of overflow.  Now it returns LONG_MAX.  They're the same only on
32-bit boxes (although C doesn't guarantee that either ...).
2006-07-27 01:14:53 +00:00
Andrew M. Kuchling 10c2b55057 Put news item in right section 2006-07-26 17:22:21 +00:00
Andrew M. Kuchling 93c928ebca Minor grammar fix 2006-07-26 17:19:39 +00:00
Andrew M. Kuchling 55b0a0eb0d [Bug #1471938] Fix build problem on Solaris 8 by conditionalizing the use of mvwgetnstr(); it was conditionalized a few lines below. Fix from Paul Eggert. I also tried out the STRICT_SYSV_CURSES case and am therefore removing the 'untested' comment. 2006-07-26 17:16:52 +00:00
Martin v. Löwis 9298eff5f9 Bug #978833: Really close underlying socket in _socketobject.close.
Fix httplib.HTTPConnection.getresponse to not close the
socket if it is still needed for the response.
2006-07-26 12:12:56 +00:00
Georg Brandl 0619a329e8 Bug #1459963: properly capitalize HTTP header names. 2006-07-26 07:40:17 +00:00
Georg Brandl cf0c1729dc NEWS entry for #1525766. 2006-07-26 07:23:32 +00:00
Ronald Oussoren 3075e16c51 Fix bug #1517990: IDLE keybindings on OSX
This adds a new key definition for OSX, which is slightly different from the
classic mac definition.

Also add NEWS item for a couple of bugfixes I added recently.
2006-07-25 20:28:55 +00:00
Brett Cannon f23ad3d65e Add comment for changes to test_ossaudiodev. 2006-07-25 17:32:20 +00:00
Martin v. Löwis 2b2d2974e7 Revert incomplete checkin. 2006-07-25 10:11:14 +00:00
Martin v. Löwis e093a3ada9 Bug #978833: Really close underlying socket in _socketobject.close.
Will backport to 2.4.
2006-07-25 10:05:47 +00:00
Martin v. Löwis 0b48303f28 Bug #1525817: Don't truncate short lines in IDLE's tool tips. 2006-07-25 09:53:12 +00:00
Georg Brandl c13c34c39d Patch #1515343: Fix printing of deprecated string exceptions with a
value in the traceback module.
2006-07-24 14:09:56 +00:00
Martin v. Löwis 982e9fea0a Bug #1524310: Properly report errors from FindNextFile in os.listdir.
Will backport to 2.4.
2006-07-24 12:54:17 +00:00
Martin v. Löwis d22968af17 Patch #1232023: Don't include empty path component from registry,
so that the current directory does not get added to sys.path.
Also fixes #1526785.
2006-07-24 11:54:53 +00:00
Martin v. Löwis bda0dde1c4 Patch #1448199: Release GIL around ConnectRegistry. 2006-07-24 10:26:33 +00:00
Greg Ward 48fae7acd2 Resync optparse with Optik 1.5.3: minor tweaks for/to tests. 2006-07-23 16:05:51 +00:00
Barry Warsaw b110bad2d9 More RFC 2231 improvements for the email 4.0 package. As Mark Sapiro rightly
points out there are really two types of continued headers defined in this
RFC (i.e. "encoded" parameters with the form "name*0*=" and unencoded
parameters with the form "name*0="), but we were were handling them both the
same way and that isn't correct.

This patch should be much more RFC compliant in that only encoded params are
%-decoded and the charset/language information is only extract if there are
any encoded params in the segments.  If there are no encoded params then the
RFC says that there will be no charset/language parts.

Note however that this will change the return value for Message.get_param() in
some cases.  For example, whereas before if you had all unencoded param
continuations you would have still gotten a 3-tuple back from this method
(with charset and language == None), you will now get just a string.  I don't
believe this is a backward incompatible change though because the
documentation for this method already indicates that either return value is
possible and that you must do an isinstance(val, tuple) check to discriminate
between the two.  (Yeah that API kind of sucks but we can't change /that/
without breaking code.)

Test cases, some documentation updates, and a NEWS item accompany this patch.
2006-07-21 14:51:07 +00:00
Neal Norwitz e1fdb32ff2 Handle allocation failures gracefully. Found with failmalloc.
Many (all?) of these could be backported.
2006-07-21 05:32:28 +00:00
Tim Peters 112aad3630 SF bug 1524317: configure --without-threads fails to build
Moved the code for _PyThread_CurrentFrames() up, so it's no longer
in a huge "#ifdef WITH_THREAD" block (I didn't realize it /was/ in
one).

Changed test_sys's test_current_frames() so it passes with or without
thread supported compiled in.

Note that test_sys fails when Python is compiled without threads,
but for an unrelated reason (the old test_exit() fails with an
indirect ImportError on the `thread` module).  There are also
other unrelated compilation failures without threads, in extension
modules (like ctypes); at least the core compiles again.

Do we really support --without-threads?  If so, there are several
problems remaining.
2006-07-19 00:03:19 +00:00
Martin v. Löwis 426f4a1c65 Patch #1524429: Use repr instead of backticks again. 2006-07-18 17:46:31 +00:00
Brett Cannon caebe22038 Fix bug #1520914. Starting in 2.4, time.strftime() began to check the bounds
of values in the time tuple passed in.  Unfortunately people came to rely on
undocumented behaviour of setting unneeded values to 0, regardless of if it was
within the valid range.  Now those values force the value internally to the
minimum value when 0 is passed in.
2006-07-18 04:41:36 +00:00
Georg Brandl c5e3d8a8d6 Add missing NEWS item (#1522771) 2006-07-17 13:26:33 +00:00
Neal Norwitz e756310848 Add NEWS entry for a bunch of fixes due to warnings produced by Klocworks static analysis tool. 2006-07-17 01:00:16 +00:00
Neal Norwitz 84be93b2db Bug #1512814, Fix incorrect lineno's when code within a function
had more than 255 blank lines.  Byte codes need to go first, line #s second.
2006-07-16 01:50:38 +00:00
Bob Ippolito 5ea4bf1c58 Patch #1220874: Update the binhex module for Mach-O. 2006-07-15 16:53:15 +00:00
Thomas Heller ce049a0aef Patch #1521817: The index range checking on ctypes arrays containing
exactly one element is enabled again.
2006-07-14 17:51:14 +00:00
Peter Astrand 7d1d43630e Bug #1223937: CalledProcessError.errno -> CalledProcessError.returncode. 2006-07-14 14:04:45 +00:00
Martin v. Löwis d73168d954 Extend build_ssl to Win64, using VSExtComp. 2006-07-14 09:58:55 +00:00
Andrew M. Kuchling b7eca839f7 Typo fix 2006-07-13 17:37:26 +00:00
Thomas Heller 6e1ad2eb7d Fix misleading words. 2006-07-13 17:05:13 +00:00
Thomas Heller 2bdf29ec28 Fix #1521375. When running with root priviledges, 'gcc -o /dev/null'
did overwrite /dev/null.  Use a temporary file instead of /dev/null.
2006-07-13 17:01:14 +00:00
Thomas Heller b4dc2ef5da A misspelled preprocessor symbol caused ctypes to be always compiled
without thread support.  Replaced WITH_THREADS with WITH_THREAD.
2006-07-13 09:53:47 +00:00
Georg Brandl 9dceedbb97 Accept long options "--help" and "--version". 2006-07-12 15:31:17 +00:00
Thomas Heller 47d7a069d1 Fix #1467450: ctypes now uses RTLD_GLOBAL by default on OSX 10.3 to
load shared libraries.
2006-07-12 08:43:47 +00:00
Neal Norwitz a1f1090109 Actually change the MAGIC #. Create a new section for 2.5c1 and mention the impact of changing the MAGIC #. 2006-07-12 07:28:29 +00:00
Neal Norwitz edef2be4af Bug #1520864: unpacking singleton tuples in for loop (for x, in) work again. 2006-07-12 05:26:17 +00:00
Anthony Baxter 93ab5fa191 #1494314: Fix a regression with high-numbered sockets in 2.4.3. This
means that select() on sockets > FD_SETSIZE (typically 1024) work again.
The patch makes sockets use poll() internally where available.
2006-07-11 02:04:09 +00:00
Martin v. Löwis 06c68b800c Patch #1519566: Remove unused _tofill member.
Make begin_fill idempotent.
Update demo2 to demonstrate filling of concave shapes.
2006-07-10 22:11:28 +00:00
Tim Peters 32a8361f2d After approval from Anthony, merge the tim-current_frames
branch into the trunk.  This adds a new sys._current_frames()
function, which returns a dict mapping thread id to topmost
thread stack frame.
2006-07-10 21:08:24 +00:00
Thomas Heller b9cb84fe96 Moved the ctypes news entries from the 'Library' section into the
'Extension Modules' section where they belong, probably.

This destroyes the original order of the news entries, don't know
if that is important or not.
2006-07-10 11:17:37 +00:00
Thomas Heller 7644262aa5 Assigning None to pointer type structure fields possible overwrote
wrong fields.
2006-07-10 11:11:10 +00:00
Thomas Heller 7b1da513fd Fixed a segfault when ctypes.wintypes were imported on
non-Windows machines.
2006-07-10 09:31:06 +00:00
Thomas Heller dda068dee1 Fix bug #1518190: accept any integer or long value in the
ctypes.c_void_p constructor.
2006-07-10 09:10:28 +00:00
Anthony Baxter 70e8e87750 preparing for 2.5b2 2006-07-10 07:41:04 +00:00
Martin v. Löwis 8d65681e94 Introduce DISTUTILS_USE_SDK as a flag to determine whether the
SDK environment should be used. Fixes #1508010.
2006-07-10 07:23:48 +00:00
Neal Norwitz 56640df6c3 Patch #1504046: Add documentation for xml.etree.
/F wrote the text docs, Englebert Gruber massaged it to latex and I
did some more massaging to try and improve the consistency and
fix some name mismatches between the declaration and text.
2006-07-10 02:36:41 +00:00
Neal Norwitz 2a30cd0ef0 Patch #1516912: improve Modules support for OpenVMS. 2006-07-10 01:18:57 +00:00
Neal Norwitz ed65755608 Bug #1512814, Fix incorrect lineno's when code at module scope
started after line 256.
2006-07-10 00:04:44 +00:00
Neal Norwitz 28746aba9b On 64 bit systems, int literals that use less than 64 bits are now ints
rather than longs.  This also fixes the test for eval(-sys.maxint - 1).
2006-07-09 22:14:42 +00:00
Neil Schemenauer 6ec6ab02c3 Fix SF bug 1441486: bad unary minus folding in compiler. 2006-07-09 21:19:29 +00:00
Neil Schemenauer 0e07b60a4e Fix AST compiler bug #1501934: incorrect LOAD/STORE_GLOBAL generation. 2006-07-09 16:16:34 +00:00
Neal Norwitz fb48afa708 Fix SF bug #1519018: 'as' is now validated properly in import statements 2006-07-08 05:31:37 +00:00
Martin v. Löwis 388a8c26fa Properly generate logical file ids. Fixes #1515998.
Also correct typo in Control.mapping.
2006-07-06 19:28:03 +00:00
Nick Coghlan 2d792254ae Add NEWS entries for the ImportWarning change and documentation update 2006-07-06 13:47:18 +00:00
Thomas Wouters fc34f6c3f7 NEWS entry for r47267: fixing configure's zlib probing. 2006-07-06 10:48:28 +00:00
Thomas Heller 5becdbee96 Patch #1517790: It is now possible to use custom objects in the ctypes
foreign function argtypes sequence as long as they provide a
from_param method, no longer is it required that the object is a
ctypes type.
2006-07-06 08:48:35 +00:00
Martin v. Löwis 4cbd05c322 Properly quote compileall and Lib paths in case TARGETDIR has a space. 2006-07-06 07:05:21 +00:00
Martin v. Löwis 88ef637777 Add sqlite3.dll to the DLLs component, not to the TkDLLs component.
Fixes #1517388.
2006-07-06 06:55:58 +00:00
Neal Norwitz a12aa88fd8 Add a NEWS entry for a recent pyexpat fix 2006-07-06 06:45:08 +00:00
Thomas Wouters add191118f Fix bug in passing tuples to string.Template. All other values (with working
str() or repr()) would work, just not multi-value tuples. Probably not a
backport candidate, since it changes the behaviour of passing a
single-element tuple:

>>> string.Template("$foo").substitute(dict(foo=(1,)))

'(1,)'

versus

'1'
2006-07-05 11:03:49 +00:00
Martin v. Löwis d5cfa5491a Put method-wrappers into trashcan. Fixes #927248. 2006-07-03 13:47:40 +00:00
Martin v. Löwis ede77f5373 Patch #825417: Fix timeout processing in expect,
read_until. Will backport to 2.4.
2006-07-03 13:01:35 +00:00
Martin v. Löwis 4548239e2b Bug #1267547: Put proper recursive setup.py call into the
spec file generated by bdist_rpm.
2006-07-03 12:28:58 +00:00
Martin v. Löwis fcfff0a7fa Bug #1417699: Reject locale-specific decimal point in float()
and atof().
2006-07-03 12:19:50 +00:00
Martin v. Löwis 2b88f63a3c Bug #1514693: Update turtle's heading when switching between
degrees and radians.
2006-07-03 10:19:49 +00:00
Martin v. Löwis 4c4300de4e Reimplement turtle.circle using a polyline, to allow correct
filling of arcs. Also fixes #1514693.
2006-07-03 10:05:30 +00:00
Martin v. Löwis bd39c03c9f Only setup canvas when it is first created.
Fixes #1514703
2006-07-03 09:44:00 +00:00
Martin v. Löwis ee1e06d497 Correct arithmetic in access on Win32. Fixes #1513646. 2006-07-02 18:44:00 +00:00
Gerhard Häring 762fbd3485 The sqlite3 module did cut off data from the SQLite database at the first null
character before sending it to a custom converter. This has been fixed now.
2006-07-02 17:48:30 +00:00
Martin v. Löwis 7596e8342e Release all forwarded functions in .close. Fixes #1513223. 2006-07-01 15:33:37 +00:00
Vinay Sajip 28e57618ad Added entry for fileConfig() bugfix. 2006-07-01 10:45:20 +00:00
Martin v. Löwis 1bf59597dd Patch #1509163: MS Toolkit Compiler no longer available 2006-06-29 18:58:44 +00:00
Thomas Heller bde081329b Protect the thread api calls in the _ctypes extension module within
#ifdef WITH_THREADS/#endif blocks.  Found by Sam Rushing.
2006-06-29 18:34:15 +00:00
Neal Norwitz b15ac3169d Add new utility function, reap_children(), to test_support. This should
be called at the end of each test that spawns children (perhaps it
should be called from regrtest instead?).  This will hopefully prevent
some of the unexplained failures in the buildbots (hppa and alpha)
during tests that spawn children.  The problems were not reproducible.
There were many zombies that remained at the end of several tests.
In the worst case, this shouldn't cause any more problems,
though it may not help either.  Time will tell.
2006-06-29 04:10:08 +00:00
Fred Drake 10497c83ec document recent bugfixes in sgmllib 2006-06-29 02:57:48 +00:00
Trent Mick 960a3f88e5 Mention the expat upgrade and pyexpat fix I put in 2.5b1. 2006-06-28 20:30:41 +00:00
Georg Brandl 1be63af41d Fix end_fill(). 2006-06-28 20:23:25 +00:00
Neal Norwitz 0f8b31a2da Fix bug #1512695: cPickle.loads could crash if it was interrupted with
a KeyboardInterrupt since PyTuple_Pack was passed a NULL.

Will backport.
2006-06-28 06:28:31 +00:00
Neal Norwitz c315a0fa40 Verify buildbot picks up these changes (really needs testing after last change to Makefile.pre.in) 2006-06-27 04:28:56 +00:00
Neal Norwitz 3b6b80159e Fix SF bug #1513032, 'make install' failure on FreeBSD 5.3.
No need to install lib-old, it's empty in 2.5.
2006-06-27 04:12:58 +00:00
Hye-Shik Chang e6a1cb9700 Bug #1511381: codec_getstreamcodec() in codec.c is corrected to
omit a default "error" argument for NULL pointer.  This allows
the parser to take a codec from cjkcodecs again.
(Reported by Taewook Kang and reviewed by Walter Doerwald)
2006-06-23 21:16:18 +00:00
Brett Cannon 53ab5b761d 'warning's was improperly requiring that a command-line Warning category be
both a subclass of Warning and a subclass of types.ClassType.  The latter is no
longer true thanks to new-style exceptions.

Closes bug #1510580.  Thanks to AMK for the test.
2006-06-22 16:49:14 +00:00
Neal Norwitz 60373cd244 Copy the wsgiref package during make install. 2006-06-22 06:30:50 +00:00
Georg Brandl ad29e637d8 fix [ 1509132 ] compiler module builds incorrect AST for TryExceptFinally 2006-06-21 17:45:17 +00:00
Anthony Baxter d113680720 Preparing for 2.5b1. 2006-06-19 12:04:15 +00:00
Walter Dörwald 4994d9546c Patch #1506645: add Python wrappers for the curses functions
is_term_resized, resize_term and resizeterm. This uses three
separate configure checks (one for each function).
2006-06-19 08:07:50 +00:00
Georg Brandl a56b91552a Add news entry about error msg improvement. 2006-06-19 06:35:54 +00:00
Martin v. Löwis 6fb20aa92c Patch #815924: Restore ability to pass type= and icon= 2006-06-17 19:03:26 +00:00
Martin v. Löwis 3798da0f92 Patch #812986: Update the canvas even if not tracing. 2006-06-17 18:44:27 +00:00
Martin v. Löwis 92733be85e Patch #1494750: Destroy master after deleting children. 2006-06-17 09:25:15 +00:00
Martin v. Löwis 5ecad9ca13 Patch #1096231: Add default argument to wm_iconbitmap. 2006-06-17 09:20:41 +00:00
Martin v. Löwis 337487e3b8 Patch #763580: Add name and value arguments to
Tkinter variable classes.
2006-06-17 09:15:14 +00:00
Gregory P. Smith 506f7b559a - bsddb: multithreaded DB access using the simple bsddb module interface
now works reliably.  It has been updated to use automatic BerkeleyDB
  deadlock detection and the bsddb.dbutils.DeadlockWrap wrapper to retry
  database calls that would previously deadlock. [SF python bug #775414]
2006-06-15 08:52:32 +00:00
Ronald Oussoren 143cefb846 Patch #1446489 (zipfile: support for ZIP64) 2006-06-15 08:14:18 +00:00
Georg Brandl 83cc0d0add Bug #1117556: SimpleHTTPServer now tries to find and use the system's
mime.types file for determining MIME types.
2006-06-14 08:50:03 +00:00
Georg Brandl 2605ca8773 Bug #1339007: Shelf objects now don't raise an exception in their
__del__ method when initialization failed.
2006-06-14 06:08:31 +00:00
Martin v. Löwis d825143be1 Patch #1455898: Incremental mode for "mbcs" codec. 2006-06-14 05:21:04 +00:00
Tim Peters 43898b4f64 SequenceMatcher.get_matching_blocks(): This now guarantees that
adjacent triples in the result list describe non-adjacent matching
blocks.  That's _nice_ to have, and Guido said he wanted it.

Not a bugfix candidate:  Guido or not ;-), this changes visible
endcase semantics (note that some tests had to change), and
nothing about this was documented before.  Since it was working
as designed, and behavior was consistent with the docs, it wasn't
"a bug".
2006-06-14 04:09:25 +00:00
Brett Cannon ea3912b0da If a classic class defined a __coerce__() method that just returned its two
arguments in reverse, the interpreter would infinitely recourse trying to get a
coercion that worked.  So put in a recursion check after a coercion is made and
the next call to attempt to use the coerced values.

Fixes bug #992017 and closes crashers/coerce.py .
2006-06-13 21:46:41 +00:00
Andrew MacIntyre 9291332de1 Patch #1454481: Make thread stack size runtime tunable.
Heavily revised, comprising revisions:
46640 - original trunk revision (backed out in r46655)
46647 - markup fix (backed out in r46655)
46692:46918 merged from branch aimacintyre-sf1454481

branch tested on buildbots (Windows buildbots had problems
not related to these changes).
2006-06-13 15:04:24 +00:00
Neal Norwitz 909eb12c95 Fix the socket tests so they can be run concurrently. Backport candidate 2006-06-12 02:13:21 +00:00
Neal Norwitz b9845e72f9 Get rid of f_restricted too. Doc the other 4 ints that were already removed
at the NeedForSpeed sprint.
2006-06-12 02:11:18 +00:00
Greg Ward 0e0c9f4740 Bug #1498146: fix optparse to handle Unicode strings in option help,
description, and epilog.
2006-06-11 16:24:11 +00:00
Greg Ward d1c797e624 SF #1366250: optparse docs: fix inconsistency in variable name; minor tweaks. 2006-06-11 14:42:41 +00:00
Greg Ward 7f54740c4d Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately,
i.e. do *not* expand tabs, but treat them as whitespace that is not
equivalent to spaces.  Add a couple of test cases.  Clarify docs.
2006-06-11 00:40:49 +00:00
Brett Cannon 22565aac3b An object with __call__ as an attribute, when called, will have that attribute checked for __call__ itself, and will continue to look until it finds an object without the attribute. This can lead to an infinite recursion.
Closes bug #532646, again.  Will be backported.
2006-06-09 22:31:23 +00:00
Georg Brandl 242508160e RFE #1491485: str/unicode.endswith()/startswith() now accept a tuple as first argument. 2006-06-09 18:45:48 +00:00
Andrew M. Kuchling 0873b11f2e Add note about wsgiref 2006-06-09 16:46:51 +00:00
Andrew M. Kuchling 3fed2eb6dc Add note about XMLGenerator bugfix 2006-06-09 16:44:40 +00:00
Brett Cannon de3b052216 Buffer objects would return the read or write buffer for a wrapped object when
the char buffer was requested.  Now it actually returns the char buffer if
available or raises a TypeError if it isn't (as is raised for the other buffer
types if they are not present but requested).

Not a backport candidate since it does change semantics of the buffer object
(although it could be argued this is enough of a bug to bother backporting).
2006-06-08 17:00:45 +00:00
Brett Cannon 6ee7d01c05 Make binascii.hexlify() use s# for its arguments instead of t# to actually
match its documentation stating it accepts any read-only buffer.
2006-06-08 16:23:04 +00:00
Nick Coghlan 676725db92 Add functools.update_wrapper() and functools.wraps() as described in PEP 356 2006-06-08 13:54:49 +00:00
Georg Brandl 98251f8a2f Argh. "integer" is a very confusing word ;)
Actually, checking for INT_MAX and INT_MIN is correct since
the format code explicitly handles a C "int".
2006-06-08 13:31:07 +00:00
Georg Brandl c9ae4e8a2d Add news for recent bugfix. 2006-06-08 12:55:47 +00:00
Georg Brandl 66a0dbb576 Bug #1502728: Correctly link against librt library on HP-UX. 2006-06-08 12:54:13 +00:00
Gregory P. Smith ff7d991a07 - bsddb: the bsddb.dbtables Modify method now raises the proper error and
aborts the db transaction safely when a modifier callback fails.
  Fixes SF python patch/bug #1408584.

Also cleans up the bsddb.dbtables docstrings since thats the only
documentation that exists for that unadvertised module.  (people
really should really just use sqlite3)
2006-06-08 05:17:08 +00:00
Gregory P. Smith 3c228b19f0 - bsddb: the __len__ method of a DB object has been fixed to return correct
results.  It could previously incorrectly return 0 in some cases.
  Fixes SF bug 1493322 (pybsddb bug 1184012).
2006-06-05 23:59:37 +00:00
Gregory P. Smith 372b583a6b * fix DBCursor.pget() bug with keyword argument names when no data= is
supplied [SF pybsddb bug #1477863]
2006-06-05 18:48:21 +00:00
Gregory P. Smith f0547d0d3e * add support for DBSequence objects [patch #1466734] 2006-06-05 17:38:04 +00:00
Gregory P. Smith 0459e4d2b9 mention the just committed bsddb changes 2006-06-05 02:02:25 +00:00
Tim Peters d6a9eeffc5 Make doctest news more accurate. 2006-06-05 01:48:21 +00:00
Tim Peters bf0400abe9 Remove doctest.testmod's deprecated (in 2.4) `isprivate`
argument.  A lot of hair went into supporting that!
2006-06-05 01:43:03 +00:00
Hye-Shik Chang 58ce5bc14c Fix a potentially invalid memory access of CJKCodecs' shift-jis
decoder.  (found by Neal Norwitz)
2006-06-05 00:59:54 +00:00
Tim Peters 28eeefe566 Revert revisions:
46640 Patch #1454481:  Make thread stack size runtime tunable.
46647 Markup fix

The first is causing many buildbots to fail test runs, and there
are multiple causes with seemingly no immediate prospects for
repairing them.  See python-dev discussion.

Note that a branch can (and should) be created for resolving these
problems, like

svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH

followed by merging rev 46647 to the new branch.
2006-06-04 23:52:47 +00:00
Georg Brandl ddbaa660d3 Patch #1346214: correctly optimize away "if 0"-style stmts
(thanks to Neal for review)
2006-06-04 21:56:52 +00:00
Martin v. Löwis 3f767795f6 Patch #1359618: Speed-up charmap encoder. 2006-06-04 19:36:28 +00:00
Andrew MacIntyre 6539d2d3c7 Patch #1454481: Make thread stack size runtime tunable. 2006-06-04 12:31:09 +00:00
Tim Peters 9ea89d2a19 In a PYMALLOC_DEBUG build obmalloc adds extra debugging info
to each allocated block.  This was using 4 bytes for each such
piece of info regardless of platform.  This didn't really matter
before (proof: no bug reports, and the debug-build obmalloc would
have assert-failed if it was ever asked for a chunk of memory
>= 2**32 bytes), since container indices were plain ints.  But after
the Py_ssize_t changes, it's at least theoretically possible to
allocate a list or string whose guts exceed 2**32 bytes, and the
PYMALLOC_DEBUG routines would fail then (having only 4 bytes
to record the originally requested size).

Now we use sizeof(size_t) bytes for each of a PYMALLOC_DEBUG
build's extra debugging fields.  This won't make any difference
on 32-bit boxes, but will add 16 bytes to each allocation in
a debug build on a 64-bit box.
2006-06-04 03:26:02 +00:00
Martin v. Löwis 222c515493 Port to OpenBSD 3.9. Patch from Aldo Cortesi. 2006-06-03 07:37:13 +00:00
Tim Peters d609b1a20e pprint functions used to sort a dict (by key) if and only if
the output required more than one line.  "Small" dicts got
displayed in seemingly random order (the hash-induced order
produced by dict.__repr__).  None of this was documented.
Now pprint functions always sort dicts by key, and the docs
promise it.

This was proposed and agreed to during the PyCon 2006 core
sprint -- I just didn't have time for it before now.
2006-06-02 23:22:51 +00:00
Tim Peters 44bd9861d3 Record bugs 1275608 and 1456209 as being fixed. 2006-06-01 13:49:23 +00:00
Armin Rigo 35f6d36951 [ 1497053 ] Let dicts propagate the exceptions in user __eq__().
[ 1456209 ] dictresize() vulnerability ( <- backport candidate ).
2006-06-01 13:19:12 +00:00
Georg Brandl fd9a4b19e9 Add News entry for last commit. 2006-05-29 20:57:01 +00:00
Nick Coghlan c649ec5b69 Apply modified version of Collin Winter's patch #1478788
Renames functional extension module to _functools and adds a Python
functools module so that utility functions like update_wrapper can be
added easily.
2006-05-29 12:43:05 +00:00
Georg Brandl 2b33037611 Patch #1496206: urllib2 PasswordMgr ./. default ports 2006-05-28 20:23:12 +00:00
George Yoshida f3c65de460 Patch #1080727: add "encoding" parameter to doctest.DocFileSuite
Contributed by Bjorn Tillenius.
2006-05-28 16:39:09 +00:00
Georg Brandl b7c8f54c33 Add news item for new-style exception class branch merge. 2006-05-27 12:30:25 +00:00
Martin v. Löwis d004fc810a Patch 1494554: Update numeric properties to Unicode 4.1. 2006-05-27 08:36:52 +00:00
Georg Brandl f4ef11659c Need for speed: Patch #921466 : sys.path_importer_cache is now used to cache valid and
invalid file paths for the built-in import machinery which leads to
  fewer open calls on startup.

  Also fix issue with PEP 302 style import hooks which lead to more open()
  calls than necessary.
2006-05-26 18:03:31 +00:00
Tim Peters 7a822dabad Some Win64 pre-release in 2000 didn't support
QueryPerformanceCounter(), but we believe Win64 does
support it now.  So use in time.clock().

It would be peachy if someone with a Win64 box tried
this ;-)
2006-05-25 21:50:17 +00:00
Tim Peters 696cf43b58 Heavily fiddled variant of patch #1442927: PyLong_FromString optimization.
``long(str, base)`` is now up to 6x faster for non-power-of-2 bases.  The
largest speedup is for inputs with about 1000 decimal digits.  Conversion
from non-power-of-2 bases remains quadratic-time in the number of input
digits (it was and remains linear-time for bases 2, 4, 8, 16 and 32).

Speedups at various lengths for decimal inputs, comparing 2.4.3 with
current trunk.  Note that it's actually a bit slower for 1-digit strings:

  len  speedup
 ----  -------
   1     -4.5%
   2      4.6%
   3      8.3%
   4     12.7%
   5     16.9%
   6     28.6%
   7     35.5%
   8     44.3%
   9     46.6%
  10     55.3%
  11     65.7%
  12     77.7%
  13     73.4%
  14     75.3%
  15     85.2%
  16    103.0%
  17     95.1%
  18    112.8%
  19    117.9%
  20    128.3%
  30    174.5%
  40    209.3%
  50    236.3%
  60    254.3%
  70    262.9%
  80    295.8%
  90    297.3%
 100    324.5%
 200    374.6%
 300    403.1%
 400    391.1%
 500    388.7%
 600    440.6%
 700    468.7%
 800    498.0%
 900    507.2%
1000    501.2%
2000    450.2%
3000    463.2%
4000    452.5%
5000    440.6%
6000    439.6%
7000    424.8%
8000    418.1%
9000    417.7%
2006-05-24 21:10:40 +00:00
Bob Ippolito 7ccc95a315 patch #1493701: performance enhancements for struct module 2006-05-23 19:11:34 +00:00
Bob Ippolito 27abce5ba8 revert #1493701 2006-05-23 19:09:51 +00:00
Andrew M. Kuchling 9deeeef092 Remove duplicate item 2006-05-23 19:00:45 +00:00
Bob Ippolito fb8b84af54 Patch #1493701: performance enhancements for struct module. 2006-05-23 18:46:41 +00:00
Tim Peters b713ec2531 Bug #1334662 / patch #1335972: int(string, base) wrong answers.
In rare cases of strings specifying true values near sys.maxint,
and oddball bases (not decimal or a power of 2), int(string, base)
could deliver insane answers.  This repairs all such problems, and
also speeds string->int significantly.  On my box, here are %
speedups for decimal strings of various lengths:

length speedup
------ -------
 1       12.4%
 2       15.7%
 3       20.6%
 4       28.1%
 5       33.2%
 6       37.5%
 7       41.9%
 8       46.3%
 9       51.2%
10       19.5%
11       19.9%
12       23.9%
13       23.7%
14       23.3%
15       24.9%
16       25.3%
17       28.3%
18       27.9%
19       35.7%

Note that the difference between 9 and 10 is the difference between
short and long Python ints on a 32-bit box.  The patch doesn't
actually do anything to speed conversion to long:  the speedup is
due to detecting "unsigned long" overflow more quickly.

This is a bugfix candidate, but it's a non-trivial patch and it
would be painful to separate the "bug fix" from the "speed up" parts.
2006-05-23 18:45:30 +00:00
Bob Ippolito 7298f270a7 Update Misc/NEWS for gzip patch #1281707 2006-05-23 18:43:47 +00:00
Bob Ippolito 82d2558713 Update Misc/NEWS for gzip patch #1281707 2006-05-23 18:41:17 +00:00
Richard Jones cebbefc98d Applied patch 1337051 by Neal Norwitz, saving 4 ints on frame objects. 2006-05-23 18:28:17 +00:00
Georg Brandl 658d513328 PyErr_NewException now accepts a tuple of base classes as its
"base" parameter.
2006-05-23 11:17:21 +00:00
Richard Jones 7c88dcc5ab Merge from rjones-funccall branch.
Applied patch zombie-frames-2.diff from sf patch 876206 with updates for
Python 2.5 and also modified to retain the free_list to avoid the 67%
slow-down in pybench recursion test. 5% speed up in function call pybench.
2006-05-23 10:37:38 +00:00
Martin v. Löwis a43190bc78 Patch #1492356: Port to Windows CE (patch set 1). 2006-05-22 09:15:18 +00:00
Neal Norwitz 58e28887d5 Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
I suppose this could be backported if anyone cares.
2006-05-19 07:00:58 +00:00
Georg Brandl 7b90e168f3 Bug #1462152: file() now checks more thoroughly for invalid mode
strings and removes a possible "U" before passing the mode to the
C library function.
2006-05-18 07:01:27 +00:00
Georg Brandl b89316fdbf Patch #1180296: improve locale string formatting functions 2006-05-17 15:51:16 +00:00
Georg Brandl e3a25838db Patch #1486962: Several bugs in the turtle Tk demo module were fixed
and several features added, such as speed and geometry control.
2006-05-17 14:56:04 +00:00
Georg Brandl 378d592617 Patch #1490224: set time.altzone correctly on Cygwin. 2006-05-17 14:26:50 +00:00
Georg Brandl 8d3342b489 Patch #1435422: zlib's compress and decompress objects now have a
copy() method.
2006-05-16 07:38:27 +00:00
Georg Brandl 49c8f4cf36 [ 1488881 ] tarfile.py: support for file-objects and bz2 (cp. #1488634) 2006-05-15 19:30:35 +00:00
Neal Norwitz 1004a5339a Patch #1488312, Fix memory alignment problem on SPARC in unicode. Will backport 2006-05-15 07:17:23 +00:00
Neal Norwitz 373f0a718c - Bug #1487966: Fix SystemError with conditional expression in assignment
Most of the test_syntax changes are just updating the numbers.
2006-05-15 07:04:36 +00:00
Neal Norwitz 7a5fc28e81 Move items implemented after a2 into the new a3 section 2006-05-15 06:48:14 +00:00
Tim Peters 8931ff1f67 Teach PyString_FromFormat, PyErr_Format, and PyString_FromFormatV
about "%u", "%lu" and "%zu" formats.

Since PyString_FromFormat and PyErr_Format have exactly the same rules
(both inherited from PyString_FromFormatV), it would be good if someone
with more LaTeX Fu changed one of them to just point to the other.
Their docs were way out of synch before this patch, and I just did a
mass copy+paste to repair that.

Not a backport candidate (this is a new feature).
2006-05-13 23:28:20 +00:00
Martin v. Löwis 682b1bb95f Dynamically allocate path name buffer for Unicode
path name in listdir. Fixes #1431582.
Stop overallocating MAX_PATH characters for ANSI
path names. Stop assigning to errno.
2006-05-12 12:27:28 +00:00
Tim Peters b06d28c160 SF patch #1473132: Improve docs for tp_clear and tp_traverse,
by Collin Winter.

Bugfix candidate (but I'm not going to bother).
2006-05-12 01:57:59 +00:00
Martin v. Löwis 879768dd97 Change WindowsError to carry the Win32 error code in winerror,
and the DOS error code in errno. Revert changes where
WindowsError catch blocks unnecessarily special-case OSError.
2006-05-11 13:28:43 +00:00
Georg Brandl 195648000c Patch #721464: pdb.Pdb instances can now be given explicit stdin and
stdout arguments, making it possible to redirect input and output
for remote debugging.
2006-05-10 17:13:20 +00:00
Georg Brandl 38c6a22f38 Patch #1484695: Update the tarfile module to version 0.8. This fixes
a couple of issues, notably handling of long file names using the
GNU LONGNAME extension.
2006-05-10 16:26:03 +00:00
Tim Peters ad2ef33245 Variant of patch #1478292. doctest.register_optionflag(name)
shouldn't create a new flag when `name` is already the name of
an option flag.
2006-05-10 02:43:01 +00:00
Martin v. Löwis d4e3bb3d39 Port access, chmod, parts of getcwdu, mkdir, and utime to direct Win32 API. 2006-05-06 16:32:54 +00:00
Martin v. Löwis 8e0d494e41 Implement os.{chdir,rename,rmdir,remove} using Win32 directly. 2006-05-04 10:08:42 +00:00
Martin v. Löwis 777367103c Patch #1475845: Raise IndentationError for unexpected indent. 2006-05-04 05:51:03 +00:00
Georg Brandl 1bb6230930 Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler package. 2006-05-03 18:18:32 +00:00
Neal Norwitz c4edb0ec81 SF #1479181: split open() and file() from being aliases for each other. 2006-05-02 04:43:14 +00:00
Martin v. Löwis 8672519ac0 Work around deadlock risk. Will backport. 2006-05-01 06:28:01 +00:00
Georg Brandl 3583cff5a9 Patch #1472854: make the rlcompleter.Completer class usable on non-
UNIX platforms.
2006-04-30 18:14:54 +00:00
Georg Brandl fa42bd7af4 Patch #1470846: fix urllib2 ProxyBasicAuthHandler. 2006-04-30 07:06:11 +00:00
Martin v. Löwis b75d43d374 Further changes for #1471883: Edit Misc/NEWS, and
add expat_config.h.
2006-04-29 12:37:25 +00:00
Anthony Baxter c7d00327ab 2.5a2 2006-04-27 02:11:24 +00:00
Hye-Shik Chang f4795c82df Fix build on MIPS for libffi. I haven't tested this yet because I
don't have an access on MIPS machines.  Will be tested by buildbot. :)
2006-04-26 19:20:26 +00:00
Thomas Wouters abd08884a6 The result of SF patch #1471578: big-memory tests for strings, lists and
tuples. Lots to be added, still, but this will give big-memory people
something to play with in 2.5 alpha 2, and hopefully get more people to
write these tests.
2006-04-26 15:53:30 +00:00
Neal Norwitz cfba5f8c2e Restore Walters name 2006-04-25 05:05:03 +00:00
Tim Peters 711bf30b89 Patch #1475231: add a new SKIP doctest option, thanks to
Edward Loper.
2006-04-25 03:31:36 +00:00
Phillip J. Eby 0a07ab97c5 Revert addition of setuptools 2006-04-24 20:53:13 +00:00
Nick Coghlan da2268feec Fix contextlib.nested to cope with exit methods raising and handling exceptions 2006-04-24 04:37:15 +00:00
Nick Coghlan 27ec1a773c Add unit tests for the -m and -c command line switches 2006-04-24 04:32:47 +00:00
Nick Coghlan c195d8a995 Note changes made to PEP 343 related documentation 2006-04-24 03:04:43 +00:00
Tim Peters 8dc73d2dc6 Bug #1337990: clarified that `doctest` does not support examples
requiring both expected output and an exception.

I'll backport to 2.4 next.
2006-04-24 02:03:16 +00:00
Nick Coghlan 4383230b90 Backdated NEWS entry to record the implementation of PEP 338 for alpha 1 2006-04-23 17:04:07 +00:00
Greg Ward ab05edc0d1 Update optparse to Optik 1.5.1. 2006-04-23 03:47:58 +00:00
Andrew M. Kuchling 1da4a94719 Add Gregory K. Johnson's revised version of mailbox.py (funded by
the 2005 Summer of Code).

The revision adds a number of new mailbox classes that support adding
and removing messages; these classes also support mailbox locking and
default to using email.Message instead of rfc822.Message.

The old mailbox classes are largely left alone for backward compatibility.
The exception is the Maildir class, which was present in the old module
and now inherits from the new classes.  The Maildir class's interface
is pretty simple, though, so I think it'll be compatible with existing
code.

(The change to the NEWS file also adds a missing word to a different
news item, which unfortunately required rewrapping the line.)
2006-04-22 02:32:43 +00:00
Tim Peters 21fbd57d66 SF bug #1473760 TempFile can hang on Windows.
Python 2.4 changed ntpath.abspath to do an import
inside the function.  As a result, due to Python's
import lock, anything calling abspath on Windows
(directly, or indirectly like tempfile.TemporaryFile)
hung when it was called from a thread spawned as a
side effect of importing a module.

This is a depressingly frequent problem, and
deserves a more general fix.  I'm settling for
a micro-fix here because this specific one accounts
for a report of Zope Corp's ZEO hanging on Windows,
and it was an odd way to change abspath to begin
with (ntpath needs a different implementation
depending on whether we're actually running on
Windows, and the _obvious_ way to arrange for that
is not to bury a possibly-failing import _inside_
the function).

Note that if/when other micro-fixes of this kind
get made, the new Lib/test/threaded_import_hangers.py
is a convenient place to add tests for them.
2006-04-21 21:18:10 +00:00
Skip Montanaro 262fb9256b Allow pstats.Stats creator to specify an alternate to stdout. 2006-04-21 02:31:07 +00:00
Martin v. Löwis c661b8821b Document r43622. 2006-04-20 04:54:23 +00:00
Marc-André Lemburg d0b8e83dc5 Add news item for pybench addition. 2006-04-19 15:48:59 +00:00
Armin Rigo a9017c39ce SF Patch #1062014: AF_UNIX sockets under Linux have a special
abstract namespace that is now fully supported.
2006-04-19 11:50:27 +00:00
Thomas Heller 1b04664eab Change those parts of the Python-api that were functions in 2.4, and
are now macros to exported functions again.

Fixes [ 1465834 ] bdist_wininst preinstall script support is broken in 2.5a1.
2006-04-18 18:51:06 +00:00
Phillip J. Eby 17a35f906c add info re: pydoc, pkgutil, and setuptools additions 2006-04-18 16:45:14 +00:00
Andrew M. Kuchling 6db67821a1 Typo fix 2006-04-18 14:04:57 +00:00
Martin v. Löwis 45294a9562 Remove types from type_list if they have no objects
and unlist_types_without_objects is set.
Give dump_counts a FILE* argument.
2006-04-18 06:24:08 +00:00
Tim Peters c7605f21ae local.__del__(): This didn't actually do anything, because of too
much convolution <0.5 wink>.  Simplified to the point that it works,
and test_threading_local no longer reports leaks under -R.  Thanks
to Thomas Wouters for initial analysis.
2006-04-17 21:12:33 +00:00
Martin v. Löwis 4be4e657e0 Add reindent target. 2006-04-17 19:25:49 +00:00
Martin v. Löwis bd30f52881 Patch #790710: Add breakpoint command lists in pdb. 2006-04-17 17:08:37 +00:00
Martin v. Löwis 0db2a989f3 Patch #1063914: Add clipboard_get. 2006-04-16 20:55:38 +00:00
Martin v. Löwis 19ab6c98cf Initialize structseq types only once. 2006-04-16 18:55:50 +00:00
Martin v. Löwis 48bbaf2375 Patch #1470875: Building Python with MS Free Compiler. 2006-04-15 18:06:54 +00:00
Martin v. Löwis 4b501e6c7d Patch #1191700: Adjust column alignment in bdb breakpoint lists.
Backported to 2.4.
2006-04-15 08:41:11 +00:00
Martin v. Löwis 7e75f1aafb Patch #1191065: Fix preprocessor problems on systems where recvfrom
is a macro.
2006-04-15 08:35:59 +00:00
Martin v. Löwis c90b17ec82 Patch #1161914: Add python-config. 2006-04-15 08:13:05 +00:00
Andrew M. Kuchling db4018f320 Typo fix 2006-04-14 14:54:18 +00:00
Martin v. Löwis 0f48d98b74 Patch #1324762: Change --with-cxx to --with-cxx-main. 2006-04-14 14:34:26 +00:00
Neal Norwitz 615461603c SF Bug #1454485, array.array('u') could crash the interpreter when
passing a string.  Martin already fixed the actual crash by ensuring
Py_UNICODE is unsigned.  As discussed on python-dev, this fix
removes the possibility of creating a unicode string from a raw buffer.

There is an outstanding question of how to fix the crash in 2.4.
2006-04-14 05:20:28 +00:00
Gregory P. Smith 3adc4aa2fb raise the minimum supported BerkeleyDB version to 3.3 and add notes to
news about this and a couple other recent fixes.
2006-04-13 19:19:01 +00:00
Anthony Baxter 57fdcbc60f reverting r45321: Patch #860326: traceback.format_exception_only() now
prepends the exception's module name to non-builtin exceptions, like
the interpreter itself does.

broke a number of doctests. should be discussed before checking in (see
discussion on python-dev).
2006-04-13 01:34:33 +00:00
Georg Brandl 24c274f5dc Patch #860326: traceback.format_exception_only() now prepends the
exception's module name to non-builtin exceptions, like the interpreter
itself does.
2006-04-12 21:14:09 +00:00
Anthony Baxter e29002ccb0 Bug #1469163: SimpleXMLRPCServer unconditionally attempted to import fcntl.
Wrapped in a try/except.
2006-04-12 12:07:31 +00:00
Georg Brandl bbfe4fad36 Bug #1467952: os.listdir() now correctly raises an error if readdir()
fails with an error condition.
2006-04-11 06:47:43 +00:00
Tim Peters 527f652a8f Typo repair. 2006-04-11 01:47:17 +00:00
Tim Peters 3a5e8b1e36 More words on patch #837242, since 4 or 5 tests started
failing on one of the 32-bit buildbot boxes because of it,
due to tempting but always-wrong Python code.  Users
probably have code like this too (I know I did ...).
2006-04-11 01:44:07 +00:00
Phillip J. Eby 51dd7d9719 Add notes to NEWS for other work today. 2006-04-11 01:21:31 +00:00
Phillip J. Eby 4703211080 Updated the warnings, linecache, inspect, traceback, site, and doctest modules
to work correctly with modules imported from zipfiles or via other PEP 302
__loader__ objects.  Tests and doc updates are included.
2006-04-11 01:07:43 +00:00
Martin v. Löwis 0bc2ab9a20 Patch #837242: id() for large ptr should return a long. 2006-04-10 20:28:17 +00:00
Martin v. Löwis 17de8ffc21 Patch #1467770: Add Popen objects to _active only in __del__.
Introduce _child_active member to keep track on whether a child
needs to be waited for.
Backport candidate.
2006-04-10 15:55:37 +00:00
Martin v. Löwis 10acfd00b2 Patch #1429775: Link Python modules to libpython on linux if
--enable-shared. Fixes #832799.
2006-04-10 12:39:36 +00:00
Martin v. Löwis b04dee935c Patch #1462222: Fix Tix.Grid. Closes #1036406. 2006-04-10 08:34:21 +00:00
Neal Norwitz 6974a51d1a I wonder if we can be too graceful? One oughta be enough. :-) 2006-04-10 00:25:01 +00:00
Anthony Baxter 8220174489 Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
to load extension modules and now provides the dl module. As a result,
sys.setdlopenflags() now works correctly on these systems. (SF patch
#1454844)
2006-04-09 15:07:40 +00:00
Neal Norwitz a31bf18c48 glob('anything*/') would fail because isdir is in os.path, not os. 2006-04-09 03:35:43 +00:00
Gregory P. Smith 7f5b6f4b33 Fix bsddb.db.DBError derived exceptions so they can be unpickled.
Also adds some backwards compatibility when compiling _bsddb.c on earlier
python versions (needed for pybsddb).
2006-04-08 07:10:51 +00:00
Anthony Baxter 51bcb68b1d blank spots for Misc/NEWS, post alpha1 (plus testing buildbot 0.7.2) 2006-04-05 14:51:42 +00:00
Matthias Klose d77f8b3bea - correct patch number 2006-04-03 16:34:56 +00:00
Matthias Klose 8e39ec78bc - Patch #360466: Replace the MD5 implementation from RSA Data Security Inc
with the implementation from http://sourceforge.net/projects/libmd5-rfc/.
2006-04-03 16:27:50 +00:00
Anthony Baxter ebed3f629b preparation for 2.5a1 2006-04-03 15:03:44 +00:00
Martin v. Löwis ea62d2535f Bug #1421664: Set sys.stderr.encoding 2006-04-03 10:56:49 +00:00
Anthony Baxter 93f5b93422 The email module's parsedate_tz function now sets the daylight savings
flag to -1 (unknown) since it can't tell from the date whether it should
be set.
patch from Aldo Cortesi
2006-04-03 08:05:07 +00:00
Neal Norwitz 92e212f7d9 Accept keyword arguments for __import__ and doc the addition of the level param from PEP 328. 2006-04-03 04:48:37 +00:00
Fred Drake ad5177cf8d Patch #624325: urlparse.urlparse() and urlparse.urlsplit() results
now sport attributes that provide access to the parts of the result.
2006-04-01 22:14:43 +00:00
Andrew M. Kuchling 7034f6b79f Some typo & grammar fixes 2006-04-01 10:50:08 +00:00
Georg Brandl 828fdefd92 Update SQLite version requirement. 2006-04-01 08:59:03 +00:00
Georg Brandl 7f6b67c235 patch #1462498: handle entityrefs in attribute values. 2006-04-01 08:35:18 +00:00
Walter Dörwald 48d5e508eb Bug #947906: Add classes LocaleTextCalendar and LocaleHTMLCalendar,
that output localized month and weekday names and can cope
with encodings.
2006-04-01 07:57:00 +00:00
Anthony Baxter c51ee69b27 merged the sqlite-integration branch.
This is based on pysqlite2.1.3, and provides a DB-API interface in
the standard library. You'll need sqlite 3.2.2 or later to build
this - if you have an earlier version, the C extension module will
not be built.
2006-04-01 00:57:31 +00:00
Tim Peters c17976e983 Another crack at bug #1460340: make random.sample(dict)
work, this time by ugly brute force.
2006-04-01 00:26:53 +00:00
Georg Brandl ccadf84a1b Patch #1460496: round() now accepts keyword arguments. 2006-03-31 18:54:53 +00:00
Georg Brandl 338ef7d2bd Bug #1445068: getpass.getpass() can now be given an explicit stream
argument to specify where to write the prompt.
2006-03-31 18:42:16 +00:00
Georg Brandl 22ec80bc4f Patch #1462313, bug #1443328: the pickle modules now can handle classes
that have __private names in their __slots__.
2006-03-31 18:25:44 +00:00
Georg Brandl 43f08a85e4 Patch #1380952: fix SSL objects timing out on consecutive read()s 2006-03-31 18:01:16 +00:00
Georg Brandl dd2245f230 Bug #1250170, Patch #1462230: handle socket.gethostname()
failures gracefully
2006-03-31 17:18:06 +00:00
Walter Dörwald 58917a6083 Bug #947906: An object oriented interface has been added to the calendar
module. It's possible to generate HTML calendar now and the module can be
called as a script (e.g. via ``python -mcalendar``).
2006-03-31 15:26:22 +00:00
Neal Norwitz 602d339047 Add a NEWS entry for the Alpha fixes 2006-03-31 08:21:40 +00:00
Anthony Baxter 262c00a21e Fixed bug #1459029 - unicode reprs were double-escaped.
Backed out an old patch from 2000.
2006-03-30 10:53:17 +00:00
Phillip J. Eby 59821cf209 Oops, forgot to checkin the NEWS for --identity 2006-03-30 02:16:40 +00:00
Georg Brandl 80bb2bb7eb Revert r43399. 2006-03-28 19:19:56 +00:00
Georg Brandl f1349cd05d Bug #1459963: urllib2 now normalizes HTTP header names correctly
with title().
2006-03-28 12:40:24 +00:00
Walter Dörwald 40108c97fb Mention patch id for the CJK part of the patch and
the name of the two new C functions.
2006-03-27 08:15:44 +00:00
Tim Peters c9d78aa470 Years in the making.
objimpl.h, pymem.h:  Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE}
to PyObject_{Free, FREE} in a release build.  They're aliases for the
system free() now.

_subprocess.c/sp_handle_dealloc():  Since the memory was originally
obtained via PyObject_NEW, it must be released via PyObject_FREE (or
_DEL).

pythonrun.c, tokenizer.c, parsermodule.c:  I lost count of the number of
PyObject vs PyMem mismatches in these -- it's like the specific
function called at each site was picked at random, sometimes even with
memory obtained via PyMem getting released via PyObject.  Changed most
to use PyObject uniformly, since the blobs allocated are predictably
small in most cases, and obmalloc is generally faster than system
mallocs then.

If extension modules in real life prove as sloppy as Python's front
end, we'll have to revert the objimpl.h + pymem.h part of this patch.
Note that no problems will show up in a debug build (all calls still go
thru obmalloc then). Problems will show up only in a release build, most
likely segfaults.
2006-03-26 23:27:58 +00:00
Raymond Hettinger fd3fcf0b35 SF Patch #1455676: Simplify using Queues with daemon consumer threads
Adds join() and task_done() methods to track when all enqueued tasks have
been gotten and fully processed by daemon consumer threads.
2006-03-24 20:43:29 +00:00
Martin v. Löwis bd8dbab247 Preserve command name, for later printing of active
commands. If there are active commands when the tests
start, fail, printing these commands.
2006-03-23 18:18:35 +00:00
Hye-Shik Chang d478f3453f Patch #1396919: Reenable the system scope threads on FreeBSD 5.4
and later versions because they bumped the default setting to
get our basic tests to run correctly..
2006-03-23 12:32:36 +00:00
Neal Norwitz e98ccf6690 Forward port MvL's fix in 43227:
Fix crash when a Unicode string containing an encoding declaration is
compile()d. Fixes #1115379.
2006-03-23 05:39:47 +00:00
Thomas Heller c61c049955 ctypes was added. 2006-03-22 10:09:27 +00:00
Georg Brandl 72d7a78eb0 Change NEWS entry for recent socket API change 2006-03-22 06:44:14 +00:00
Barry Warsaw 4d90bbd292 News about email 4.0. 2006-03-22 02:45:50 +00:00
Anthony Baxter 24078c5c4f moved older releases into HISTORY 2006-03-20 06:30:41 +00:00
Neal Norwitz 05a45599d7 Patch #1309579: wait3 and wait4 were added to the posix module by Chad J. Schroeder.
This was a fair amount of rework of the patch.  Refactored test_fork1 so it
could be reused by the new tests for wait3/4.  Also made them into new style
unittests (derive from unittest.TestCase).
2006-03-20 06:30:08 +00:00
Anthony Baxter fa86907aae SF [ 1231053 ] audioop - alaw encoding/decoding added, code updated
This patch adds a-LAW encoding to audioop and replaces the old
u-LAW encoding/decoding code with the current code from sox.

Possible issues: the code from sox uses int16_t.

Code by Lars Immisch
2006-03-20 05:21:58 +00:00
Georg Brandl abd1ff8f1f Previously, Python code had no easy way to access the contents of a
cell object. Now, a ``cell_contents`` attribute has been added
(closes patch #1170323).
2006-03-18 07:59:59 +00:00
Georg Brandl bc45a3f821 RFE #567972: Socket objects' family, type and proto properties are
now exposed via new get...() methods.
2006-03-17 19:17:34 +00:00
Neal Norwitz 10be10cbe7 Remove regsub, reconvert, regex, regex_syntax and everything under lib-old. 2006-03-16 06:50:13 +00:00
Neal Norwitz efbeaef1c1 Add a news entry about the sre/re swap. 2006-03-16 06:40:39 +00:00
Tim Peters cf79aace07 Merge the tim-obmalloc branch to the trunk.
This is a heavily altered derivative of SF patch 1123430, Evan
Jones's heroic effort to make obmalloc return unused arenas to
the system free(), with some heuristic strategies to make it
more likley that arenas eventually _can_ be freed.
2006-03-16 01:14:46 +00:00
Walter Dörwald 067db48997 Document the other change from patch #1359365. 2006-03-15 22:17:27 +00:00
Walter Dörwald 197e8321c6 SF patch #1359365: cStringIO.StringIO.isatty() will raise a ValueError
now if close() has been called before (like file and StringIO.StringIO do)
2006-03-15 22:13:13 +00:00
Walter Dörwald abb02e5994 Patch #1436130: codecs.lookup() now returns a CodecInfo object (a subclass
of tuple) that provides incremental decoders and encoders (a way to use
stateful codecs without the stream API). Functions
codecs.getincrementaldecoder() and codecs.getincrementalencoder() have
been added.
2006-03-15 11:35:15 +00:00
Hye-Shik Chang abb903fd54 Bug #1448490: Fix a bug that ISO-2022 codecs could not handle
SS2 (single-shift 2) escape sequences correctly.
2006-03-13 10:20:08 +00:00