Imapclient

Latest version: v3.0.1

Safety actively analyzes 630169 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

1.0.1

===============

Changed
-------
- Minimum backports.ssl dependency is now 0.0.9 (an important
performance issue was addressed)
- setuptools 18.8.1 now used due to strange zip file error for 17.1

Fixed
-----
- Unit test for version strings were updated to now always include the
patch version.
- Fresh capabilities now retrieved between STARTTLS and authentication
(195).

===============

1.0.0

===============

Enhanced TLS support [API]
--------------------------
The way that IMAPClient establishes TLS/SSL connections has been
completely reworked. By default IMAPClient will attempt certificate
verification, certificate hostname checking, and will not use
known-insecure TLS settings and protocols. In addition, TLS parameters
are now highly configurable.

By leveraging pyOpenSSL and backports.ssl, all Python versions
supported by IMAPClient enjoy the same TLS functionality and
API.

These packages mean that IMAPClient now has a number of new
dependencies. These should be installed automatically as required but
there will no doubt be complications.

Compatibility breaks:

1. Due to lack of support in some of the dependent libraries,
IMAPClient no longer supports Python 3.2.
2. The passthrough keyword arguments that the IMAPClient constructor
took in past versions are no longer accepted. These were in place
to provide access to imaplib's SSL arguments which are no longer
relevant. Please pass a SSL context object instead.
3. When using the default SSL context that IMAPClient creates
(recommended), certificate verification is enabled. This means that
IMAPClient connections to servers that used to work before,
may fail now (especially if a self-signed certificate is used by
the server). Refer to the documentation for details of how to
supply alternate CA certificates or disable verification.
4. There are some new exceptions that might be raised in response to
network issues or TLS protocol failures. Refer to the
Exceptions_ section of the manual for more details.

Please refer to the "TLS/SSL" section of the manual for more details
on all of the above.

Many thanks to Chris Arndt and Marc-Antoine Parent for their input
into these TLS improvements.

.. _Exceptions: http://imapclient.readthedocs.io/en/latest/#exceptions

STARTTLS support [NEW]
----------------------
When the server supports it, IMAPClient can now establish an encrypted
connection after initially starting with an unencrypted connection
using the STARTTLS command. The starttls method takes an SSL context
object for controlling the parameters of the TLS negotiation.

Many thanks to Chris Arndt for his extensive initial work on this.

More robust criteria handling for search, sort and thread [API]
---------------------------------------------------------------
IMAPClient's methods that accept search criteria (search, sort,
thread, gmail_search) have been changed to provide take criteria in
a more straightforward and robust way. In addition, the way the
*charset* argument interacts with search criteria has been
improved. These changes make it easier to pass search criteria and
have them handled correctly but unfortunately also mean that small
changes may be required to existing code that uses IMAPClient.

Search criteria
~~~~~~~~~~~~~~~
The preferred way to specify criteria now is as a list of strings,
ints and dates (where relevant). The list should be flat with all the
criteria parts run together. Where a criteria takes an argument, just
provide it as the next element in the list.

Some valid examples::

c.search(['DELETED'])
c.search(['NOT', 'DELETED'])
c.search(['FLAGGED', 'SUBJECT', 'foo', 'BODY', 'hello world'])
c.search(['NOT', 'DELETED', 'SMALLER', 1000])
c.search(['SINCE', date(2006, 5, 3)])

IMAPClient will perform all required conversion, quoting and
encoding. Callers do not need to and should not attempt to do this
themselves. IMAPClient will automatically send criteria parts as IMAP
literals when required (i.e. when the encoded part is 8-bit).

Some previously accepted ways of passing search criteria will not work
as they did in previous versions of IMAPClient. Small changes will be
required in these cases. Here are some examples of how to update code
written against older versions of IMAPClient::

c.search(['NOT DELETED']) Before
c.search(['NOT', 'DELETED']) After

c.search(['TEXT "foo"']) Before
c.search(['TEXT', 'foo']) After (IMAPClient will add the quotes)

c.search(['DELETED', 'TEXT "foo"']) Before
c.search(['DELETED', 'TEXT', 'foo']) After

c.search(['SMALLER 1000']) Before
c.search(['SMALLER', 1000]) After

It is also possible to pass a single string as the search
criteria. IMAPClient will not attempt quoting in this case, allowing
the caller to specify search criteria at a lower level. Specifying
criteria using a sequence of strings is preferable however. The
following examples (equivalent to those further above) are valid::

c.search('DELETED')
c.search('NOT DELETED')
c.search('FLAGGED SUBJECT "foo" BODY "hello world"')
c.search('NOT DELETED SMALLER 1000')
c.search('SINCE 03-May-2006')

Search charset
~~~~~~~~~~~~~~
The way that the search *charset* argument is handled has also
changed.

Any unicode criteria arguments will now be encoded by IMAPClient using
the supplied charset. The charset must refer to an encoding that is
capable of handling the criteria's characters or an error will
occur. The charset must obviously also be one that the server
supports! (UTF-8 is common)

Any criteria given as bytes will not be changed by IMAPClient, but the
provided charset will still be passed to the IMAP server. This allows
already encoding criteria to be passed through as-is. The encoding
referred to by *charset* should match the actual encoding used for the
criteria.

The following are valid examples::

c.search(['TEXT', u'\u263a'], 'utf-8') IMAPClient will apply UTF-8 encoding
c.search([b'TEXT', b'\xe2\x98\xba'], 'utf-8') Caller has already applied UTF-8 encoding

The documentation and tests for search, gmail_search, sort and thread
has updated to account for these changes and have also been generally
improved.

Socket timeout support [NEW]
----------------------------
IMAPClient now accepts a timeout at creation time. The timeout applies
while establishing the connection and for all operations on the socket
connected to the IMAP server.

Semantic versioning
-------------------
In order to better indicate version compatibility to users, IMAPClient
will now strictly adhere to the `Semantic Versioning
<http://semver.org>`_ scheme.

Performance optimisation for parsing message id lists
-----------------------------------------------------
A short circuit is now used when parsing a list of message ids which
greatly speeds up parsing time.

Other
-----
- Perform quoting of Gmail labels. Thanks to Pawel Sz for the fix.
- The type of the various flag constants was fixed. Thanks to Thomi
Richards for pointing this out.
- Now using mock 1.3.0. Thanks to Thomi Richards for the patch.
- Fixed handling of very long numeric only folder names. Thanks to
Paweł Gorzelany for the patch.
- The default charset for gmail_search is now UTF-8. This makes it
easier to use any unicode string as a search string and is safe
because Gmail supports UTF-8 search criteria.
- PEP8 compliance fixed (except for some occasional long lines)
- Added a "shutdown" method.
- The embedded six package has been removed in favour of using an
externally installed instance.
- Fixed handling of literals in STATUS responses.
- Only use the untagged post-login CAPABILITY response once (if sent
by server).
- Release history made part of the main documentation.
- Clarified how message ids work in the docs.
- Livetest infrastructure now works with Yahoo's OAUTH2
- Fixed bytes handling in Address.__str__

==============

0.13

Not secure
==============

Added support for the ID command [NEW]
--------------------------------------
As per RFC2971. Thanks to Eben Freeman from Nylas.

Fix exception with NIL address in envelope address list
-------------------------------------------------------
Thanks to Thomas Steinacher for this fix.

Fixed handling of NIL in SEARCH response
----------------------------------------
Fixed a regression in the handling of NIL/None SEARCH
responses. Thanks again to Thomas Steinacher.

Date parsing fixes
------------------
Don't traceback when an unparsable date is seen in ENVELOPE
responses. None is returned instead.

Support quirky timestamp strings which use dots for the time
separator.

Removed horrible INTERNALDATE parsing code (use parse_to_datetime
instead).

datetime_to_imap has been moved to the datetime_util module and is now
called datetime_to_INTERNALDATE. This will only affect you in the
unlikely case that you were importing this function out of the
IMAPClient package.

Other
-----
- The docs for various IMAPClient methods, and the HACKING.rst file
have been updated.
- CONDSTORE live test is now more reliable (especially when running
against Gmail)

==============

0.12

Not secure
==============

Fixed unicode handling [API CHANGE]
-----------------------------------
During the work to support Python 3, IMAPClient was changed to do
return unicode for most responses. This was a bad decision, especially
because it effectively breaks content that uses multiple encodings
(e.g. RFC822 responses). This release includes major changes so that
most responses are returned as bytes (Python 3) or str (Python
2). This means that correct handling of response data is now possible
by code using IMAPClient.

Folder name handling has also been cleaned up as part of this work. If
the ``folder_encode`` attribute is ``True`` (the default) then folder
names will **always** be returned as unicode. If ``folder_encode`` is
False then folder names will always be returned as bytes/strs.

Code using IMAPClient will most likely need to be updated to account
these unicode handling changes.

Many thanks to Inbox (now Nilas, https://nilas.com/) for sponsoring this
work.

Extra __init__ keyword args are passed through [NEW]
----------------------------------------------------
Any unused keyword arguments passed to the IMAPClient initialiser will
now be passed through to the underlying imaplib IMAP4, IMAP4_SSL or
IMAP4_stream class. This is specifically to allow the use of imaplib
features that control certificate validation (if available with the
version of Python being used).

Thanks to Chris Arndt for this change.

MODSEQ parts in SEARCH responses are now handled
------------------------------------------------
If the CONDSTORE extension is supported by a server and a MODSEQ
criteria was used with search(), a TypeError could occur. This has now
been fixed and the MODSEQ value returned by the server is now
available via an attribute on the returned list of ids.

Minor Changes
-------------
* Small tweaks to support Python 3.4.
* The deprecated get_folder_delimiter() method has been removed.
* More control over OAUTH2 parameters. Thanks to Phil Peterson for
this.
* Fixed livetest/interact OAUTH handling under Python 3.

================

0.11.1

================

* Close folders during livetest cleanup so that livetests work with
newer Dovecot servers (131)

==============

0.11

Not secure
==============

Support for raw Gmail searching [NEW]
-------------------------------------
The new gmail_search methods allows direct Gmail queries using the
X-GM-RAW search extension. Thanks to John Louis del Rosario for the
patch.

ENVELOPE FETCH response parsing [NEW, API CHANGE]
-------------------------------------------------
ENVELOPE FETCH responses are now returned as Envelope instances. These
objects are namedtuples providing convenient attribute and positional
based access to envelope fields. The Date field is also now converted
to a datetime instance.

As part of this change various date and time related utilities were
moved to a new module at imapclient.datetime_util.

Thanks to Naveen Nathan for the work on this feature.

Correct nested BODYSTRUCTURE handling [API CHANGE]
--------------------------------------------------
BODY and BODYSTRUCTURE responses are now processed recusively so
multipart sections within other multipart sections are returned
correctly. This also means that each the part of the response now has
a is_multipart property available.

NOTE: code that expects the old (broken) behaviour will need to be
updated.

Thanks to Brandon Rhodes for the bug report.

SELECT response bug fix
-----------------------
Handle square brackets in flags returned in SELECT response.
Previously these would cause parsing errors. Thanks to Benjamin
Morrise for the bug report.

Minor Changes
-------------
Copyright date update for 2014.


================

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.