Barry Warsaw [Fri, 13 Apr 2007 16:12:02 +0000 (16:12 +0000)]
Add code to read from master_fd in the parent, breaking when we get an OSError
(EIO can occur on Linux) or there's no more data to read. Without this,
test_pty.py can hang on the waitpid() because the child is blocking on the
stdout write. This will definitely happen on Mac OS X and could potentially
happen on other platforms. See the comment for details.
Backport 54644:
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.
Georg Brandl [Sat, 31 Mar 2007 18:58:21 +0000 (18:58 +0000)]
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.
(backport from rev. 54634)
Georg Brandl [Thu, 29 Mar 2007 12:42:16 +0000 (12:42 +0000)]
In Windows' time.clock(), when QueryPerformanceFrequency() fails,
the C lib's clock() is used, but it must be divided by CLOCKS_PER_SEC
as for the POSIX implementation (thanks to #pypy).
(backport from rev. 54606)
Žiga Seilnacht [Sat, 24 Mar 2007 14:27:21 +0000 (14:27 +0000)]
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.
(backport from rev. 54559)
Georg Brandl [Wed, 21 Mar 2007 11:52:38 +0000 (11:52 +0000)]
Bug #1684254: webbrowser now uses shlex to split any command lines
given to get(). It also detects when you use '&' as the last argument
and creates a BackgroundBrowser then.
(backport -- this is a regression from 2.4 and therefore backported)
Georg Brandl [Wed, 21 Mar 2007 09:00:55 +0000 (09:00 +0000)]
Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
(backport from rev. 54480)
Žiga Seilnacht [Thu, 15 Mar 2007 11:47:59 +0000 (11:47 +0000)]
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.
(backport from rev. 54397)
Žiga Seilnacht [Wed, 14 Mar 2007 12:34:30 +0000 (12:34 +0000)]
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.
(backport from rev. 54378)
Georg Brandl [Wed, 14 Mar 2007 08:27:57 +0000 (08:27 +0000)]
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.
(backport from rev. 54376)
Barry Warsaw [Wed, 14 Mar 2007 04:29:06 +0000 (04:29 +0000)]
SF bug #1582282; decode_header() incorrectly splits not-conformant RFC
2047-like headers where there is no whitespace between encoded words. This
fix changes the matching regexp to include a trailing lookahead assertion that
the closing ?= must be followed by whitespace, newline, or end-of-string.
This also changes the regexp to add the MULTILINE flag.
Collin Winter [Sun, 11 Mar 2007 16:04:01 +0000 (16:04 +0000)]
Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap the IndexError caused by passing in an invalid breakpoint number.
Backport of r54271.
Žiga Seilnacht [Sun, 11 Mar 2007 16:01:51 +0000 (16:01 +0000)]
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.
(backport from rev. 54270)
Collin Winter [Sat, 10 Mar 2007 03:31:44 +0000 (03:31 +0000)]
Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket. Fixed by patch #1545011.
Backported from r54253.
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.
........
Georg Brandl [Wed, 7 Mar 2007 08:32:24 +0000 (08:32 +0000)]
Patch #1001604: glob.glob() now returns unicode filenames if it was
given a unicode argument and os.listdir() returns unicode filenames.
(backport from rev. 54197)
Walter Dörwald [Tue, 6 Mar 2007 20:46:26 +0000 (20:46 +0000)]
Backport checkin:
Patch for bug #1633621: if curses.resizeterm() or
curses.resize_term() is called, update _curses.LINES,
_curses.COLS, curses.LINES and curses.COLS.