10088 Commits

Author SHA1 Message Date
Anthony Baxter
e33da3b310 2.4.3c1 2006-03-23 02:20:57 +00:00
Martin v. Löwis
73c8c2c3dd Change SystemError into SyntaxError, when a Unicode string
containing an encoding declaration is compile()d. Fixes
#1115379.
2006-03-22 13:55:50 +00:00
Vinay Sajip
2c20676e51 Catch situations where currentframe() returns None. See SF patch #1447410, this is a different implementation. 2006-03-20 09:22:40 +00:00
Tim Peters
0ca22126ce 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.
2006-03-20 02:12:05 +00:00
Neal Norwitz
5a8605ec1c Backport 43147:
Fix problem spotted by Coverity that occurs if tzinfo.tzname().replace()
returns a non-string when converting %Z.
2006-03-20 02:05:58 +00:00
Kurt B. Kaiser
210256e9ba Source file f.flush() after writing; trying to avoid lossage if user
kills GUI.  Report from Bruce Sherwood.
2006-03-19 22:12:03 +00:00
Tim Peters
c612a5dbca 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.
2006-03-18 02:47:38 +00:00
Tim Peters
d1442b4d0e Merge rev 43081 from trunk.
Set eol-style to native.
2006-03-16 18:56:35 +00:00
Tim Peters
d82f391974 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.
2006-03-16 18:52:17 +00:00
Neal Norwitz
8a2bffc235 Backport 42932:
Try to be a bit more consistent on all platforms:
 python .
 python < .

both print a message, return non-zero and do not core dump.
This hopefully fixes the failure on Solaris.
2006-03-14 06:47:07 +00:00
Hye-Shik Chang
b0c3bdde45 Backport from trunk r42989:
Bug #1448490: Fixed a bug that ISO-2022 codecs could not handle
SS2 (single-shift 2) escape sequences correctly.
2006-03-13 10:24:31 +00:00
Tim Peters
ef63e9f345 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).
2006-03-13 05:53:04 +00:00
Tim Peters
1baff3cffd 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).
2006-03-13 04:50:34 +00:00
Tim Peters
82e8f38434 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.
2006-03-11 04:55:45 +00:00
Martin v. Löwis
eed78ef68c Backport of 42960, to support the options buildbot uses. 2006-03-10 22:15:48 +00:00
Georg Brandl
865ddfb7c5 Fix pydoc.synopsis() so that it doesn't error out with an unreadable
module.
 (backport from rev. 42912)
2006-03-08 09:34:57 +00:00
Andrew M. Kuchling
5f2ad0b4e4 Typo fix 2006-03-07 16:17:09 +00:00
Thomas Wouters
e34fc700fc Backport trunk's r42878 (neal.norwitz):
Thanks to Coverity, these were all reported by their Prevent tool.

and r42881 (thomas.wouters):

Don't DECREF a borrowed reference.
2006-03-07 12:08:42 +00:00
Walter Dörwald
a4b4dc328f Backport revision 42872:
If size is specified, try to read at least size characters.
This is a alternative version of patch #1379332.
2006-03-06 22:44:03 +00:00
Barry Warsaw
39be80600b Skip codecs tests on Python 2.3. 2006-03-06 00:55:25 +00:00
Georg Brandl
fea6059476 Bug #1210377: close bsddb cursor correctly after NotFoundError. 2006-02-20 20:29:56 +00:00
Georg Brandl
f07e42c159 Bug #1101233: fix test_fcntl on netbsd2 platform. 2006-02-20 10:32:05 +00:00
Armin Rigo
0b61a45223 Backported from r41842. 2006-02-20 10:21:14 +00:00
Georg Brandl
044d2ce37c Patch #1337756: fileinput now accepts Unicode filenames. 2006-02-19 09:51:33 +00:00
Neal Norwitz
f3cba11e55 Backport: This should get test_timeout to pass when running on any python.org host. 2006-02-18 21:25:56 +00:00