summaryrefslogtreecommitdiff
path: root/dev-python/braintree
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-10-29 18:39:47 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-10-29 18:39:47 +0000
commit7fda284960fcfca5f80f2dc5ed222926bbc3f76d (patch)
tree17998a79a1a24b6a90a856270b98d1db7f3e3fe8 /dev-python/braintree
parent0af643c74ae7d041ea5e2e66dddc9c69a516e733 (diff)
downloadbaldeagleos-repo-7fda284960fcfca5f80f2dc5ed222926bbc3f76d.tar.gz
baldeagleos-repo-7fda284960fcfca5f80f2dc5ed222926bbc3f76d.tar.xz
baldeagleos-repo-7fda284960fcfca5f80f2dc5ed222926bbc3f76d.zip
Adding metadata
Diffstat (limited to 'dev-python/braintree')
-rw-r--r--dev-python/braintree/Manifest2
-rw-r--r--dev-python/braintree/braintree-4.21.0.ebuild39
-rw-r--r--dev-python/braintree/braintree-4.22.0.ebuild39
-rw-r--r--dev-python/braintree/braintree-4.23.0.ebuild5
-rw-r--r--dev-python/braintree/files/braintree-4.23.0-py312.patch81
5 files changed, 86 insertions, 80 deletions
diff --git a/dev-python/braintree/Manifest b/dev-python/braintree/Manifest
index 2ca6d9a211fa..1d28a3a23c77 100644
--- a/dev-python/braintree/Manifest
+++ b/dev-python/braintree/Manifest
@@ -1,3 +1 @@
-DIST braintree_python-4.21.0.gh.tar.gz 220035 BLAKE2B e8eb8a51fe5b49675abaf20c0cb3cfefa9129609df70bbf2e74aa4f588ea48014278fe2bb1e76841dbcd19fbc87346bc0b4302910237d5cffd839369465f2597 SHA512 409d4d80059f1868b2aa80896b0a082493fe0e1d3c1f76145bf41a1f7c93dc4a3970eb90b9c599584a6a00f3d135f870115daff0fabe9f22dcd1a3c7a16371a5
-DIST braintree_python-4.22.0.gh.tar.gz 220540 BLAKE2B d39214fc06dd03fa6115fd99ba00caddd81b64f797fb335606a7c2bf067751771c62c296277ac38b330bf9c61ba5e6ba9134088586bbb520c8713f419ea89e6f SHA512 f4d67b109afd75271e6dd96fda30a7dd03966c083df90fd1c353f8a9d84e357f6054f9d3f1ca0de7b6183d36b7fe55daa26098a701d250c41d096c7c3fa543fb
DIST braintree_python-4.23.0.gh.tar.gz 220576 BLAKE2B 23d158c0216a63ce7746a521c339663dc4f1fcc355f3cf65d526c19f7b6a29e49da6a8905059a1410bcf0390c7d44bc267963d68e44e5f4ddc0de57b2500c06f SHA512 e5be83985a6605e68317eafa7533e826d3965707e691791a045f1cbeddded718b21d62e5156c402142228742b13de9859e586b4236865ea675c5c57a3410ffb3
diff --git a/dev-python/braintree/braintree-4.21.0.ebuild b/dev-python/braintree/braintree-4.21.0.ebuild
deleted file mode 100644
index aac92f8c4b43..000000000000
--- a/dev-python/braintree/braintree-4.21.0.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2020-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8,9,10,11,12} )
-
-inherit distutils-r1
-
-MY_P=braintree_python-${PV}
-DESCRIPTION="Braintree Python Library"
-HOMEPAGE="
- https://developer.paypal.com/braintree/docs/reference/overview/
- https://github.com/braintree/braintree_python/
- https://pypi.org/project/braintree/
-"
-# no tests in sdist, as of 4.19.0
-SRC_URI="
- https://github.com/braintree/braintree_python/archive/${PV}.tar.gz
- -> ${MY_P}.gh.tar.gz
-"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="
- >=dev-python/requests-0.11.1[${PYTHON_USEDEP}]
-"
-
-DOCS=( README.md )
-
-distutils_enable_tests unittest
-
-python_test() {
- eunittest tests/unit
-}
diff --git a/dev-python/braintree/braintree-4.22.0.ebuild b/dev-python/braintree/braintree-4.22.0.ebuild
deleted file mode 100644
index aac92f8c4b43..000000000000
--- a/dev-python/braintree/braintree-4.22.0.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2020-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8,9,10,11,12} )
-
-inherit distutils-r1
-
-MY_P=braintree_python-${PV}
-DESCRIPTION="Braintree Python Library"
-HOMEPAGE="
- https://developer.paypal.com/braintree/docs/reference/overview/
- https://github.com/braintree/braintree_python/
- https://pypi.org/project/braintree/
-"
-# no tests in sdist, as of 4.19.0
-SRC_URI="
- https://github.com/braintree/braintree_python/archive/${PV}.tar.gz
- -> ${MY_P}.gh.tar.gz
-"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="
- >=dev-python/requests-0.11.1[${PYTHON_USEDEP}]
-"
-
-DOCS=( README.md )
-
-distutils_enable_tests unittest
-
-python_test() {
- eunittest tests/unit
-}
diff --git a/dev-python/braintree/braintree-4.23.0.ebuild b/dev-python/braintree/braintree-4.23.0.ebuild
index aac92f8c4b43..5a833674a94b 100644
--- a/dev-python/braintree/braintree-4.23.0.ebuild
+++ b/dev-python/braintree/braintree-4.23.0.ebuild
@@ -34,6 +34,11 @@ DOCS=( README.md )
distutils_enable_tests unittest
+PATCHES=(
+ # https://github.com/braintree/braintree_python/pull/154
+ "${FILESDIR}/${P}-py312.patch"
+)
+
python_test() {
eunittest tests/unit
}
diff --git a/dev-python/braintree/files/braintree-4.23.0-py312.patch b/dev-python/braintree/files/braintree-4.23.0-py312.patch
new file mode 100644
index 000000000000..4ecbd9e555dd
--- /dev/null
+++ b/dev-python/braintree/files/braintree-4.23.0-py312.patch
@@ -0,0 +1,81 @@
+From 9fbdf874ef6a6874db5e98cb2c93ab9736810d4e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 29 Oct 2023 11:18:56 +0100
+Subject: [PATCH] Fix test suite compatibility with Python 3.12
+
+Replace the deprecated `unittest.TestCase.assertRaisesRegexp()` method
+with `assertRaisesRegex()`. The former is no longer present in Python
+3.12, while the latter is available since Python 3.2.
+
+Replace the deprecated `imp.reload()` function with
+`importlib.reload()`. The former module is no longer present
+in Python 3.12, while `importlib.reload()` is available since
+Python 3.4.
+
+With these changes, unit tests pass with Python 3.12.0.
+
+Fixes #153
+---
+ CHANGELOG.md | 3 +++
+ tests/unit/test_client_token.py | 2 +-
+ tests/unit/test_configuration.py | 6 +++---
+ 3 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/CHANGELOG.md b/CHANGELOG.md
+index 56e4373..792ee9c 100644
+--- a/CHANGELOG.md
++++ b/CHANGELOG.md
+@@ -1,5 +1,8 @@
+ # Changelog
+
++## 4.24.0
++* Fix unittest compatibility with Python 3.12
++
+ ## 4.23.0
+ * Deprecate `evidenceSubmittable` in Dispute
+ * Add missing `escape` calls in `generator` for:
+diff --git a/tests/unit/test_client_token.py b/tests/unit/test_client_token.py
+index 7216a6b..74eb8a2 100644
+--- a/tests/unit/test_client_token.py
++++ b/tests/unit/test_client_token.py
+@@ -3,7 +3,7 @@ from tests.test_helper import *
+ class TestClientToken(unittest.TestCase):
+ def test_credit_card_options_require_customer_id(self):
+ for option in ["verify_card", "make_default", "fail_on_duplicate_payment_method"]:
+- with self.assertRaisesRegexp(InvalidSignatureError, option):
++ with self.assertRaisesRegex(InvalidSignatureError, option):
+ ClientToken.generate({
+ "options": {option: True}
+ })
+diff --git a/tests/unit/test_configuration.py b/tests/unit/test_configuration.py
+index cf82831..5b24540 100644
+--- a/tests/unit/test_configuration.py
++++ b/tests/unit/test_configuration.py
+@@ -1,13 +1,13 @@
+ from tests.test_helper import *
+ import braintree
+ import os
+-import imp
++import importlib
+
+ class TestConfiguration(unittest.TestCase):
+ def test_works_with_unconfigured_configuration(self):
+ try:
+ # reset class level attributes on Configuration set in test helper
+- imp.reload(braintree.configuration)
++ importlib.reload(braintree.configuration)
+ config = Configuration(
+ environment=braintree.Environment.Sandbox,
+ merchant_id='my_merchant_id',
+@@ -21,7 +21,7 @@ class TestConfiguration(unittest.TestCase):
+ finally:
+ # repopulate class level attributes on Configuration
+ import tests.test_helper
+- imp.reload(tests.test_helper)
++ importlib.reload(tests.test_helper)
+
+ def test_base_merchant_path_for_development(self):
+ self.assertEqual("/merchants/integration_merchant_id", Configuration.instantiate().base_merchant_path())
+--
+2.42.0
+