Tim Peters [Mon, 20 Mar 2006 06:06:07 +0000 (06:06 +0000)]
The new fetch_data_files.py downloads all the input data files
used by encoding tests. Fiddled the Windows buildbot helper
scripts to invoke this if needed. Note that this isn't needed
on the trunk (the encoding tests download input files automatically
in 2.5).
Tim Peters [Mon, 20 Mar 2006 02:12:05 +0000 (02:12 +0000)]
Merge revs 42842, 42844, and part of a whitespace normalization
patch from the trunk.
This stops test_socket_ssl from dying with:
TypeError: 'NoneType' object is not callable
in urlparsre.py's urljoin() when the tests are run in this order:
test_???
test_importhooks
test_socket_ssl
"test_???" can be various things, but must be there. For
example, test_urllibnet "works" to provoke the failure.
Alas, nobody actually understands _why_ test_socket_ssl fails
then, or why this hack makes the problem go away.
Amazingly, the tests just happened to run in the right order on
the 2.4 branch on two Windows buildbot slaves today, causing them
both to fail their most recent test runs before this patch.
Tim Peters [Sat, 18 Mar 2006 02:47:38 +0000 (02:47 +0000)]
Merge rev 43091 from the trunk.
"""
Try to find a host that responds slower from python.org so this test
does not fail on macteagle (G4 OSX.4 in buildbot)
"""
Since testConnectTimeout() frequently fails in the same way in 2.4
branch, and this patch seems to have fixed it on the trunk, it
should fix it on the 2.4 branch too.
Tim Peters [Thu, 16 Mar 2006 18:52:17 +0000 (18:52 +0000)]
Merge rev 43079 from the trunk. This should allow test_winsound to pass
on a box without a sound card.
Update test_winsound to check for a configured sound card (using a VBScript
helper written by Roger Upole and Mark Hammond) and adjust the expected
PlaySoundTest case results accordingly.
Neal Norwitz [Tue, 14 Mar 2006 06:10:22 +0000 (06:10 +0000)]
Backport 43022:
Fix and test (manually w/xx module) passing NULLs to PyObject_Str() and
PyObject_Unicode(). This problem was originally reported from Coverity
and addresses mail on python-dev "checkin r43015".
This inlines the conversion of the string to unicode and cleans
up/simplifies some code at the end of the PyObject_Unicode().
We really need a complete C API test module for all public APIs
and passing good and bad parameter values.
Tim Peters [Mon, 13 Mar 2006 05:53:04 +0000 (05:53 +0000)]
Merge rev 42963 from the trunk.
When the new -w option (yay! great idea) reruns a
failed test, first display the name of the test (else
it's not always clear from the output which test is
getting run).
Tim Peters [Mon, 13 Mar 2006 04:50:34 +0000 (04:50 +0000)]
Merge rev 41859 from the trunk.
test_main(): Restore the original root logger level after running
the tests. This stops the confusing/annoying:
No handlers could be found for logger "cookielib"
message we got whenever some test running after test_logging
happened to use cookielib.py (when not using regrtest's -r,
this happened during test_urllib2; when using -r, it varied).
Tim Peters [Mon, 13 Mar 2006 04:17:40 +0000 (04:17 +0000)]
Merge rev 42984 from trunk.
Adding the /useenv means that one's PATH actually gets through. This is
important for the _ssl.vproj build. It calls build_ssl.py which tries to
find a Perl to use. Without "/useenv" Visual Studio is getting a PATH
from somewhere else (presumably from its internal environment
configuration). The result is that build_ssl.py fallsback to its
"well-known" locations for a Perl install.
Tim Peters [Sun, 12 Mar 2006 07:05:34 +0000 (07:05 +0000)]
Add a do-nothing "clean" operation to the _ssl project,
so the buildbot's "clean" step doesn't fail due to
_ssl whining that it can't spawn an empty string.
Tim Peters [Sat, 11 Mar 2006 04:55:45 +0000 (04:55 +0000)]
Merge rev 42904 from the trunk.
_hotshot hotshot_profiler(): If write_header() returned
an error code, this let `self` leak. This is a disaster
on Windows, since `self` already points to a newly-opened
file object, and it was impossible for Python code to
close the thing since the only reference to it was in a
blob of leaked C memory.
test_hotshot test_bad_sys_path(): This new test provoked
the C bug above. This test passed, but left an open
"@test" file behind, which caused a massive cascade of
bogus test failures in later, unrelated tests on Windows.
Changed the test code to remove the @test file it leaves
behind, which relies on the change above to close that
file first.
Brett Cannon [Mon, 27 Feb 2006 23:15:56 +0000 (23:15 +0000)]
Return value off PyErr_Warn() for raising string exceptions was not being
checked. Problem when 'warnings' was set to "error" and thus would re-raise a
new exception.
PyThreadState_Delete(): if the auto-GIL-state machinery knows about
the thread state, forget it (since the thread state is being deleted,
continuing to remember it can't help, but can hurt if another thread
happens to get created with the same thread id).
Neal Norwitz [Tue, 7 Feb 2006 07:17:37 +0000 (07:17 +0000)]
Backport:
Bug #876637, prevent stack corruption when socket descriptor
is larger than FD_SETSIZE.
This can only be acheived with ulimit -n SOME_NUMBER_BIGGER_THAN_FD_SETSIZE
which is typically only available to root. Since this wouldn't normally
be run in a test (ie, run as root), it doesn't seem too worthwhile to
add a normal test. The bug report has one version of a test. I've
written another. Not sure what the best thing to do is.
Do the check before calling internal_select() because we can't set
an error in between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS.
This seemed the clearest solution.
Thomas Wouters [Sat, 28 Jan 2006 12:08:39 +0000 (12:08 +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.