R. David Murray [Sat, 2 Oct 2010 15:58:26 +0000 (15:58 +0000)]
#1050268: make parseaddr 'quote' the contents of quoted strings in addresses.
Also made the doc string for email._parseaddr's 'quote' function more
accurate; I'd love to make the function match the old docstring instead,
but other code uses it according the existing semantics.
Victor Stinner [Sat, 2 Oct 2010 11:11:27 +0000 (11:11 +0000)]
Issue #8670: PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() replace
UTF-16 surrogate pairs by single non-BMP characters for 16 bits Py_UNICODE
and 32 bits wchar_t (eg. Linux in narrow build).
Mark Dickinson [Wed, 29 Sep 2010 19:06:36 +0000 (19:06 +0000)]
Issue #9599: Further accuracy tweaks to loghelper. For an integer n that's small enough to be converted to a float without overflow, log(n) is now computed as log(float(n)), and similarly for log10.
Antoine Pitrou [Wed, 29 Sep 2010 15:03:40 +0000 (15:03 +0000)]
Issue #9360: Cleanup and improvements to the nntplib module. The API
now conforms to the philosophy of bytes and unicode separation in Python 3.
A test suite has also been added.
Brian Curtin [Wed, 29 Sep 2010 14:51:42 +0000 (14:51 +0000)]
Fix #9978. WINFUNCTYPE is from ctypes, not from ctypes.wintypes.
r85073 changed the importing in wintypes to not use *, so the previous
usage here became even more incorrect.
Victor Stinner [Wed, 29 Sep 2010 10:37:16 +0000 (10:37 +0000)]
Issue #9979: Use PyUnicode_AsWideCharString() in _ctypes module
* Convert unicode to wide character string before creating the PyCapsule
object
* Catch integer overflow
* Avoid useless memset()
* Prepare the support of surrogates
Antoine Pitrou [Tue, 28 Sep 2010 23:59:51 +0000 (23:59 +0000)]
Give a dedicated page to memoryview objects, so that they can be part
of the concrete objects layer, while the buffer protocol is part of
the abstract objects layer.
Antoine Pitrou [Tue, 28 Sep 2010 21:23:11 +0000 (21:23 +0000)]
Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
retry the select() loop instead of bailing out. This is because select()
can incorrectly report a socket as ready for reading (for example, if it
received some data with an invalid checksum).
Brian Curtin [Mon, 27 Sep 2010 17:56:36 +0000 (17:56 +0000)]
Implement #8521. Added named argument handling to winreg's CreateKeyEx,
DeleteKeyEx, and OpenKeyEx.
Note that CKE and DKE are new functions for 3.2 so I didn't give them a
versionchanged because of the existing versionadded. OpenKeyEx already
existed so it gets a versionchanged tag.
Antoine Pitrou [Mon, 27 Sep 2010 17:52:25 +0000 (17:52 +0000)]
Issue #9950: Fix socket.sendall() crash or misbehaviour when a signal is
received. Now sendall() properly calls signal handlers if necessary,
and retries sending if these returned successfully, including on sockets
with a timeout.
Issue 9941: Minor code cleanup before implementing the context manager feature:
- Eliminated code repetition between run and runctx;
- Removed redundant calls to dict.key;
- Removed unused "blabbed" attribute;
- Simplified the loop in write_results_file().
Fix Issue1595365 - Adding the req.headers after the un-redirect headers have
been added. This helps in accidental overwritting of User-Agent header to
default value. To preserve the old behavior, only headers not in unredirected
headers will be updated.
Brian Curtin [Fri, 24 Sep 2010 13:56:34 +0000 (13:56 +0000)]
Fix #9790 again. Rather than handle NotImplementedError at runtime as
before, only attempt the import where nt._getfinalpathname could actually
work, i.e., Windows Vista and beyond.
Mark Dickinson [Thu, 23 Sep 2010 20:11:19 +0000 (20:11 +0000)]
Issue #9930: Remove an unnecessary type check in wrap_binaryfunc_r;
this was causing reversed method calls like float.__radd__(3.0, 1) to
return NotImplemented instead of the expected numeric value.
Brian Curtin [Thu, 23 Sep 2010 20:04:14 +0000 (20:04 +0000)]
#9808. Implement os.getlogin for Windows, completed by Jon Anglin.
The test is semi-dumb, it just makes sure something comes back since we
don't have a solid source to validate the returned login. We can't be 100%
sure that the USERNAME env var will always match what os.getlogin() returns,
so we don't make any specific assertion there.