dev-python/imapclient: fix Python 3.10+

Closes: https://bugs.gentoo.org/835498
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2022-06-21 06:47:10 +01:00
parent e1e6f0bab3
commit 6d03a3b62f
3 changed files with 45 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST imapclient-2.2.0.gh.tar.gz 89505 BLAKE2B 448e8c736cd80f261c50dd7d6fe88498bf988e475f8135bf7079021d0154904741ab8af28c0ede817ec1bd8c7bd329b1c891c24e37c3466d68287afa02d636c7 SHA512 ace8f55e0f7f4dbb9127b2bbf26cce4c12dce40357cf8127aa6e377321d5156f91f913bd4d4ca57bd5b7f0c86ae5d0b7fdf352b74a6edb7d607f46aa45a144a2
DIST imapclient-2.2.0.tar.gz 89505 BLAKE2B 448e8c736cd80f261c50dd7d6fe88498bf988e475f8135bf7079021d0154904741ab8af28c0ede817ec1bd8c7bd329b1c891c24e37c3466d68287afa02d636c7 SHA512 ace8f55e0f7f4dbb9127b2bbf26cce4c12dce40357cf8127aa6e377321d5156f91f913bd4d4ca57bd5b7f0c86ae5d0b7fdf352b74a6edb7d607f46aa45a144a2

View File

@@ -0,0 +1,13 @@
https://github.com/mjs/imapclient/issues/466
https://bugs.gentoo.org/835498
--- a/imapclient/tls.py
+++ b/imapclient/tls.py
@@ -27,7 +27,7 @@ def wrap_socket(sock, ssl_context, host):
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)

View File

@@ -0,0 +1,31 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1
DESCRIPTION="easy-to-use, pythonic, and complete IMAP client library"
HOMEPAGE="https://github.com/mjs/imapclient"
SRC_URI="https://github.com/mjs/imapclient/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples"
RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
PATCHES=(
"${FILESDIR}"/${PN}-2.2.0-ssl-context.patch
)
distutils_enable_sphinx doc/src
distutils_enable_tests unittest
python_install_all() {
distutils-r1_python_install_all
use examples && dodoc -r examples
}