Neal Norwitz [Sun, 5 Feb 2006 08:21:08 +0000 (08:21 +0000)]
Get test_logging to not hang when running under regrtest.py -R ::
Not sure why/how _handlers/_handlerList is out of sync. This could
indicate a deeper problem.
In test_logging, the only absolutely necessary change to get working
was tcpserver.abort = 1. But we don't want to wait infinitely
to join the threads, so give a 2.0 second timeout.
There doesn't appear to be a need for a local abort variable
in serve_until_stopped, so just use the instance member.
Neal Norwitz [Sun, 5 Feb 2006 05:45:43 +0000 (05:45 +0000)]
Patch #1407135, bug #1424041, make mmap.mmap(-1, length) work the same
on both Unix (SVR4 and BSD) and Windows. Restores behaviour of passing -1
for anonymous memory on Unix. Use MAP_ANONYMOUS instead of _ANON since
the latter is deprecated according to Linux (gentoo) man pages.
Should we continue to allow mmap.mmap(0, length) to work on Windows?
0 is a valid fd.
Thomas Wouters [Wed, 1 Feb 2006 21:32:04 +0000 (21:32 +0000)]
As discussed on python-dev, silence three gcc-4.0.x warnings, using assert()
to protect against actual uninitialized usage.
Objects/longobject.c: In function ‘PyLong_AsDouble’:
Objects/longobject.c:655: warning: ‘e’ may be used uninitialized in this function
Objects/longobject.c: In function ‘long_true_divide’:
Objects/longobject.c:2263: warning: ‘aexp’ may be used uninitialized in this function
Objects/longobject.c:2263: warning: ‘bexp’ may be used uninitialized in this function
Gustavo Niemeyer [Tue, 31 Jan 2006 18:34:13 +0000 (18:34 +0000)]
Patch #1413711: Certain patterns of differences were making difflib
touch the recursion limit. The applied patch inlines the recursive
__helper method in a non-recursive way.
Thomas Wouters [Sat, 28 Jan 2006 12:05:54 +0000 (12:05 +0000)]
Work around a Solaris peculiarity that caused test_pty to sometimes fail: a
tty opened by os.openpty() isn't always a tty according to os.isatty(), when
it's tested inside the process that opened it. Doesn't affect actual
functionality, as using a tty this way is rarely, if ever, useful. Ignoring
the failure allows the test for actual functionality to continue.
Jeremy Hylton [Fri, 27 Jan 2006 15:18:39 +0000 (15:18 +0000)]
Improved handling of syntax errors.
Expand set of errors caught in set_context(). Some new errors, some
old error messages changed for consistency.
Fixed error checking in generator expression code. The first set of
tests were impossible condition given the grammar. In general, the
ast code uses REQ() for those sanity checks.
Fix some error handling for augmented assignments. As comments in the
code explain, set_context() ought to work here, but I got unexpected
crashes when I tried it. Should come back to this.
Add note to Grammar that yield expression is a special case.
Add doctest cases for SyntaxErrors raised by ast.c.
Neal Norwitz [Wed, 25 Jan 2006 08:39:35 +0000 (08:39 +0000)]
There was a race condition where the connector would try to connect
before the listener was ready (on gentoo x86 buildslave). This
caused the listener to not exit normally since nobody connected to it
(waited in accept()). The exception was raised in the other thread
and the test failed.
This fix doesn't completely eliminate the race, but should make it
near impossible to trigger. Hopefully it's good enough.
Martin v. Löwis [Tue, 24 Jan 2006 15:51:21 +0000 (15:51 +0000)]
Patch #1349118: urllib2 now supports user:pass@ style proxy
specifications, raises IOErrors when proxies for unsupported protocols
are defined, and uses the https proxy on https redirections.
Otherwise the compiled code is gibberish, possibly leading at
least to wrong results or (as reported on c.l.py) internal
sre errors at match time.
I'm not sure how to test this. SRE_CODE is a 2-byte type on
my box, and it's easy to create a regexp that causes the new
exception to trigger here. But it may be a 4-byte type on
other boxes, and creating a regexp large enough to trigger
problems there would be pretty crazy.
Barry Warsaw [Tue, 17 Jan 2006 04:49:07 +0000 (04:49 +0000)]
Ported 42075 from release23-maint branch.
SF bug #1403349 solution for email 3.0; some MUAs use the 'file' parameter
name in the Content-Distribution header, so Message.get_filename() should fall
back to using that. Will port to the Python 2.5 trunk.
Also, bump the email package version to 3.0.1 for eventual release. Of
course, add a test case too.
Vinay Sajip [Mon, 16 Jan 2006 09:27:58 +0000 (09:27 +0000)]
Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).
Vinay Sajip [Mon, 16 Jan 2006 09:27:10 +0000 (09:27 +0000)]
Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).