From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1448273-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 2DF61158021
	for <garchives@archives.gentoo.org>; Wed, 19 Oct 2022 03:49:31 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7B6D4E08D3;
	Wed, 19 Oct 2022 03:49:30 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 65BF3E08D3
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Oct 2022 03:49:30 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id ABC31340DBF
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Oct 2022 03:49:29 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 18971629
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Oct 2022 03:49:27 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1666151362.9f3e3dfe68b30a44db4c937a40eeb74c6e85ad02.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pymongo/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/pymongo/Manifest dev-python/pymongo/pymongo-4.3.2.ebuild
X-VCS-Directories: dev-python/pymongo/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 9f3e3dfe68b30a44db4c937a40eeb74c6e85ad02
X-VCS-Branch: master
Date: Wed, 19 Oct 2022 03:49:27 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 004aad27-033a-434a-82c9-43534c78ac2f
X-Archives-Hash: e29b53df7382172e7217fcc41de78f79

commit:     9f3e3dfe68b30a44db4c937a40eeb74c6e85ad02
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 03:08:27 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 03:49:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f3e3dfe

dev-python/pymongo: Bump to 4.3.2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pymongo/Manifest             |   1 +
 dev-python/pymongo/pymongo-4.3.2.ebuild | 122 ++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+)

diff --git a/dev-python/pymongo/Manifest b/dev-python/pymongo/Manifest
index 3133431084a1..584fc15e7469 100644
--- a/dev-python/pymongo/Manifest
+++ b/dev-python/pymongo/Manifest
@@ -1,2 +1,3 @@
 DIST mongo-python-driver-4.1.1.tar.gz 1070349 BLAKE2B 9b792343a22c4b0c625376e6f3d10e9c1a88442b63ff2638c29588a26755006507189bf40a8dad96d7f8e4f997efc153c8616826b58114aba32442c05b80ca60 SHA512 b01eb6bc4c39a25cae8350bdc2f37dd5d78da38a6eddbd8a26f91cb6ee067f7b4b1d97eb603defca16e05abc992b8f11b2e3558f9697c99697b3e876838de737
 DIST mongo-python-driver-4.2.0.gh.tar.gz 1136734 BLAKE2B b3e2d86780c2874656f94ba3071317c0b9190418274c163135a260cad3f5672b9390aa738d0cf1aaff47412827620706e67c5c990910a5ea232aaacda0758dea SHA512 4439149c35f897a61109b26f5e4c613682ca59727495377a3bbb49f9ff22273cd5a73f58fb55080d07c9403310d4ada59d3a5969d0f76f2f4d1081422fe2dfec
+DIST mongo-python-driver-4.3.2.gh.tar.gz 1154135 BLAKE2B f2a560dc9829b6b26a78c032a3978fff93935b78aa20a088a080bdd607d951a57434473d698d4cabc1ca0a767cdb75352e0e25d9cfd77389d43062768409625c SHA512 f35dd2fc54e806bb7f91d982f29ebdee8ef12a8629b415b2472e3f99d60ad9e3153cd54e6e7369124c2b31c27df636c2a0fa72f937aeafb60c64c90728d7b03b

diff --git a/dev-python/pymongo/pymongo-4.3.2.ebuild b/dev-python/pymongo/pymongo-4.3.2.ebuild
new file mode 100644
index 000000000000..1f6df3375c8e
--- /dev/null
+++ b/dev-python/pymongo/pymongo-4.3.2.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit check-reqs distutils-r1
+
+MY_P=mongo-python-driver-${PV}
+DESCRIPTION="Python driver for MongoDB"
+HOMEPAGE="
+	https://github.com/mongodb/mongo-python-driver/
+	https://pypi.org/project/pymongo/
+"
+SRC_URI="
+	https://github.com/mongodb/mongo-python-driver/archive/${PV}.tar.gz
+		-> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~hppa ~riscv ~x86"
+IUSE="doc kerberos"
+
+RDEPEND="
+	<dev-python/dnspython-3.0.0[${PYTHON_USEDEP}]
+	kerberos? ( dev-python/pykerberos[${PYTHON_USEDEP}] )
+"
+BDEPEND="
+	test? (
+		>=dev-db/mongodb-2.6.0
+	)
+"
+
+distutils_enable_sphinx doc
+distutils_enable_tests unittest
+
+reqcheck() {
+	if use test; then
+		# During the tests, database size reaches 1.5G.
+		local CHECKREQS_DISK_BUILD=1536M
+
+		check-reqs_${1}
+	fi
+}
+
+pkg_pretend() {
+	reqcheck pkg_pretend
+}
+
+pkg_setup() {
+	reqcheck pkg_setup
+}
+
+src_prepare() {
+	# network-sandbox
+	rm test/test_srv_polling.py || die
+	sed -e 's:test_connection_timeout_ms_propagates_to_DNS_resolver:_&:' \
+		-e 's:test_service_name_from_kwargs:_&:' \
+		-e 's:test_srv_max_hosts_kwarg:_&:' \
+		-i test/test_client.py || die
+	sed -e '/SRV_SCHEME/s:_HAVE_DNSPYTHON:False:' \
+		-i test/test_uri_spec.py || die
+	distutils-r1_src_prepare
+}
+
+python_test() {
+	# Yes, we need TCP/IP for that...
+	local DB_IP=127.0.0.1
+	local DB_PORT=27000
+
+	export DB_IP DB_PORT
+
+	local dbpath=${TMPDIR}/mongo.db
+	local logpath=${TMPDIR}/mongod.log
+
+	# Now, the hard part: we need to find a free port for mongod.
+	# We're just trying to run it random port numbers and check the log
+	# for bind errors. It shall be noted that 'mongod --fork' does not
+	# return failure when it fails to bind.
+
+	mkdir -p "${dbpath}" || die
+	while true; do
+		ebegin "Trying to start mongod on port ${DB_PORT}"
+
+		LC_ALL=C \
+		mongod --dbpath "${dbpath}" --nojournal \
+			--bind_ip ${DB_IP} --port ${DB_PORT} \
+			--unixSocketPrefix "${TMPDIR}" \
+			--logpath "${logpath}" --fork \
+		&& sleep 2
+
+		# Now we need to check if the server actually started...
+		if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then
+			# yay!
+			eend 0
+			break
+		elif grep -q 'Address already in use' "${logpath}"; then
+			# ay, someone took our port!
+			eend 1
+			: $(( DB_PORT += 1 ))
+			continue
+		else
+			eend 1
+			eerror "Unable to start mongod for tests. See the server log:"
+			eerror "	${logpath}"
+			die "Unable to start mongod for tests."
+		fi
+	done
+
+	local failed
+	DB_PORT2=$(( DB_PORT + 1 )) DB_PORT3=$(( DB_PORT + 2 )) esetup.py test || failed=1
+
+	mongod --dbpath "${dbpath}" --shutdown || die
+
+	[[ ${failed} ]] && die "Tests fail with ${EPYTHON}"
+
+	rm -rf "${dbpath}" || die
+}