Antoine Pitrou [Wed, 1 Sep 2010 20:29:34 +0000 (20:29 +0000)]
Issue #8990: array.fromstring() and array.tostring() get renamed to
frombytes() and tobytes(), respectively, to avoid confusion. Furthermore,
array.frombytes(), array.extend() as well as the array.array()
constructor now accept bytearray objects. Patch by Thomas Jollans.
Antoine Pitrou [Wed, 1 Sep 2010 18:54:56 +0000 (18:54 +0000)]
Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
Clean-up bisect docs.
* Document the post conditions for bisect_left() and bisect_right().
* Fix the grades example to use more obvious breakpoints
and to use a list comprehension instead of map() which returns
an iterator in Py3.x.
* Improve and expand the examples of searching sorted lists.
* Issue 4356 -- move up reference to the SortedCollection recipe.
Daniel Stutzbach [Tue, 31 Aug 2010 15:45:04 +0000 (15:45 +0000)]
Reverted r84315 and r84316, with Benjamin's blessing. The tests were
fine. They were failing due to a problem exposed in r84307 and fixed
in r84317. See Issue 8781 for details.
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).