Skip to content

Commit

Permalink
Merge pull request #10 from yunojuno/django20
Browse files Browse the repository at this point in the history
Drop support for Python2, Django < 1.11
  • Loading branch information
hugorodgerbrown authored May 11, 2018
2 parents bc9071a + e7b87ca commit aff4878
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 32 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language:
python

python:
- "2.7"
- "3.6"

install:
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include LICENCE.md
include README.rst
include requirements.txt
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Django Basecrm

A Django app that connects to the `BaseCRM API <https://dev.futuresimple.com/>`_ (v2)

**This package is now Python3 only, and supports Django 1.11 and above. For previous versions please refer to the Python2 branch.**

A lightweight Django app to wrap the `requests <http://docs.python-requests.org/en/latest/>`_ library and provide easy endpoints for the BaseCRM API.

Note that this is not a **complete** client SDK; it's a helper app that has the functionality we needed. Contributions gratefully accepted.
Expand Down
1 change: 0 additions & 1 deletion basecrm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# -*- coding: utf-8 -*-
default_app_config = 'basecrm.apps.BaseCRMConfig'
1 change: 0 additions & 1 deletion basecrm/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from django.apps import AppConfig

from . import settings, helpers
Expand Down
6 changes: 0 additions & 6 deletions basecrm/compat.py

This file was deleted.

1 change: 0 additions & 1 deletion basecrm/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _

Expand Down
2 changes: 0 additions & 2 deletions basecrm/helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from django.apps import apps as django_apps

from . import utils, exceptions, settings
Expand Down
1 change: 0 additions & 1 deletion basecrm/serializers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import types

from django.apps import apps
Expand Down
1 change: 0 additions & 1 deletion basecrm/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from django.conf import settings

BASECRM_API_URL = getattr(settings, 'BASECRM_API_URL', 'https://api.getbase.com/v2/')
Expand Down
3 changes: 1 addition & 2 deletions basecrm/tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import types
from unittest import mock

from django.apps import apps as django_apps
from django.test import TestCase
Expand All @@ -13,7 +13,6 @@
settings,
utils
)
from .compat import mock


class RequestWrapperTests(TestCase):
Expand Down
1 change: 0 additions & 1 deletion basecrm/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import logging
import requests

Expand Down
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
from setuptools import setup, find_packages

README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
# requirements.txt must be included in MANIFEST.in and include_package_data must be True
# in order for this to work; ensures that tox can use the setup to enforce requirements
REQUIREMENTS = '\n'.join(open(os.path.join(os.path.dirname(__file__), 'requirements.txt')).readlines()) # noqa

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
name="django-basecrm",
version="0.5",
version="0.6",
packages=find_packages(),
install_requires=REQUIREMENTS,
install_requires=[
'Django>=1.11',
'requests>=2.6',
],
include_package_data=True,
description='A Django app that connects to the BaseCRM API (v2)',
long_description=README,
Expand All @@ -25,11 +25,13 @@
maintainer_email='[email protected]',
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
Expand Down
9 changes: 3 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
[tox]
envlist = py{27,36}-django{18,19,110,111}
envlist = py{36}-django{111,20}

[testenv]
deps =
coverage==4.3
py27: mock==2.0
django18: Django==1.8
django19: Django==1.9
django110: Django==1.10
coverage
django111: Django==1.11
django20: Django==2.0

commands=
python --version
Expand Down

0 comments on commit aff4878

Please sign in to comment.