Antoine Pitrou [Sat, 28 Aug 2010 20:42:55 +0000 (20:42 +0000)]
Issue #4835: make PyLong_FromSocket_t() and PyLong_AsSocket_t() private
to the socket module, and fix the width of socket descriptors to be
correctly detected under 64-bit Windows.
R. David Murray [Wed, 25 Aug 2010 00:45:55 +0000 (00:45 +0000)]
#1194222: make parsedate always return RFC2822 four character years.
Two character years are now converted to four character years using
the Posix standard rule (<68 == 2000, >=68==1900). This makes the
parsed date RFC2822 compliant even if the input is not.
Victor Stinner [Tue, 24 Aug 2010 23:05:51 +0000 (23:05 +0000)]
Fix test_sys for FreeBSD, Solaris and Mac OS X
_Py_char2wchar() (mbctowcs) decodes b'\xff' to '\xff' on FreeBSD, Solaris and
Mac OS X, even if the locale is C (and the locale encoding is ASCII). Patch
test_undecodable_code() to support this output and document the two different
kinds of outputs.
Daniel Stutzbach [Tue, 24 Aug 2010 21:57:33 +0000 (21:57 +0000)]
Issue 8781: On systems a signed 4-byte wchar_t and a 4-byte Py_UNICODE, use memcpy to convert between the two (as already done when wchar_t is unsigned)
Giampaolo Rodolà [Mon, 23 Aug 2010 22:10:32 +0000 (22:10 +0000)]
fix issue 9601: ftplib now provides a workaround for invalid response code returned on MKD and PWD by non-compliant FTPserver implementations such as ISS shipped with Windows server 2003
Martin v. Löwis [Mon, 23 Aug 2010 15:27:26 +0000 (15:27 +0000)]
Explicitly pass socket type and family for getaddrinfo,
to make test work on Solaris.
Disable gethostbyaddr IDNA test for now as there is no
reverse DNS entry for the IPv6 address of the test name.
Brett Cannon [Sun, 22 Aug 2010 22:19:11 +0000 (22:19 +0000)]
One of the joys of having test_multiprocessing occasionally execute after
test_importlib is that it discovers special little race conditions. For
instance, it turns out that importlib would throw an exception if two different
Python processes both tried to create the __pycache__ directory as one process
would succeed, causing the other process to fail as it didn't expect to get any
"help". So now importlib simply stays calm and just accepts someone else did
the work of creating the __pycache__ directory for it, moving on with life.
Brett Cannon [Sun, 22 Aug 2010 20:38:47 +0000 (20:38 +0000)]
While not strictly necessary thanks to the odd ABC inheritance done through
importlib._bootstrap, add the optional methods for importlib.abc.SourceLoader
for completeness.
Brett Cannon [Sun, 22 Aug 2010 20:36:25 +0000 (20:36 +0000)]
Under OS X, history_get from readline returns a const char *, but the local
variable the return value is assigned to is char *. Since the assigned-to
variable is never changed, simply make that a const char * and cast all calls
to get_history to const char * to silence the compiler warning (found with
LLVM).
Victor Stinner [Fri, 20 Aug 2010 16:38:14 +0000 (16:38 +0000)]
test_undecodable_code(): set locale to C
The test is still failing on "x86 FreeBSD 7.2 3.x" and "sparc solaris10 gcc
3.x" buildbots. It looks like the locale encoding is able to decode b'\xff'. I
suppose that it is an encoding like 'iso-8859-1'.
Use C locale to set, I hope, the locale encoding to 'ascii'. Display also the
encoding so if the test fails, at least I will learn the locale encoding
choosen for the C locale.
Victor Stinner [Fri, 20 Aug 2010 11:08:18 +0000 (11:08 +0000)]
test_main_invalid_unicode() of test_sys: print string as ascii
There are buildbot failures on "x86 FreeBSD 3.x" and "sparc solaris10 gcc 3.x".
I suppose that _Py_char2wchar() doesn't fail even if the locale encoding is
unable to decode the byte string, because _Py_char2wchar() has a special mode
for platform without mbrtowc() (ISO C99) function.
Let's check my theory by avoid error on the Python print() instruction.
Check the return values for all functions returning an ast node.
Failure to do it may result in strange error messages or even crashes,
in admittedly convoluted cases that are normally syntax errors, like:
def f(*xx, __debug__): pass