From 530f00ee8666f66102d0f0f8f57c47878750d507 Mon Sep 17 00:00:00 2001 From: Maik Hoepfel Date: Wed, 6 Aug 2014 17:06:58 +0200 Subject: [PATCH 1/4] Add note to README about supported versions It can be hard to find that information, and especially given that only Python 3 is supported, it's nice to have it front and central. --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 8caa1ea..1e96fdd 100644 --- a/README.rst +++ b/README.rst @@ -5,6 +5,7 @@ Adyen package for django-oscar This package provides integration with the `Adyen`_ payment gateway. It is designed to work seamlessly with the e-commerce framework `django-oscar`_ but can be used without Oscar. +This extension supports Django 1.6+, Python 3.3+ and Oscar 0.7+. .. _`Adyen`: http://www.adyen.com/ .. _`django-oscar`: https://github.com/tangentlabs/django-oscar From c7d52bf878621713729e17dcdb76b081d76e7d13 Mon Sep 17 00:00:00 2001 From: Maik Hoepfel Date: Wed, 6 Aug 2014 17:08:38 +0200 Subject: [PATCH 2/4] Correct typo in comment --- adyen/scaffold.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adyen/scaffold.py b/adyen/scaffold.py index 810d38f..855672c 100644 --- a/adyen/scaffold.py +++ b/adyen/scaffold.py @@ -86,7 +86,7 @@ def get_form_fields_list(self): except AttributeError: raise MissingFieldException - # Check for overriden return URL. + # Check for overridden return URL. return_url = getattr(self, 'return_url', None) if return_url is not None: return_url = return_url.replace('PAYMENT_PROVIDER_CODE', Constants.ADYEN) From a9a458f304239fbd7e064543c6ee26eb42b7a03a Mon Sep 17 00:00:00 2001 From: Maik Hoepfel Date: Wed, 6 Aug 2014 17:09:30 +0200 Subject: [PATCH 3/4] Use open-ended version for supported Oscar version Theoretically, it's nicer to limit the range of supported Oscar versions. But in practice it becomes hard to prepare an extension for a unreleased Oscar version if the range is limited. That's because easy_install/pip will downgrade the used Oscar version again. Long story short, experience shows an open-ended approach is best. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fda93a2..3a5368e 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ include_package_data=True, install_requires=[ 'bleach==1.4', - 'django-oscar>=0.7,<0.9', + 'django-oscar>=0.7', 'freezegun==0.1.18', 'iptools==0.6.1', 'requests>=2.0,<3.0', From 89029fb54263971700ff9a9f85ecc7408b3e31d6 Mon Sep 17 00:00:00 2001 From: Maik Hoepfel Date: Wed, 6 Aug 2014 17:19:53 +0200 Subject: [PATCH 4/4] Use a single requirements file The layout that seems to work best for Oscar extensions is at follows: * setup.py defines dependencies necessary for production use of the extension * requirements.txt defines further requirements which are necessary to work on it. Freezegun is only used in the tests, so it's removed from setup.py. The remaining depenencies are bundled in a new requirements.txt file. --- requirements.txt | 8 ++++++++ requirements_tests.txt | 10 ---------- setup.py | 1 - 3 files changed, 8 insertions(+), 11 deletions(-) delete mode 100644 requirements_tests.txt diff --git a/requirements.txt b/requirements.txt index 56f3046..3c42042 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,11 @@ bleach==1.4 iptools==0.6.1 requests>=2.0.0,<3.0 +freezegun==0.1.18 + +pytest +pytest-cov +pytest-django +pytest-flakes +pytest-pep8 +pytest-sugar diff --git a/requirements_tests.txt b/requirements_tests.txt deleted file mode 100644 index a696d50..0000000 --- a/requirements_tests.txt +++ /dev/null @@ -1,10 +0,0 @@ --r requirements.txt - -freezegun==0.1.18 - -pytest -pytest-cov -pytest-django -pytest-flakes -pytest-pep8 -pytest-sugar diff --git a/setup.py b/setup.py index 3a5368e..a4d1489 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,6 @@ install_requires=[ 'bleach==1.4', 'django-oscar>=0.7', - 'freezegun==0.1.18', 'iptools==0.6.1', 'requests>=2.0,<3.0', ],