Skip to content

Commit

Permalink
Version bump, 1.0.0
Browse files Browse the repository at this point in the history
- 1.0 because its about time
- Drop in compat module for alternative import paths
- Remove old environments from testing

Closes bennylopegh-143
  • Loading branch information
bennylope committed Dec 10, 2017
1 parent c1c88a7 commit 1695921
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 52 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Contributors:
* `Basil Shubin <https://github.com/bashu>`_
* `Federico Capoano <https://github.com/nemesisdesign>`_
* `Justin Mayer <https://github.com/justinmayer>`_
* `Alan Zhu <https://github.com/AZtheAsian>`_

If your name is missing as a contributor that's my oversight, let me know at
[email protected]
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
History
=======

1.0.0
-----

* Django 2 compatability

0.9.3
-----

Expand Down
5 changes: 1 addition & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,8 @@ Targets & testing

The codebase is targeted and tested against:

* Django 1.8.x against Python 2.7, 3.4, 3.5, and PyPy
* Django 1.9.x against Python 2.7, 3.4, 3.5, and PyPy
* Django 1.10.x against Python 2.7, 3.4, 3.5, 3.6, and PyPy
* Django 1.11.x against Python 2.7, 3.4, 3.5, 3.6, and PyPy
* Django 2.0.x against Python 3.6
* Django 2.0.x against Python 3.4, 3.5, 3.6

To run the tests against all target environments, install `tox
<https://testrun.org/tox/latest/>`_ and then execute the command::
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = '0.9'
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '0.9.3'
release = '1.0.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion organizations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

__author__ = 'Ben Lopatin'
__email__ = '[email protected]'
__version__ = '0.9.3'
__version__ = '1.0.0'


default_app_config = 'organizations.apps.OrganizationsConfig'
20 changes: 6 additions & 14 deletions organizations/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,21 @@
import warnings

from django.conf import settings

try:
from django.core.urlresolvers import reverse
except ImportError:
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _

try:
import six
except ImportError:
from django.utils import six

from organizations.base import OrgMeta
from organizations.base import AbstractBaseOrganization
from organizations.base import AbstractBaseOrganizationUser
from organizations.base import AbstractBaseOrganizationOwner
from organizations.fields import SlugField
from organizations.base import AbstractBaseOrganizationUser
from organizations.base import OrgMeta
from organizations.compat import reverse
from organizations.compat import six
from organizations.fields import AutoCreatedField
from organizations.fields import AutoLastModifiedField
from organizations.fields import SlugField
from organizations.signals import owner_changed
from organizations.signals import user_added
from organizations.signals import user_removed
from organizations.signals import owner_changed

USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
ORGS_TIMESTAMPED_MODEL = getattr(settings, 'ORGS_TIMESTAMPED_MODEL', None)
Expand Down
7 changes: 1 addition & 6 deletions organizations/backends/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@
from django.contrib.auth import get_user_model
from django.contrib.auth import login
from django.core.mail import EmailMessage

try:
from django.core.urlresolvers import reverse
except ImportError:
from django.urls import reverse

from django.http import Http404
from django.shortcuts import redirect
from django.shortcuts import render
Expand All @@ -51,6 +45,7 @@
from organizations.backends.forms import UserRegistrationForm
from organizations.backends.forms import org_registration_form
from organizations.backends.tokens import RegistrationTokenGenerator
from organizations.compat import reverse
from organizations.utils import create_organization
from organizations.utils import default_org_model
from organizations.utils import model_field_attr
Expand Down
9 changes: 2 additions & 7 deletions organizations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from django.conf import settings
from django.core.exceptions import FieldDoesNotExist
from django.db import models
from django.db.models.base import ModelBase
# from django.db.models.fields import FieldDoesNotExist
from django.core.exceptions import FieldDoesNotExist

try:
import six
except ImportError:
from django.utils import six
from django.utils.translation import ugettext_lazy as _

from organizations.compat import six
from organizations.managers import ActiveOrgManager
from organizations.managers import OrgManager

Expand Down
10 changes: 10 additions & 0 deletions organizations/compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

try:
from django.urls import reverse # noqa
except ImportError:
from django.core.urlresolvers import reverse # noqa

try:
import six # noqa
except ImportError:
from django.utils import six # noqa
7 changes: 1 addition & 6 deletions organizations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from django.contrib.sites.shortcuts import get_current_site

try:
from django.core.urlresolvers import reverse
except ImportError:
from django.urls import reverse

from django.http import HttpResponseBadRequest
from django.shortcuts import redirect
from django.shortcuts import render
Expand All @@ -43,6 +37,7 @@

from organizations.backends import invitation_backend
from organizations.backends import registration_backend
from organizations.compat import reverse
from organizations.forms import OrganizationAddForm
from organizations.forms import OrganizationForm
from organizations.forms import OrganizationUserAddForm
Expand Down
7 changes: 1 addition & 6 deletions tests/test_backends.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
from django.contrib.auth.models import User
from django.core import mail

try:
from django.core.urlresolvers import reverse
except ImportError:
from django.urls import reverse

from django.http import Http404
from django.http import QueryDict
from django.test import TestCase
Expand All @@ -16,6 +10,7 @@
from organizations.backends.defaults import InvitationBackend
from organizations.backends.defaults import RegistrationBackend
from organizations.backends.tokens import RegistrationTokenGenerator
from organizations.compat import reverse
from organizations.models import Organization
from test_abstract.models import CustomOrganization
from test_vendors.models import Vendor
Expand Down
9 changes: 3 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist =
flake8,
py{27,34,35}-django{18,19,110,111},
py{36}-django{110,111,2},
pypy-django{18,19,110,111}
py{27}-django{111},
py{34,35,36}-django{111,2},
pypy-django{111}

[testenv]
setenv =
Expand All @@ -18,9 +18,6 @@ basepython =
pypy3: pypy3
jython: jython
deps =
django18: Django>=1.8,<1.9
django19: Django>=1.9,<1.10
django110: Django>=1.10,<1.11
django111: Django>=1.11,<2
django2: Django>=2,<2.1
-r{toxinidir}/requirements-test.txt
Expand Down

0 comments on commit 1695921

Please sign in to comment.