From 90b7a983c0517f2b4d078fb4aa68d9e16afe6d25 Mon Sep 17 00:00:00 2001 From: Danilo Elias Date: Mon, 31 May 2021 13:37:17 -0300 Subject: [PATCH 1/3] Fix SDK installation error * Add `requests` as a required dependency * Increment SDK version to 2.0.7 --- mercadopago/config/config.py | 2 +- setup.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mercadopago/config/config.py b/mercadopago/config/config.py index 472259c..ca7ddd2 100644 --- a/mercadopago/config/config.py +++ b/mercadopago/config/config.py @@ -10,7 +10,7 @@ class Config(): """ def __init__(self): - self.__version = "2.0.6" + self.__version = "2.0.7" self.__user_agent = "MercadoPago Python SDK v" + self.__version self.__product_id = "bc32bpftrpp001u8nhlg" self.__tracking_id = "platform:" + platform.python_version() diff --git a/setup.py b/setup.py index 2ec2046..998dd9f 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name="mercadopago", - version="2.0.6", + version="2.0.7", description="Mercadopago SDK module for Payments integration", author="Mercado Pago SDK", author_email="mp_sdk@mercadopago.com", @@ -19,6 +19,9 @@ include_package_data=True, long_description=open("README.md").read(), long_description_content_type="text/markdown", + install_requires=[ + "requests" + ], tests_require=[ "unittest" ], From 4c09f49386f046787f891af2e7f922a6bd739854 Mon Sep 17 00:00:00 2001 From: Danilo Elias Date: Mon, 31 May 2021 15:00:25 -0300 Subject: [PATCH 2/3] Fix python_requires to only support python 3+ --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 998dd9f..b880006 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ tests_require=[ "unittest" ], - python_requires="!=3.0*", + python_requires=">=3", cmdclass={"test": unittest}, project_urls={ "Source Code": "https://github.com/mercadopago/sdk-python", From 96acf7b3fd9b75d6fa0a6ae914da13bf228242bf Mon Sep 17 00:00:00 2001 From: Danilo Elias Date: Mon, 31 May 2021 15:22:17 -0300 Subject: [PATCH 3/3] Fix card tests --- tests/test_card.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_card.py b/tests/test_card.py index 752fe75..607c9fc 100644 --- a/tests/test_card.py +++ b/tests/test_card.py @@ -41,7 +41,7 @@ def test_all(self): } card_created = self.sdk.card().create(customer_id, card_object) - self.assertEqual(card_created["status"], 200) + self.assertIn(card_created["status"], [200, 201]) self.assertEqual(self.sdk.card() .get(customer_id, card_created["response"]["id"])["status"], 200)