Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-IMAPClient for
openSUSE:Factory checked in at 2022-08-02 22:10:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-IMAPClient (Old)
and /work/SRC/openSUSE:Factory/.python-IMAPClient.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-IMAPClient"
Tue Aug 2 22:10:00 2022 rev:5 rq:992371 version:2.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-IMAPClient/python-IMAPClient.changes
2022-03-21 20:13:26.048524207 +0100
+++
/work/SRC/openSUSE:Factory/.python-IMAPClient.new.1533/python-IMAPClient.changes
2022-08-02 22:10:45.162042449 +0200
@@ -1,0 +2,21 @@
+Tue Aug 2 15:54:01 UTC 2022 - Otto Hollmann <[email protected]>
+
+- Update to 2.3.1
+ Changed
+ -------
+ - Use GitHub Actions instead of TravisCI
+ - Improvements to code examples
+ - Run tests with unittest instead of setup.py
+ Added
+ -----
+ - New socket() method which provides access to the underlying network
socket. This is useful for allowing the socket to be polled.
+ - Allow flags and internaldate to be specified for MULTIAPPEND
+ Fixed
+ -----
+ - Default SSL contexts are now created with correct purpose
+ - Fixed undiscoverable tests due to name shadowing
+ - Fixed missing code block directives in documentation
+ - Fixed typo in tox envlist
+ - Fixed formatting in release notes
+
+-------------------------------------------------------------------
Old:
----
2.2.0.tar.gz
New:
----
2.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-IMAPClient.spec ++++++
--- /var/tmp/diff_new_pack.V5Mkqi/_old 2022-08-02 22:10:45.566043614 +0200
+++ /var/tmp/diff_new_pack.V5Mkqi/_new 2022-08-02 22:10:45.566043614 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-IMAPClient
-Version: 2.2.0
+Version: 2.3.1
Release: 0
Summary: Pythonic IMAP client library
License: BSD-3-Clause
++++++ 2.2.0.tar.gz -> 2.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/.github/workflows/main.yml
new/imapclient-2.3.1/.github/workflows/main.yml
--- old/imapclient-2.2.0/.github/workflows/main.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/imapclient-2.3.1/.github/workflows/main.yml 2022-07-09
04:31:58.000000000 +0200
@@ -0,0 +1,37 @@
+name: build
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+ workflow_dispatch:
+jobs:
+ test:
+ runs-on: ubuntu-18.04
+ timeout-minutes: 10
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version:
+ - "2.7"
+ - "3.4"
+ - "3.5"
+ - "3.6"
+ - "3.7"
+ - "3.8"
+ - "3.9"
+ - "pypy2"
+ - "pypy3"
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Print Python version under test
+ run: python --version
+ - name: Install test dependencies
+ run: python -m pip install --editable .[test]
+ - name: Test
+ run: python -m unittest --verbose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/.travis.yml
new/imapclient-2.3.1/.travis.yml
--- old/imapclient-2.2.0/.travis.yml 2021-01-16 11:01:42.000000000 +0100
+++ new/imapclient-2.3.1/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-dist: xenial
-language: python
-
-jobs:
- include:
- - python: "2.7"
- - python: "3.4"
- - python: "3.5"
- - python: "3.6"
- - python: "3.7"
- - python: "3.8"
- - python: "3.9-dev"
- - python: "pypy"
- - python: "pypy3"
-
-install: "python setup.py install"
-script: "python setup.py test"
-notifications:
- email:
- recipients:
- - [email protected]
- on_success: change
- on_failure: always
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/AUTHORS.rst
new/imapclient-2.3.1/AUTHORS.rst
--- old/imapclient-2.2.0/AUTHORS.rst 2021-01-16 11:01:42.000000000 +0100
+++ new/imapclient-2.3.1/AUTHORS.rst 2022-07-09 04:31:58.000000000 +0200
@@ -36,3 +36,8 @@
- Micha?? G??rny
- Fran??ois Deppierraz
- Jasper Spaans
+- Boni Lindsley
+- Tobias K??lling
+- pinoatrome
+- Shoaib Ahmed
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/README.rst
new/imapclient-2.3.1/README.rst
--- old/imapclient-2.2.0/README.rst 2021-01-16 11:01:42.000000000 +0100
+++ new/imapclient-2.3.1/README.rst 2022-07-09 04:31:58.000000000 +0200
@@ -4,32 +4,20 @@
library.
========================= ========================================
-Current version 2.2.0
+Current version 2.3.1
Supported Python versions 2.7, 3.4 - 3.9
License New BSD
Project home https://github.com/mjs/imapclient/
PyPI https://pypi.python.org/pypi/IMAPClient
Documentation https://imapclient.readthedocs.io/
-Mailing list https://groups.io/g/imapclient
+Discussions https://github.com/mjs/imapclient/discussions
+Test Status |build master|
========================= ========================================
-Test Status
-~~~~~~~~~~~
-
-===================== ==============
-``1.x`` unit tests |build 1.x|
-``master`` unit tests |build master|
-===================== ==============
-
-.. |build 1.x| image:: https://travis-ci.org/mjs/imapclient.svg?branch=1.x
- :target: https://travis-ci.org/mjs/imapclient/branches
- :alt: 1.x branch
-
-.. |build master| image::
https://travis-ci.org/mjs/imapclient.svg?branch=master
- :target: https://travis-ci.org/mjs/imapclient/branches
+.. |build master| image::
https://github.com/mjs/imapclient/actions/workflows/main.yml/badge.svg
+ :target: https://github.com/mjs/imapclient/actions
:alt: master branch
-
Features
--------
- Arguments and return values are natural Python types.
@@ -108,8 +96,7 @@
Current Status
--------------
-You should feel confident using IMAPClient for production
-purposes. Any problems found will be fixed quickly once reported.
+You should feel confident using IMAPClient for production purposes.
In order to clearly communicate version compatibility, IMAPClient
will strictly adhere to the `Semantic Versioning <http://semver.org>`_
@@ -122,26 +109,12 @@
news. Those articles can be found `here
<http://menno.io/tags/imapclient>`_.
-Mailing List
-------------
-The IMAPClient mailing list can be used to ask IMAPClient related
-questions and report bugs. Details of new releases and project changes
-will also be announced there.
-
-The mailing list is hosted at `Groups.io
-<http://groups.io>`_. Interaction via both email and the web is
-supported. To join the list, see the list archives or just find out
-more, visit https://groups.io/g/imapclient. The key details of the
-list are:
-
-* Post: [email protected]
-* Subscribe: [email protected]
-* Unsubscribe: [email protected]
-* Web: https://groups.io/g/imapclient
-* Web archives: https://groups.io/g/imapclient/messages
+Discussions
+-----------
+`Github Discussions`_ can be used to ask questions, propose changes or praise
+the project maintainers :)
-If you're having trouble using the mailing list, please email
[email protected].
+.. _`Github Discussions`: https://github.com/mjs/imapclient/discussions
Working on IMAPClient
---------------------
@@ -192,7 +165,7 @@
folder. It *should* be safe to use with any IMAP account but please
don't run livetest against a truly important IMAP account.
-Please send the output of livetest.py to the mailing list if it fails
+Please include the output of livetest.py with an issue if it fails
to run successfully against a particular IMAP server. Reports of
successful runs are also welcome. Please include the type and version
of the IMAP server, if known.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/doc/src/contributing.rst
new/imapclient-2.3.1/doc/src/contributing.rst
--- old/imapclient-2.2.0/doc/src/contributing.rst 2021-01-16
11:01:42.000000000 +0100
+++ new/imapclient-2.3.1/doc/src/contributing.rst 2022-07-09
04:31:58.000000000 +0200
@@ -6,8 +6,8 @@
official repository on Github, make changes in a branch in your
personal fork and then submit a pull request.
-Discussion on the mailing list before undertaking development is
-highly encouraged for potentially major changes.
+Discussion `on Github`_ before undertaking development is highly
+encouraged for potentially major changes.
Although not essential, it will make the project maintainers much
happier if change submissions include appropriate updates to unit
@@ -16,6 +16,8 @@
Please read on if you plan on submitting changes to IMAPClient.
+.. _`on Github`: https://github.com/mjs/imapclient/discussions
+
Source Code
===========
The official source code repository for IMAPClient can be found on
@@ -45,14 +47,14 @@
------------------
To run the tests, from the root of the package source run::
- python setup.py test
+ python -m unittest --verbose
Testing Against Multiple Python Versions
----------------------------------------
-When submitting a Pull Request to IMAPClient, tests are automatically ran
+When submitting a Pull Request to IMAPClient, tests are automatically run
against all the supported Python versions.
-It is possible to locally run these tests using `tox`_. Once
+It is possible to run these tests locally using `tox`_. Once
installed, the ``tox`` command will use the tox.ini file in the root
of the project source and run the unit tests against the Python
versions officially supported by IMAPClient (provided these versions
@@ -60,6 +62,18 @@
.. _`tox`: http://testrun.org/tox/
+To avoid having to install all Python versions directly on a host, the
+``tox-all`` script can be used. It will run the unit tests inside a Docker
+container which contains all supported Python versions. As long as Docker is
+installed and your user account can sudo to root the following should work::
+
+ ./tox-all
+
+The script passes any arguments on to tox. For example to run just the tests
+just against Python 3.7 do::
+
+ ./tox-all -e py37
+
Writing Unit Tests
------------------
Protocol level unit tests should not act against a real IMAP server
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/doc/src/index.rst
new/imapclient-2.3.1/doc/src/index.rst
--- old/imapclient-2.2.0/doc/src/index.rst 2021-01-16 11:01:42.000000000
+0100
+++ new/imapclient-2.3.1/doc/src/index.rst 2022-07-09 04:31:58.000000000
+0200
@@ -10,7 +10,7 @@
:Source code: https://github.com/mjs/imapclient
:Documentation: http://imapclient.readthedocs.io/
:License: `New BSD License <http://en.wikipedia.org/wiki/BSD_licenses>`_
-:Support: `Mailing List <https://groups.io/g/imapclient>`_
+:Forum/Support: https://github.com/mjs/imapclient/discussions
Introduction
------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/doc/src/releases.rst
new/imapclient-2.3.1/doc/src/releases.rst
--- old/imapclient-2.2.0/doc/src/releases.rst 2021-01-16 11:01:42.000000000
+0100
+++ new/imapclient-2.3.1/doc/src/releases.rst 2022-07-09 04:31:58.000000000
+0200
@@ -1,17 +1,48 @@
:tocdepth: 1
===============
+ Version 2.3.0
+===============
+
+**Note**: This will be the last release to support Python 2.
+
+Many thanks to Boni Lindsley for many of the changes in this release. Changes
+below are by them unless otherwise specified.
+
+Changed
+-------
+- Use GitHub Actions instead of TravisCI
+- Improvements to code examples (thanks shoaib30)
+- Run tests with unittest instead of setup.py
+
+Added
+-----
+- New ``socket()`` method which provides access to the underlying network
+ socket. This is useful for allowing the socket to be polled.
+- Allow flags and internaldate to be specified for MULTIAPPEND (thanks Tobias
K??lling)
+
+Fixed
+-----
+- Default SSL contexts are now created with correct purpose (thanks pinoatrome)
+- Fixed undiscoverable tests due to name shadowing
+- Fixed missing code block directives in documentation
+- Fixed typo in tox envlist
+- Fixed formatting in release notes
+
+===============
Version 2.2.0
===============
Changed
-------
- Performance improvements (thanks Carson Ip!)
+
- 2x faster _maybe_int_to_bytes for Python 2 (#375)
- Fix _proc_folder_list quadratic runtime (#374)
- Faster utf7 encode (#373). ~40% faster for input with a mix of unicode and
ASCII chars.
- Cache regex in _process_select_response
+
- poll() when available to surpass 1024 file descriptor limit with select()
(#377) (thanks Jonny Hatch)
- Use next instead of six.next as imapclient doesn't claim Python 2.5 support.
(#396) (thanks Jasper Spaans)
- Moved "Logged in/out" traces from INFO to DEBUG level (thanks Fabio
Manganiello)
@@ -354,26 +385,26 @@
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__
+- 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__
==============
Version 0.13
@@ -410,10 +441,10 @@
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)
+- 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)
==============
Version 0.12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/examples/example.py
new/imapclient-2.3.1/examples/example.py
--- old/imapclient-2.2.0/examples/example.py 2021-01-16 11:01:42.000000000
+0100
+++ new/imapclient-2.3.1/examples/example.py 2022-07-09 04:31:58.000000000
+0200
@@ -1,3 +1,6 @@
+# List number of messages in INBOX folder
+# and print details of the messages that are not deleted
+
from imapclient import IMAPClient
HOST = "imap.host.com"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/examples/idle_selector_example.py
new/imapclient-2.3.1/examples/idle_selector_example.py
--- old/imapclient-2.2.0/examples/idle_selector_example.py 1970-01-01
01:00:00.000000000 +0100
+++ new/imapclient-2.3.1/examples/idle_selector_example.py 2022-07-09
04:31:58.000000000 +0200
@@ -0,0 +1,36 @@
+from datetime import datetime, timedelta
+from selectors import DefaultSelector, EVENT_READ
+
+from imapclient import IMAPClient
+
+HOST = "localhost"
+USERNAME = "user"
+PASSWORD = "Tr0ub4dor&3"
+RESPONSE_TIMEOUT_SECONDS = 15
+IDLE_SECONDS = 60 * 24
+
+with IMAPClient(HOST, timeout=RESPONSE_TIMEOUT_SECONDS) as server:
+ server.login(USERNAME, PASSWORD)
+ server.select_folder("INBOX", readonly=True)
+ server.idle()
+ print(
+ "Connection is now in IDLE mode,"
+ " send yourself an email or quit with ^c"
+ )
+ try:
+ with DefaultSelector() as selector:
+ selector.register(server.socket(), EVENT_READ, None)
+ now = datetime.now
+ end_at = now() + timedelta(seconds=IDLE_SECONDS)
+ while selector.select((end_at - now()).total_seconds()):
+ responses = server.idle_check(timeout=0)
+ if not responses:
+ raise ConnectionError(
+ "Socket readable without data. Likely closed."
+ )
+ print("Server sent:", responses)
+ print("IDLE time out.")
+ except KeyboardInterrupt:
+ print("") # Newline after the typically echoed ^C.
+ server.idle_done()
+ print("IDLE mode done")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/imapclient/imapclient.py
new/imapclient-2.3.1/imapclient/imapclient.py
--- old/imapclient-2.2.0/imapclient/imapclient.py 2021-01-16
11:01:42.000000000 +0100
+++ new/imapclient-2.3.1/imapclient/imapclient.py 2022-07-09
04:31:58.000000000 +0200
@@ -11,6 +11,7 @@
import socket
import sys
import re
+import warnings
from collections import namedtuple
from datetime import datetime, date
from operator import itemgetter
@@ -329,10 +330,26 @@
def _set_read_timeout(self):
if self._timeout is not None:
- self._sock.settimeout(self._timeout.read)
+ self.socket().settimeout(self._timeout.read)
@property
def _sock(self):
+ warnings.warn("_sock is deprecated. Use socket().", DeprecationWarning)
+ return self.socket()
+
+ def socket(self):
+ """Returns socket used to connect to server.
+
+ The socket is provided for polling purposes only.
+ It can be used in,
+ for example, :py:meth:`selectors.BaseSelector.register`
+ and :py:meth:`asyncio.loop.add_reader` to wait for data.
+
+ .. WARNING::
+ All other uses of the returned socket are unsupported.
+ This includes reading from and writing to the socket,
+ as they are likely to break internal bookkeeping of messages.
+ """
# In py2, imaplib has sslobj (for SSL connections), and sock for
non-SSL.
# In the py3 version it's just sock.
return getattr(self._imap, "sslobj", self._imap.sock)
@@ -448,13 +465,13 @@
zero-length challenge.)
For example, PLAIN has just one step with empty challenge, so a handler
- might look like this:
+ might look like this::
plain_mech = lambda _: "\\0%s\\0%s" % (username, password)
imap.sasl_login("PLAIN", plain_mech)
- A more complex but still stateless handler might look like this:
+ A more complex but still stateless handler might look like this::
def example_mech(challenge):
if challenge == b"Username:"
@@ -466,7 +483,7 @@
imap.sasl_login("EXAMPLE", example_mech)
- A stateful handler might look like this:
+ A stateful handler might look like this::
class ScramSha256SaslMechanism():
def __init__(self, username, password):
@@ -919,7 +936,7 @@
(1, b'EXISTS'),
(1, b'FETCH', (b'FLAGS', (b'\\NotJunk',)))]
"""
- sock = self._sock
+ sock = self.socket()
# make the socket non-blocking so the timeout can be
# implemented for this call
@@ -1066,7 +1083,7 @@
To support complex search expressions, criteria lists can be
nested. IMAPClient will insert parentheses in the right
places. The following will match messages that are both not
- flagged and do not have "foo" in the subject:
+ flagged and do not have "foo" in the subject::
['NOT', ['SUBJECT', 'foo', 'FLAGGED']]
@@ -1407,12 +1424,26 @@
def multiappend(self, folder, msgs):
"""Append messages to *folder* using the MULTIAPPEND feature from
:rfc:`3502`.
- *msgs* should be a list of strings containing the full message
including
- headers.
+ *msgs* must be an iterable. Each item must be either a string
containing the
+ full message including headers, or a dict containing the keys "msg"
with the
+ full message as before, "flags" with a sequence of message flags to
set, and
+ "date" with a datetime instance specifying the internal date to set.
+ The keys "flags" and "date" are optional.
Returns the APPEND response from the server.
"""
- msgs = [_literal(to_bytes(m)) for m in msgs]
+ def chunks():
+ for m in msgs:
+ if isinstance(m, dict):
+ if "flags" in m:
+ yield to_bytes(seq_to_parenstr(m["flags"]))
+ if "date" in m:
+ yield to_bytes('"%s"' %
datetime_to_INTERNALDATE(m["date"]))
+ yield _literal(to_bytes(m["msg"]))
+ else:
+ yield _literal(to_bytes(m))
+
+ msgs = list(chunks())
return self._raw_command(
b"APPEND",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/imapclient/tls.py
new/imapclient-2.3.1/imapclient/tls.py
--- old/imapclient-2.2.0/imapclient/tls.py 2021-01-16 11:01:42.000000000
+0100
+++ new/imapclient-2.3.1/imapclient/tls.py 2022-07-09 04:31:58.000000000
+0200
@@ -27,7 +27,7 @@
return ssl.wrap_socket(sock)
if ssl_context is None:
- ssl_context = ssl.create_default_context()
+ ssl_context =
ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH)
return ssl_context.wrap_socket(sock, server_hostname=host)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/imapclient/version.py
new/imapclient-2.3.1/imapclient/version.py
--- old/imapclient-2.2.0/imapclient/version.py 2021-01-16 11:01:42.000000000
+0100
+++ new/imapclient-2.3.1/imapclient/version.py 2022-07-09 04:31:58.000000000
+0200
@@ -1,10 +1,10 @@
-# Copyright (c) 2018, Menno Smits
+# Copyright (c) 2022, Menno Smits
# Released subject to the New BSD License
# Please see http://en.wikipedia.org/wiki/BSD_licenses
from __future__ import unicode_literals
-version_info = (2, 2, 0, "final")
+version_info = (2, 3, 1, "final")
def _imapclient_version_string(vinfo):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/setup.py
new/imapclient-2.3.1/setup.py
--- old/imapclient-2.2.0/setup.py 2021-01-16 11:01:42.000000000 +0100
+++ new/imapclient-2.3.1/setup.py 2022-07-09 04:31:58.000000000 +0200
@@ -33,7 +33,7 @@
* Convenience methods are provided for commonly used functionality.
* Exceptions are raised when errors occur.
-Python versions 2.7 and 3.4 through 3.7 are officially supported.
+Python versions 2.7 and 3.4 through 3.9 are officially supported.
IMAPClient includes comprehensive units tests and automated
functional tests that can be run against a live IMAP server.
@@ -54,8 +54,7 @@
author_email=info["author_email"],
license="http://en.wikipedia.org/wiki/BSD_licenses",
url="https://github.com/mjs/imapclient/",
- download_url="http://menno.io/projects/IMAPClient/IMAPClient-%s.zip"
- % info["version"],
+ download_url="http://menno.io/projects/IMAPClient/IMAPClient-%s.zip" %
info["version"],
packages=["imapclient"],
package_data=dict(imapclient=["examples/*.py"]),
install_requires=main_deps,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/tests/test_imapclient.py
new/imapclient-2.3.1/tests/test_imapclient.py
--- old/imapclient-2.2.0/tests/test_imapclient.py 2021-01-16
11:01:42.000000000 +0100
+++ new/imapclient-2.3.1/tests/test_imapclient.py 2022-07-09
04:31:58.000000000 +0200
@@ -7,6 +7,7 @@
import itertools
import socket
import sys
+import warnings
from datetime import datetime
import logging
@@ -378,6 +379,35 @@
b"APPEND", [b'"foobar"', b"msg1", b"msg2"], uid=False
)
+ def test_multiappend_with_flags_and_internaldate(self):
+ self.client._cached_capabilities = (b"MULTIAPPEND",)
+ self.client._raw_command = Mock()
+ self.client.multiappend("foobar", [
+ {
+ "msg": "msg1",
+ "flags": ["FLAG", "WAVE"],
+ "date": datetime(2009, 4, 5, 11, 0, 5, 0, FixedOffset(2 * 60)),
+ },
+ {
+ "msg": "msg2",
+ "flags": ["FLAG", "WAVE"],
+ },
+ {
+ "msg": "msg3",
+ "date": datetime(2009, 4, 5, 11, 0, 5, 0, FixedOffset(2 * 60)),
+ }])
+
+ self.client._raw_command.assert_called_once_with(
+ b"APPEND", [b'"foobar"',
+ b'(FLAG WAVE)',
+ b'"05-Apr-2009 11:00:05 +0200"',
+ _literal(b"msg1"),
+ b'(FLAG WAVE)',
+ _literal(b"msg2"),
+ b'"05-Apr-2009 11:00:05 +0200"',
+ _literal(b"msg3")], uid=False
+ )
+
class TestAclMethods(IMAPClientTest):
def setUp(self):
@@ -585,7 +615,7 @@
@patch("imapclient.imapclient.POLL_SUPPORT", True)
@patch("imapclient.imapclient.select.poll")
- def test_idle_check_blocking(self, mock_poll_module):
+ def test_idle_check_blocking_poll(self, mock_poll_module):
mock_sock = Mock(fileno=Mock(return_value=1))
self.client._imap.sock = self.client._imap.sslobj = mock_sock
@@ -614,7 +644,7 @@
@patch("imapclient.imapclient.POLL_SUPPORT", True)
@patch("imapclient.imapclient.select.poll")
- def test_idle_check_timeout(self, mock_poll_module):
+ def test_idle_check_timeout_poll(self, mock_poll_module):
mock_sock = Mock(fileno=Mock(return_value=1))
self.client._imap.sock = self.client._imap.sslobj = mock_sock
@@ -631,7 +661,7 @@
@patch("imapclient.imapclient.POLL_SUPPORT", True)
@patch("imapclient.imapclient.select.poll")
- def test_idle_check_with_data(self, mock_poll_module):
+ def test_idle_check_with_data_poll(self, mock_poll_module):
mock_sock = Mock(fileno=Mock(return_value=1))
self.client._imap.sock = self.client._imap.sslobj = mock_sock
@@ -975,6 +1005,19 @@
b"tag APPEND {1+}\r\n" b"\xff {5+}\r\n" b"hello\r\n",
)
+ def test_literal_plus_multiple_literals(self):
+ self.client._cached_capabilities = (b"LITERAL+",)
+
+ typ, data = self.client._raw_command(
+ b"APPEND", [b"\xff", _literal(b"hello"), b"TEXT",
_literal(b"test")], uid=False
+ )
+ self.assertEqual(typ, "OK")
+ self.assertEqual(data, ["done"])
+ self.assertEqual(
+ self.client._imap.sent,
+ b"tag APPEND {1+}\r\n" b"\xff {5+}\r\n" b"hello" b" TEXT
{4+}\r\n" b"test\r\n",
+ )
+
def test_complex(self):
self.check(
b"search",
@@ -1055,3 +1098,12 @@
with self.assertRaises(ProtocolError):
client._consume_until_tagged_response(sentinel.tag, b"IDLE")
+
+class TestSocket(IMAPClientTest):
+ def test_issues_warning_for_deprecating_sock_property(self):
+ mock_sock = Mock()
+ self.client._imap.sock = self.client._imap.sslobj = mock_sock
+ with warnings.catch_warnings(record=True) as warnings_caught:
+ warnings.simplefilter("always", DeprecationWarning)
+ assert self.client._sock == self.client.socket()
+ assert len(warnings_caught) == 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/tox-all new/imapclient-2.3.1/tox-all
--- old/imapclient-2.2.0/tox-all 1970-01-01 01:00:00.000000000 +0100
+++ new/imapclient-2.3.1/tox-all 2022-07-09 04:31:58.000000000 +0200
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+sudo docker run -v $(pwd):/mnt --rm -it docker.io/fkrull/multi-python:bionic
bash -c "cd /mnt; tox $*"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/imapclient-2.2.0/tox.ini new/imapclient-2.3.1/tox.ini
--- old/imapclient-2.2.0/tox.ini 2021-01-16 11:01:42.000000000 +0100
+++ new/imapclient-2.3.1/tox.ini 2022-07-09 04:31:58.000000000 +0200
@@ -1,12 +1,21 @@
[tox]
-envlist=py27,py34,py35,py36,py37,py38,p39
-
-# The tests are currently run directly out of the source tree.
-# See the notes in build-sdist for more details.
-skipsdist=true
+envlist=py27,py34,py35,py36,py37,py38,py39
+requires=sphinx
[testenv]
-commands=python setup.py test
+commands=python -m unittest
+
+[testenv:py27]
+setenv=
+ VIRTUALENV_PIP=19.0.1
+ VIRTUALENV_SETUPTOOLS=43.0.0
+deps=mock
+commands=python -m unittest discover
+
+[testenv:py34]
+setenv=
+ VIRTUALENV_PIP=19.0.1
+ VIRTUALENV_SETUPTOOLS=43.0.0
[pep8]
max-line-length=100