Neal Norwitz [Thu, 24 Jan 2008 07:40:51 +0000 (07:40 +0000)]
Fix the test_urllib2net failures that were caused by r58067.
I'm not sure this is the correct fix, but at least the test passes
now and should be closer to correct.
Christian Heimes [Wed, 23 Jan 2008 17:15:06 +0000 (17:15 +0000)]
Applied #1069410
The "can't load dll" message box on Windows is suppressed while an extension is loaded by calling SetErrorMode in dynload_win.c. The error is still reported properly.
Guido van Rossum [Wed, 23 Jan 2008 01:18:27 +0000 (01:18 +0000)]
I'm tired of these tests breaking at Google due to our large number of
users and groups in LDAP/NIS. So I'm limiting the extra-heavy part of
the tests to passwd/group files with at most 1000 entries.
Christian Heimes [Tue, 22 Jan 2008 15:25:18 +0000 (15:25 +0000)]
Don't repeat yourself
Added the macros PyModule_AddIntMacro and PyModule_AddStringMacro. They shorten PyModule_AddIntConstant(m, "AF_INET", AF_INET) to PyModule_AddIntMacro(m, AF_INET)
Brett Cannon [Mon, 21 Jan 2008 23:50:16 +0000 (23:50 +0000)]
Make's MAKEFLAGS variable is set to a string containing the single-letter
arguments to Make. This means there are no hyphens. Fix the '-s' check to
silence distutils to now work.
Gregory P. Smith [Mon, 21 Jan 2008 07:11:11 +0000 (07:11 +0000)]
Provide a sanity check during PyThreadState_DeleteCurrent() and
PyThreadState_Delete() to avoid an infinite loop when the tstate list
is messed up and has somehow becomes circular and does not contain the
current thread.
I don't know how this happens but it does, *very* rarely. On more than
one hardware platform. I have not been able to reproduce it manually.
Attaching to a process where its happening: it has always been in an
infinite loop over a single element tstate list that is not the tstate
we're looking to delete. It has been in t_bootstrap()'s call to
PyThreadState_DeleteCurrent() as a pthread is exiting.
Georg Brandl [Sun, 20 Jan 2008 12:18:17 +0000 (12:18 +0000)]
#1664522: in urllib, don't read non-existing directories in ftp mode,
returning a 0-byte file -- raise an IOError instead.
Original patch from Phil Knirsch.
Georg Brandl [Sun, 20 Jan 2008 12:05:43 +0000 (12:05 +0000)]
#856047: respect the ``no_proxy`` env var when checking for proxies
in urllib and using the other ``_proxy`` env vars.
Original patch by Donovan Baarda.
Gregory P. Smith [Sun, 20 Jan 2008 01:32:00 +0000 (01:32 +0000)]
Document that zipfile decryption is insanely slow and fix a typo and
blatant lie in a docstring (it is not useful for security regardless of
how you spell it).
Gregory P. Smith [Sun, 20 Jan 2008 01:21:03 +0000 (01:21 +0000)]
Fix zipfile decryption. The check for validity only worked on one
type of encrypted zip files. Files using extended local headers
needed to compare the check byte against different values. (according
to reading the infozip unzip crypt.c source code)
Gregory P. Smith [Sat, 19 Jan 2008 20:57:59 +0000 (20:57 +0000)]
Fixes issue1336 - a race condition could occur when forking if the gc
kicked in during the critical section. solution: disable gc during
that section. Patch contributed by jpa and updated by me to cover the
race condition still existing what therve from twistedmatrix pointed
out (already seen and fixed in twisted's own subprocess code).
Patch #1019808 from Federico Schwindt: Return correct socket error when
a default timeout has been set, by using getsockopt() to get the error
condition (instead of trying another connect() call, which seems to be
a Linuxism).
2.5 bugfix candidate, assuming no one reports any problems with this change.
Georg Brandl [Sat, 19 Jan 2008 20:22:13 +0000 (20:22 +0000)]
#1663329: add os.closerange() to close a range of fds,
ignoring errors, and use this in subprocess to speed up
subprocess creation in close_fds mode. Patch by Mike Klaas.