Neal Norwitz [Fri, 25 Jan 2008 06:37:23 +0000 (06:37 +0000)]
Make the test more robust by trying to reconnect up to 3 times
in case there were transient failures. This will hopefully silence
the buildbots for this test. As we find other tests that have a problem,
we can fix with a similar strategy assuming it is successful. It worked
on my box in a loop for 10+ runs where it would have an exception otherwise.
Thomas Heller [Thu, 24 Jan 2008 19:15:02 +0000 (19:15 +0000)]
Invert the checks in get_[u]long and get_[u]longlong. The intent was
to not accept float types; the result was that integer-like objects
were not accepted.
Thomas Heller [Thu, 24 Jan 2008 18:36:27 +0000 (18:36 +0000)]
Use a PyDictObject again for the array type cache; retrieving items
from the WeakValueDictionary was slower by nearly a factor of 3.
To avoid leaks, weakref proxies for the array types are put into the
cache dict, with weakref callbacks that removes the entries when the
type goes away.
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)