ret, data = client.login_cram_md5("tim", b"tanstaaftanstaaf")
self.assertEqual(ret, "OK")
-
+
+ @reap_threads
+ def test_aborted_authentication(self):
+
+ class MyServer(SimpleIMAPHandler):
+
+ def cmd_AUTHENTICATE(self, tag, args):
+ self._send_textline('+')
+ self.response = yield
+
+ if self.response == b'*\r\n':
+ self._send_tagged(tag, 'NO', '[AUTHENTICATIONFAILED] aborted')
+ else:
+ self._send_tagged(tag, 'OK', 'MYAUTH successful')
+
+ with self.reaped_pair(MyServer) as (server, client):
+ with self.assertRaises(imaplib.IMAP4.error):
+ code, data = client.authenticate('MYAUTH', lambda x: None)
+
++
def test_linetoolong(self):
class TooLongHandler(SimpleIMAPHandler):
def handle(self):
Core and Builtins
-----------------
-- Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray
- object now always allocates place for trailing null byte and it's buffer now
- is always null-terminated.
+Library
+-------
-- Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
- PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
- to check for and handle errors correctly.
++- Issue #23779: imaplib raises TypeError if authenticator tries to abort.
++ Patch from Craig Holmquist.
+
-- Issue #24257: Fixed system error in the comparison of faked
- types.SimpleNamespace.
+- Issue #23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch
+ written by Matthieu Gautier.
-- Issue #22939: Fixed integer overflow in iterator object. Patch by
- Clement Rouault.
+- Issue #23254: Document how to close the TCPServer listening socket.
+ Patch from Martin Panter.
-- Issue #23985: Fix a possible buffer overrun when deleting a slice from
- the front of a bytearray and then appending some other bytes data.
+- Issue #19450: Update Windows and OS X installer builds to use SQLite 3.8.11.
-- Issue #24102: Fixed exception type checking in standard error handlers.
+- Issue #17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella.
-- Issue #23757: PySequence_Tuple() incorrectly called the concrete list API
- when the data was a list subclass.
+Documentation
+-------------
-- Issue #24407: Fix crash when dict is mutated while being updated.
+- Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
-- Issue #24096: Make warnings.warn_explicit more robust against mutation of the
- warnings.filters list.
+- Issue #24729: Correct IO tutorial to match implementation regarding
+ encoding parameter to open function.
-- Issue #23996: Avoid a crash when a delegated generator raises an
- unnormalized StopIteration exception. Patch by Stefan Behnel.
-- Issue #24022: Fix tokenizer crash when processing undecodable source code.
+What's New in Python 3.5.0 beta 4?
+==================================
-- Issue #23309: Avoid a deadlock at shutdown if a daemon thread is aborted
- while it is holding a lock to a buffered I/O object, and the main thread
- tries to use the same I/O object (typically stdout or stderr). A fatal
- error is emitted instead.
+Release date: 2015-07-26
-- Issue #22977: Fixed formatting Windows error messages on Wine.
- Patch by Martin Panter.
+Core and Builtins
+-----------------
-- Issue #23803: Fixed str.partition() and str.rpartition() when a separator
- is wider then partitioned string.
+- Issue #23573: Restored optimization of bytes.rfind() and bytearray.rfind()
+ for single-byte argument on Linux.
-- Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet.
+- Issue #24569: Make PEP 448 dictionary evaluation more consistent.
-- Issue #23629: Fix the default __sizeof__ implementation for variable-sized
- objects.
+- Issue #24583: Fix crash when set is mutated while being updated.
-- Issue #24044: Fix possible null pointer dereference in list.sort in out of
- memory conditions.
+- Issue #24407: Fix crash when dict is mutated while being updated.
-- Issue #21354: PyCFunction_New function is exposed by python DLL again.
+- Issue #24619: New approach for tokenizing async/await. As a consequence,
+ is is now possible to have one-line 'async def foo(): await ..' functions.
+
+- Issue #24687: Plug refleak on SyntaxError in function parameters
+ annotations.
Library
-------