From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1639618-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 942EC158004
	for <garchives@archives.gentoo.org>; Fri,  7 Jun 2024 01:59:38 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5182E2BC025;
	Fri,  7 Jun 2024 01:59:37 +0000 (UTC)
Received: from smtp.gentoo.org (dev.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 36BD02BC022
	for <gentoo-commits@lists.gentoo.org>; Fri,  7 Jun 2024 01:59:37 +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 77EFB340C20
	for <gentoo-commits@lists.gentoo.org>; Fri,  7 Jun 2024 01:59:36 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A34271C7F
	for <gentoo-commits@lists.gentoo.org>; Fri,  7 Jun 2024 01:59:33 +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: <1717724575.1409fac3c37f5f47fa9f437919d303e4544d45ca.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/stripe/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/stripe/Manifest dev-python/stripe/stripe-9.10.0.ebuild
X-VCS-Directories: dev-python/stripe/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 1409fac3c37f5f47fa9f437919d303e4544d45ca
X-VCS-Branch: master
Date: Fri,  7 Jun 2024 01:59:33 +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: fbc5b3bb-2cd0-4686-954e-0d69233ba6e8
X-Archives-Hash: 7c72eb14e028edae147967a68293f029

commit:     1409fac3c37f5f47fa9f437919d303e4544d45ca
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  7 01:42:55 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun  7 01:42:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1409fac3

dev-python/stripe: Bump to 9.10.0

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

 dev-python/stripe/Manifest             |  1 +
 dev-python/stripe/stripe-9.10.0.ebuild | 88 ++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+)

diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index 4ce74d43c3ee..d80a4d3cfaf0 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -1,3 +1,4 @@
+DIST stripe-9.10.0.tar.gz 1273670 BLAKE2B ebe42096846a124dea93744b26103dfc0a82f51191be612962258d7ab8c903e3da707dad3e35bafaa7431dd65a08234d9df5f9a614ff1959d86dc2d992ae7ad0 SHA512 f2a22534703add04512fa5ee124bd0ac48dd8a69dd19438260e9fce2cd00b659b9b014f76e325b6b0e51c79c157d15acb775d4ee4e1401a837d7e7dd81e81191
 DIST stripe-9.7.0.tar.gz 1268225 BLAKE2B 2ae512fa7f24966166e2d64a8e4e9f23077d0d0318c6f85e4b922b59fbf66e7bf884567d86270c96911a82b51ecfd72312dfd42d335801e9dd40a1912150e8f0 SHA512 5c36ca6447f5d4947b0e069fe5d4fa30ce2cf11768efa8abb70fcc9a69bd104fe085707a463d566abb5417f9dd4b6cb1d3bab132d20616267931fd895544236e
 DIST stripe-9.8.0.tar.gz 1268721 BLAKE2B 12eeb333a51e71f39c366dda1a4bf82c15f7c3673fc4d27c0e25b978a19902b722d44d5b0f17c017638740cb95f353a024f5012ad70b13c0ac7f7b420df4b082 SHA512 3b19ba9709818af12ba2110b32232c9a33f3a43ce33dfeb8a1e0a7c8a2d643f96795ef474ccdef9e780c1ab58bfa3e687105311cc1d5d24c2984d442d539706b
 DIST stripe-9.9.0.tar.gz 1272880 BLAKE2B 222cc85453d6ed184c7b945d55ca2d35fb5327b3005c04b97d57ab14d44174394f4c7a03d8ed699297cd1b8a7d2e38a1265e66efe07a6c71abefcea7b36df2cc SHA512 49c783e4365e2cc04fbeef66e2678e5e596899cbc90b1edc2192cc7aac6590a138a7315bb2e0f5f504f6a81b7bc3dd8ee7dfb9777d7780d9944b129b0b8e0d2d

diff --git a/dev-python/stripe/stripe-9.10.0.ebuild b/dev-python/stripe/stripe-9.10.0.ebuild
new file mode 100644
index 000000000000..3bf97ad94c6e
--- /dev/null
+++ b/dev-python/stripe/stripe-9.10.0.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Stripe python bindings"
+HOMEPAGE="
+	https://github.com/stripe/stripe-python/
+	https://pypi.org/project/stripe/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="telemetry"
+
+RDEPEND="
+	>=dev-python/requests-2.20[${PYTHON_USEDEP}]
+	>=dev-python/typing-extensions-4.5.0[${PYTHON_USEDEP}]
+"
+# please bump dev-util/stripe-mock dep to the latest version on every bump
+BDEPEND="
+	test? (
+		>=dev-util/stripe-mock-0.186.0
+		dev-python/aiohttp[${PYTHON_USEDEP}]
+		dev-python/anyio[${PYTHON_USEDEP}]
+		dev-python/httpx[${PYTHON_USEDEP}]
+		dev-python/pytest-mock[${PYTHON_USEDEP}]
+		dev-python/trio[${PYTHON_USEDEP}]
+		net-misc/curl
+	)
+"
+
+distutils_enable_tests pytest
+
+DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md )
+
+src_prepare() {
+	if ! use telemetry; then
+		sed -i -e '/enable_telemetry/s:True:False:' stripe/__init__.py || die
+	fi
+	# https://github.com/stripe/stripe-python/pull/1297
+	sed -e 's:from mock:from unittest.mock:' \
+		-i tests/test_http_client.py || die
+	distutils-r1_src_prepare
+}
+
+python_test() {
+	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+	epytest tests -p anyio -p pytest_mock
+}
+
+src_test() {
+	local stripe_mock_port=12111
+	local stripe_mock_max_port=12121
+	local stripe_mock_logfile="${T}/stripe_mock_${EPYTHON}.log"
+	# Try to start stripe-mock until we find a free port
+	while [[ ${stripe_mock_port} -le ${stripe_mock_max_port} ]]; do
+		ebegin "Trying to start stripe-mock on port ${stripe_mock_port}"
+		stripe-mock --http-port "${stripe_mock_port}" &> "${stripe_mock_logfile}" &
+		local stripe_mock_pid=${!}
+		sleep 2
+		# Did stripe-mock start?
+		curl --fail -u "sk_test_123:" \
+			"http://127.0.0.1:${stripe_mock_port}/v1/customers" &> /dev/null
+		eend ${?} "Port ${stripe_mock_port} unavailable"
+		if [[ ${?} -eq 0 ]]; then
+			einfo "stripe-mock running on port ${stripe_mock_port}"
+			break
+		fi
+		(( stripe_mock_port++ ))
+	done
+	if [[ ${stripe_mock_port} -gt ${stripe_mock_max_port} ]]; then
+		eerror "Unable to start stripe-mock for tests"
+		die "Please see the logfile located at: ${stripe_mock_logfile}"
+	fi
+
+	local -x STRIPE_MOCK_PORT=${stripe_mock_port}
+	distutils-r1_src_test
+
+	# Tear down stripe-mock
+	kill "${stripe_mock_pid}" || die "Unable to stop stripe-mock"
+}