summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imaplib.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43880: Show DeprecationWarnings for deprecated ssl module features ↵Christian Heimes2021-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-25455) * ssl.OP_NO_SSLv2 * ssl.OP_NO_SSLv3 * ssl.OP_NO_TLSv1 * ssl.OP_NO_TLSv1_1 * ssl.OP_NO_TLSv1_2 * ssl.OP_NO_TLSv1_3 * ssl.PROTOCOL_SSLv2 * ssl.PROTOCOL_SSLv3 * ssl.PROTOCOL_SSLv23 (alias for PROTOCOL_TLS) * ssl.PROTOCOL_TLS * ssl.PROTOCOL_TLSv1 * ssl.PROTOCOL_TLSv1_1 * ssl.PROTOCOL_TLSv1_2 * ssl.TLSVersion.SSLv3 * ssl.TLSVersion.TLSv1 * ssl.TLSVersion.TLSv1_1 * ssl.wrap_socket() * ssl.RAND_pseudo_bytes() * ssl.RAND_egd() (already removed since it's not supported by OpenSSL 1.1.1) * ssl.SSLContext() without a protocol argument * ssl.match_hostname() * hashlib.pbkdf2_hmac() (pure Python implementation, fast OpenSSL function will stay) Signed-off-by: Christian Heimes <christian@python.org>
* bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)Christian Heimes2020-11-201-1/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-40275: Use new test.support helper submodules in tests (GH-21317)Hai Shi2020-07-061-1/+2
|
* bpo-40964: disable remote IMAP tests (GH-20836)Christian Heimes2020-06-121-0/+3
| | | | | | Remote host cyrus.andrew.cmu.edu is blocking incoming connections and is causing test suite to fail. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-26543: Fix IMAP4.noop when debug mode is enabled (GH-15206)Sanyam Khurana2020-06-021-0/+14
|
* bpo-40275: Adding threading_helper submodule in test.support (GH-20263)Hai Shi2020-05-271-20/+21
|
* bpo-40275: Move transient_internet from test.support to socket_helper (GH-19711)Serhiy Storchaka2020-04-291-10/+10
|
* bpo-40275: Move requires_hashdigest() to test.support.hashlib_helper (GH-19716)Hai Shi2020-04-291-5/+5
| | | Add a new test.support.hashlib_helper submodule.
* bpo-40375: Implement imaplib.IMAP4.unselect (GH-19712)Dong-hee Na2020-04-271-0/+25
|
* bpo-40275: Avoid importing socket in test.support (GH-19603)Serhiy Storchaka2020-04-251-3/+4
| | | | | | * Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
* bpo-38615: Add timeout parameter for IMAP4 and IMAP4_SSL constructor (GH-17203)Dong-hee Na2020-01-071-0/+23
| | | | | | | | imaplib.IMAP4 and imaplib.IMAP4_SSL now have an optional *timeout* parameter for their constructors. Also, the imaplib.IMAP4.open() method now has an optional *timeout* parameter with this change. The overridden methods of imaplib.IMAP4_SSL and imaplib.IMAP4_stream were applied to this change.
* bpo-38614: Use default join_thread() timeout in tests (GH-17559)Victor Stinner2019-12-101-1/+1
| | | | | Tests no longer pass a timeout value to join_thread() of test.support: use the default join_thread() timeout instead (SHORT_TIMEOUT constant of test.support).
* bpo-38614: Use test.support.LOOPBACK_TIMEOUT constant (GH-17554)Victor Stinner2019-12-101-1/+1
| | | | | Replace hardcoded timeout constants in tests with LOOPBACK_TIMEOUT of test.support, so it's easier to ajdust this timeout for all tests at once.
* bpo-38270: Check for hash digest algorithms and avoid MD5 (GH-16382)Christian Heimes2019-09-251-1/+5
| | | | | | | | | | | Make it easier to run and test Python on systems with restrict crypto policies: * add requires_hashdigest to test.support to check if a hash digest algorithm is available and working * avoid MD5 in test_hmac * replace MD5 with SHA256 in test_tarfile * mark network tests that require MD5 for MD5-based digest auth or CRAM-MD5 https://bugs.python.org/issue38270
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-011-1/+0
|
* bpo-36348: IMAP4.logout() doesn't ignore exc (GH-12411)Victor Stinner2019-04-151-4/+4
| | | | | | | | | | | | The imap.IMAP4.logout() method no longer ignores silently arbitrary exceptions. Changes: * The IMAP4.logout() method now expects a "BYE" untagged response, rather than relying on _check_bye() which raises a self.abort() exception. * IMAP4.__exit__() now does nothing if the client already logged out. * Add more debug info if test_logout() tests fail.
* bpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834)Victor Stinner2019-04-151-8/+2
| | | | Fix test_imap4_host_default_value() of test_imaplib: catch also errno.ENETUNREACH error.
* bpo-35505: Skip test_imap4_host_default_value if localhost listens on IMAP ↵Matěj Cepl2019-02-121-0/+10
| | | | | | port (GH-11823) Make test_imap4_host_default_value independent on whether the local IMAP server is running.
* bpo-18540: Fix EAI_NONAME in imaplib.IMAP4*() (GH-8634)Berker Peksag2018-08-071-0/+14
|
* bpo-31399: Let OpenSSL verify hostname and IP address (#3462)Christian Heimes2018-01-271-2/+4
| | | | | | | | | | | | | | | bpo-31399: Let OpenSSL verify hostname and IP The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses. * Remove match_hostname calls * Check for libssl with set1_host, libssl must provide X509_VERIFY_PARAM_set1_host() * Add documentation for OpenSSL 1.0.2 requirement * Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform. * Add hostname_checks_common_name Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31346: Use PROTOCOL_TLS_CLIENT/SERVER (#3058)Christian Heimes2017-09-151-10/+8
| | | | | | Replaces PROTOCOL_TLSv* and PROTOCOL_SSLv23 with PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31234: Add support.join_thread() helper (#3587)Victor Stinner2017-09-141-1/+3
| | | | join_thread() joins a thread but raises an AssertionError if the thread is still alive after timeout seconds.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-4/+1
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-30231: Remove skipped test_imaplib tests (#1419)Victor Stinner2017-06-141-20/+10
| | | | | | | | The public cyrus.andrew.cmu.edu IMAP server (port 993) doesn't accept TLS connection using our self-signed x509 certificate. Remove the two tests which are already skipped. Write a new test_certfile_arg_warn() unit test for the certfile deprecation warning.
* bpo-30175: Skip client cert tests of test_imaplib (#1320)Victor Stinner2017-04-271-0/+6
| | | | | | | | | | | | | * bpo-30175: Skip client cert tests of test_imaplib The IMAP server cyrus.andrew.cmu.edu doesn't accept our randomly generated client x509 certificate anymore. * bpo-30188: Catch EOFError in NetworkedNNTPTests test_nntplib fails randomly with EOFError in NetworkedNNTPTests.setUpClass(). Catch EOFError to skip tests in that case.
* bpo-29919: Remove unused imports found by pyflakes (#137)Victor Stinner2017-03-271-1/+0
| | | Make also minor PEP8 coding style fixes on modified imports.
* Merge 3.5Victor Stinner2017-01-121-1/+1
|\
| * Issue #25591: Fix test_imaplib if ssl missVictor Stinner2017-01-121-1/+1
| |
* | Merge: #25591: improve imap tests.R David Murray2016-12-251-0/+330
|\ \ | |/
| * #25591: improve imap tests.R David Murray2016-12-251-0/+330
| | | | | | | | Patch by Maciej Szulik.
* | Issue #28022: Catch another deprecation warning in imaplibChristian Heimes2016-09-111-2/+4
| |
* | Issue #28022: Deprecate ssl-related arguments in favor of SSLContext.Christian Heimes2016-09-101-3/+3
| | | | | | | | | | | | | | The deprecation include manual creation of SSLSocket and certfile/keyfile (or similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib. ssl.wrap_socket() is not marked as deprecated yet.
* | #21815: violate IMAP RFC to be compatible with, e.g., gmailR David Murray2016-01-021-0/+49
|/ | | | | | | | | | | and others, including imaplib's own behavior. I'm applying this only to 3.6 because there's a potential backward compatibility concern: if there are servers that include ] characters in the 'text' portion of their imap responses, this code change could introduce a new bug. Patch by Lita Cho, reviewed by Jessica McKellar, Berker Peksag, Maciej Szulik, silentghost, and me (I fleshed out the comments with the additional info/concerns.)
* Issue #20220: Merge time zone workaround from 3.4 into 3.5Martin Panter2015-11-161-1/+3
|\
| * Issue #20220: Add DST rules to work around glibc quirkMartin Panter2015-11-161-1/+3
| | | | | | | | This was triggering intermittent failures in unrelated tests.
* | Issue #23779: imaplib raises TypeError if authenticator tries to abort.Robert Collins2015-07-301-0/+20
|\ \ | |/ | | | | Patch from Craig Holmquist.
| * Issue #23779: imaplib raises TypeError if authenticator tries to abort.Robert Collins2015-07-301-0/+19
| | | | | | | | Patch from Craig Holmquist.
* | #21800: Add RFC 6855 support to imaplib.R David Murray2015-05-101-0/+78
| | | | | | | | | | Original patch by Milan Oberkirch, updated by myself and Maciej Szulik.
* | merge 3.4 (#22921)Benjamin Peterson2014-11-231-4/+0
|\ \ | |/
| * don't require OpenSSL SNI to pass hostname to ssl functions (#22921)Benjamin Peterson2014-11-231-4/+0
| | | | | | | | Patch by Donald Stufft.
* | imaplib.IMAP4 now supports the context manager protocol.Serhiy Storchaka2014-09-091-0/+35
| | | | | | | | Original patch by Tarek Ziadé.
* | Issue #22111: Assorted cleanups in test_imaplib. Patch by Milan Oberkirch.Antoine Pitrou2014-07-311-65/+51
|/
* Issue #18492: Allow all resources when tests are not run by regrtest.py.Zachary Ware2014-06-021-1/+0
| | | | This changeset also includes cleanup allowed by this behavior change.
* test_imaplib: skip check_hostname test when SNI is not availableChristian Heimes2013-12-151-0/+4
|
* Issue #19857: Make sure that test_imaplib reaps server threads even in face ofCharles-François Natali2013-12-071-7/+6
| | | | error upon client disconnection.
* Issue #19782: imaplib now supports SSLContext.check_hostname and server nameChristian Heimes2013-12-021-2/+26
| | | | indication for TLS/SSL connections.
* merge with 3.3Georg Brandl2013-10-271-0/+11
|\
| * Issue #16039: CVE-2013-1752: Change use of readline in imaplib module to limitGeorg Brandl2013-10-271-0/+11
| | | | | | | | line length. Patch by Emil Lind.
* | #17333: merge with 3.3.Ezio Melotti2013-03-021-3/+3
|\ \ | |/
| * #17333: test_imaplib now works with unittest test discovery. Patch by ↵Ezio Melotti2013-03-021-3/+3
| | | | | | | | Zachary Ware.