Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/imapclient/files/, dev-python/imapclient/
Date: Sat, 10 Aug 2019 07:26:21
Message-Id: 1565421971.6c05177a0f18ae1f2468ac9e993a9c6bfb950cf6.mgorny@gentoo
1 commit: 6c05177a0f18ae1f2468ac9e993a9c6bfb950cf6
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 10 07:22:07 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 10 07:26:11 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c05177a
7
8 dev-python/imapclient: Bump to 2.1.0
9
10 Closes: https://bugs.gentoo.org/571310
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 dev-python/imapclient/Manifest | 1 +
14 .../files/imapclient-2.1.0-py36-tests.patch | 28 ++++++++++++++
15 dev-python/imapclient/imapclient-2.1.0.ebuild | 44 ++++++++++++++++++++++
16 3 files changed, 73 insertions(+)
17
18 diff --git a/dev-python/imapclient/Manifest b/dev-python/imapclient/Manifest
19 index 38d18b9e8f3..a41559c4199 100644
20 --- a/dev-python/imapclient/Manifest
21 +++ b/dev-python/imapclient/Manifest
22 @@ -1 +1,2 @@
23 DIST IMAPClient-0.13.tar.gz 102427 BLAKE2B f087b6e89c45810f359bed889345e6748ebf9ae90f6e3c4e013097a4e57d3f5ab0ec21906cfdccc03a344d92ccc442d58e38e687cd0761d86956047e89fedb03 SHA512 daebaf7f4180b6c9c6f4a486b313abfdd06f3ed8ece18a19bf46a50e56c2094e85de8a8e4efb8850566378eba016c10816611d03852caf637ee1d43f3c8a418f
24 +DIST imapclient-2.1.0.tar.gz 85925 BLAKE2B 9725be7988c4bec105fda73389241e39e6c006bccd8130125b280041d13becd6a71a1832763171daf25dfb4e7b4a7fc86c0a3afa93216c3dc4370b19348c0a5e SHA512 57e5824504f2667cf41ac4983130e16a5ea73ea37f29cdb16295eb725b56eda55db26a12e380acb579ef6b8540d38ae6badac5dd5b644d4419cbe9151f634e70
25
26 diff --git a/dev-python/imapclient/files/imapclient-2.1.0-py36-tests.patch b/dev-python/imapclient/files/imapclient-2.1.0-py36-tests.patch
27 new file mode 100644
28 index 00000000000..d9a429a2767
29 --- /dev/null
30 +++ b/dev-python/imapclient/files/imapclient-2.1.0-py36-tests.patch
31 @@ -0,0 +1,28 @@
32 +From 26fb9c9794ad0b2541320d71d5704fce5642a53c Mon Sep 17 00:00:00 2001
33 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
34 +Date: Sat, 10 Aug 2019 09:15:37 +0200
35 +Subject: [PATCH] test_imapclient: Fix LoggerAdapter version check
36 +
37 +The LoggerAdapter behavior change has been backported into Python 3.6.4.
38 +Update the check to expect logger.log() call in 3.6.4+ rather than 3.7+.
39 +
40 +Fixes #383.
41 +---
42 + tests/test_imapclient.py | 4 ++--
43 + 1 file changed, 2 insertions(+), 2 deletions(-)
44 +
45 +diff --git a/tests/test_imapclient.py b/tests/test_imapclient.py
46 +index 91ccfa9..0f12823 100644
47 +--- a/tests/test_imapclient.py
48 ++++ b/tests/test_imapclient.py
49 +@@ -604,8 +604,8 @@ def test_redacted_password(self):
50 + adapter = IMAPlibLoggerAdapter(logger_mock, dict())
51 + if six.PY3:
52 + adapter.info("""> b'ICHH1 LOGIN foo@×××.org "secret"'""")
53 +- if sys.version_info >= (3, 7):
54 +- # LoggerAdapter in Python 3.7+ calls logger.log()
55 ++ if sys.version_info >= (3, 6, 4):
56 ++ # LoggerAdapter in Python 3.6.4+ calls logger.log()
57 + logger_mock.log.assert_called_once_with(
58 + logging.INFO,
59 + "> b'ICHH1 LOGIN **REDACTED**",
60
61 diff --git a/dev-python/imapclient/imapclient-2.1.0.ebuild b/dev-python/imapclient/imapclient-2.1.0.ebuild
62 new file mode 100644
63 index 00000000000..2b5dec6af40
64 --- /dev/null
65 +++ b/dev-python/imapclient/imapclient-2.1.0.ebuild
66 @@ -0,0 +1,44 @@
67 +# Copyright 1999-2019 Gentoo Authors
68 +# Distributed under the terms of the GNU General Public License v2
69 +
70 +EAPI=7
71 +
72 +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} pypy )
73 +
74 +inherit distutils-r1
75 +
76 +DESCRIPTION="easy-to-use, pythonic, and complete IMAP client library"
77 +HOMEPAGE="https://github.com/mjs/imapclient"
78 +SRC_URI="https://github.com/mjs/imapclient/archive/${PV}.tar.gz -> ${P}.tar.gz"
79 +
80 +LICENSE="BSD"
81 +SLOT="0"
82 +KEYWORDS="~amd64 ~x86"
83 +IUSE="doc examples test"
84 +
85 +RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
86 +DEPEND="${RDEPEND}
87 + dev-python/setuptools[${PYTHON_USEDEP}]
88 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
89 + test? ( $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' -2) )"
90 +
91 +PATCHES=(
92 + # fix incorrect assumption about py3.6 behavior
93 + # https://github.com/mjs/imapclient/pull/384
94 + "${FILESDIR}"/imapclient-2.1.0-py36-tests.patch
95 +)
96 +
97 +python_compile_all () {
98 + use doc && esetup.py build_sphinx
99 +}
100 +
101 +python_test() {
102 + esetup.py test
103 +}
104 +
105 +python_install_all() {
106 + local DOCS=( AUTHORS.rst NEWS.rst README.rst )
107 + use doc && local HTML_DOCS=( doc/html/. )
108 + distutils-r1_python_install_all
109 + use examples && dodoc -r examples
110 +}