Skip to content

Commit

Permalink
Added support for python 3.8 and dropped support for older Django ver…
Browse files Browse the repository at this point in the history
…sions
  • Loading branch information
mraarif committed May 8, 2020
1 parent 1444a5f commit 4c7435b
Show file tree
Hide file tree
Showing 16 changed files with 173 additions and 188 deletions.
14 changes: 4 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@ language: python

python:
- 3.5
- 3.8

env:
- TOXENV=django111
- TOXENV=django20
- TOXENV=django21
- TOXENV=django22
- TOXENV=quality

matrix:
include:
- python: 2.7
env: TOXENV=django111

cache:
- pip

install:
- pip install -U pip wheel codecov
- pip install pip==20.0.2
- pip install -U wheel codecov
- pip install -r requirements/travis.txt

script:
Expand All @@ -40,4 +34,4 @@ deploy:
on:
tags: true
python: 3.5
condition: '$TOXENV = django111'
condition: '$TOXENV = django22'
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
=======

3.1.0 (2020-05-08)
------------------
- Added support for python 3.8
- Removed support for Django versions older than 2.2

3.0.2 (2020-02-06)
------------------

Expand Down
2 changes: 1 addition & 1 deletion auth_backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX
projects as well.
"""
__version__ = '3.0.2' # pragma: no cover
__version__ = '3.1.0' # pragma: no cover
1 change: 1 addition & 0 deletions auth_backends/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class EdXOAuth2(BaseOAuth2):
auth_complete_signal = Signal(providing_args=['user'])

@property
# pylint: disable= missing-function-docstring
def logout_url(self):
if self.setting('LOGOUT_REDIRECT_URL'):
return '{}?client_id={}&redirect_url={}'.format(
Expand Down
4 changes: 2 additions & 2 deletions auth_backends/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# pylint: disable=unused-argument
# The function parameters must be named exactly as they are below.
# Do not change them to appease Pylint.
def get_user_if_exists(strategy, details, user=None, *args, **kwargs):
def get_user_if_exists(strategy, details, user=None, *args, **kwargs): # pylint: disable=keyword-arg-before-vararg
"""Return a User with the given username iff the User exists."""
if user:
return {'is_new': False}
Expand All @@ -31,7 +31,7 @@ def get_user_if_exists(strategy, details, user=None, *args, **kwargs):
return {}


def update_email(strategy, details, user=None, *args, **kwargs):
def update_email(strategy, details, user=None, *args, **kwargs): # pylint: disable=keyword-arg-before-vararg
"""Update the user's email address using data from provider."""
if user:
email = details.get('email')
Expand Down
2 changes: 1 addition & 1 deletion auth_backends/tests/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
User = get_user_model()


class LogoutViewTestMixin(object):
class LogoutViewTestMixin:
""" Mixin for tests of the LogoutRedirectBaseView children. """

def create_user(self):
Expand Down
1 change: 1 addition & 0 deletions auth_backends/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def dispatch(self, request, *args, **kwargs):
return super(EdxOAuth2LogoutView, self).dispatch(request, *args, **kwargs)

@property
# pylint: disable= missing-function-docstring
def url(self):
# NOTE: We use a property here so that we can take advantage of the base class'
# get_redirect_url() with minimal effort.
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Core requirements for using this package template
-c constraints.txt

Django>=1.11
Django
PyJWT
six
social-auth-app-django
Expand Down
27 changes: 16 additions & 11 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@
#
# make upgrade
#
certifi==2019.11.28 # via requests
certifi==2020.4.5.1 # via requests
cffi==1.14.0 # via cryptography
chardet==3.0.4 # via requests
django==1.11.28
idna==2.8 # via requests
cryptography==2.9.2 # via social-auth-core
defusedxml==0.6.0 # via python3-openid, social-auth-core
django==2.2.12 # via -c requirements/constraints.txt, -r requirements/base.in
idna==2.9 # via requests
oauthlib==3.1.0 # via requests-oauthlib, social-auth-core
pyjwt==1.7.1
python-openid==2.2.5 # via social-auth-core
pytz==2019.3 # via django
pycparser==2.20 # via cffi
pyjwt==1.7.1 # via -r requirements/base.in, social-auth-core
python3-openid==3.1.0 # via social-auth-core
pytz==2020.1 # via django
requests-oauthlib==1.3.0 # via social-auth-core
requests==2.22.0 # via requests-oauthlib, social-auth-core
six==1.14.0
social-auth-app-django==3.1.0
social-auth-core==3.2.0
urllib3==1.25.8 # via requests
requests==2.23.0 # via requests-oauthlib, social-auth-core
six==1.14.0 # via -r requirements/base.in, cryptography, social-auth-app-django, social-auth-core
social-auth-app-django==3.1.0 # via -r requirements/base.in
social-auth-core==3.3.3 # via -r requirements/base.in, social-auth-app-django
sqlparse==0.3.1 # via django
urllib3==1.25.9 # via requests
18 changes: 2 additions & 16 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,8 @@
# pin when possible. Writing an issue against the offending project and
# linking to it here is good.

# stay on LTS
Django<2.3

# futures is not valid for Python 3, and will cause dependency
# conflicts in tox if not constrained here, possibly because only the
# most recent versions of futures declare this.
futures ; python_version < "3"


# NOTE: The following allows us to run "make upgrade" under Python 3 and get dependencies
# that work for Python 2.

# A dependency of pytest. Pytest doesn't constrain it and 6.0.0 onward
# only works with python 3
more-itertools<6.0.0

# Constrained for Python 2 support
astroid<2.0.0

# Constrained for Python 2 support
edx-lint<1.4.0
136 changes: 68 additions & 68 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,71 @@
#
# make upgrade
#
appdirs==1.4.3
argparse==1.4.0
astroid==1.5.3
atomicwrites==1.3.0
attrs==19.3.0
backports.functools-lru-cache==1.6.1
certifi==2019.11.28
chardet==3.0.4
click-log==0.3.2
click==7.0
codecov==2.0.15
configparser==4.0.2
contextlib2==0.6.0.post1
coverage==5.0.3
django==1.11.28
edx-lint==1.3.1
enum34==1.1.6
filelock==3.0.12
funcsigs==1.0.2
future==0.18.2
futures==3.3.0 ; python_version < "3"
httpretty==0.9.7
idna==2.8
importlib-metadata==1.5.0
importlib-resources==1.0.2
isort==4.3.21
lazy-object-proxy==1.4.3
linecache2==1.0.0
mccabe==0.6.1
more-itertools==5.0.0
oauthlib==3.1.0
packaging==20.1
pathlib2==2.3.5
pip-tools==4.4.1
pluggy==0.13.1
py==1.8.1
pycodestyle==2.5.0
pycryptodomex==3.9.6
pyjwkest==1.4.2
pyjwt==1.7.1
pylint-celery==0.3
pylint-django==0.7.2
pylint-plugin-utils==0.6
pylint==1.7.6
pyparsing==2.4.6
pytest-cov==2.8.1
pytest-django==3.8.0
pytest==4.6.9
python-openid==2.2.5
pytz==2019.3
requests-oauthlib==1.3.0
requests==2.22.0
scandir==1.10.0
singledispatch==3.4.0.3
six==1.14.0
social-auth-app-django==3.1.0
social-auth-core==3.2.0
toml==0.10.0
tox-battery==0.5.2
tox==3.14.3
traceback2==1.4.0
typing==3.7.4.1
unittest2==1.1.0
urllib3==1.25.8
virtualenv==20.0.0
wcwidth==0.1.8
wrapt==1.11.2
zipp==1.1.0
appdirs==1.4.3 # via -r requirements/test.txt, -r requirements/travis.txt, virtualenv
argparse==1.4.0 # via -r requirements/test.txt, unittest2
astroid==2.3.3 # via -r requirements/test.txt, pylint, pylint-celery
attrs==19.3.0 # via -r requirements/test.txt, pytest
certifi==2020.4.5.1 # via -r requirements/test.txt, -r requirements/travis.txt, requests
cffi==1.14.0 # via -r requirements/test.txt, cryptography
chardet==3.0.4 # via -r requirements/test.txt, -r requirements/travis.txt, requests
click-log==0.3.2 # via -r requirements/test.txt, edx-lint
click==7.1.2 # via -r requirements/pip-tools.txt, -r requirements/test.txt, click-log, edx-lint, pip-tools
codecov==2.0.22 # via -r requirements/travis.txt
coverage==5.1 # via -r requirements/test.txt, -r requirements/travis.txt, codecov, pytest-cov
cryptography==2.9.2 # via -r requirements/test.txt, social-auth-core
defusedxml==0.6.0 # via -r requirements/test.txt, python3-openid, social-auth-core
distlib==0.3.0 # via -r requirements/test.txt, -r requirements/travis.txt, virtualenv
django==2.2.12 # via -c requirements/constraints.txt, -r requirements/test.txt
edx-lint==1.4.1 # via -r requirements/test.txt
filelock==3.0.12 # via -r requirements/test.txt, -r requirements/travis.txt, tox, virtualenv
future==0.18.2 # via -r requirements/test.txt, pyjwkest
httpretty==1.0.2 # via -r requirements/test.txt
idna==2.9 # via -r requirements/test.txt, -r requirements/travis.txt, requests
importlib-metadata==1.6.0 # via -r requirements/test.txt, -r requirements/travis.txt, importlib-resources, pluggy, pytest, tox, virtualenv
importlib-resources==1.5.0 # via -r requirements/test.txt, -r requirements/travis.txt, virtualenv
isort==4.3.21 # via -r requirements/test.txt, pylint
lazy-object-proxy==1.4.3 # via -r requirements/test.txt, astroid
linecache2==1.0.0 # via -r requirements/test.txt, traceback2
mccabe==0.6.1 # via -r requirements/test.txt, pylint
more-itertools==8.2.0 # via -r requirements/test.txt, pytest
oauthlib==3.1.0 # via -r requirements/test.txt, requests-oauthlib, social-auth-core
packaging==20.3 # via -r requirements/test.txt, -r requirements/travis.txt, pytest, tox
pathlib2==2.3.5 # via -r requirements/test.txt, pytest
pip-tools==5.1.2 # via -r requirements/pip-tools.txt
pluggy==0.13.1 # via -r requirements/test.txt, -r requirements/travis.txt, pytest, tox
py==1.8.1 # via -r requirements/test.txt, -r requirements/travis.txt, pytest, tox
pycodestyle==2.5.0 # via -r requirements/test.txt
pycparser==2.20 # via -r requirements/test.txt, cffi
pycryptodomex==3.9.7 # via -r requirements/test.txt, pyjwkest
pyjwkest==1.4.2 # via -r requirements/test.txt
pyjwt==1.7.1 # via -r requirements/test.txt, social-auth-core
pylint-celery==0.3 # via -r requirements/test.txt, edx-lint
pylint-django==2.0.11 # via -r requirements/test.txt, edx-lint
pylint-plugin-utils==0.6 # via -r requirements/test.txt, pylint-celery, pylint-django
pylint==2.4.2 # via -r requirements/test.txt, edx-lint, pylint-celery, pylint-django, pylint-plugin-utils
pyparsing==2.4.7 # via -r requirements/test.txt, -r requirements/travis.txt, packaging
pytest-cov==2.8.1 # via -r requirements/test.txt
pytest-django==3.9.0 # via -r requirements/test.txt
pytest==5.4.1 # via -r requirements/test.txt, pytest-cov, pytest-django
python3-openid==3.1.0 # via -r requirements/test.txt, social-auth-core
pytz==2020.1 # via -r requirements/test.txt, django
requests-oauthlib==1.3.0 # via -r requirements/test.txt, social-auth-core
requests==2.23.0 # via -r requirements/test.txt, -r requirements/travis.txt, codecov, pyjwkest, requests-oauthlib, social-auth-core
six==1.14.0 # via -r requirements/pip-tools.txt, -r requirements/test.txt, -r requirements/travis.txt, astroid, cryptography, edx-lint, packaging, pathlib2, pip-tools, pyjwkest, social-auth-app-django, social-auth-core, tox, unittest2, virtualenv
social-auth-app-django==3.1.0 # via -r requirements/test.txt
social-auth-core==3.3.3 # via -r requirements/test.txt, social-auth-app-django
sqlparse==0.3.1 # via -r requirements/test.txt, django
toml==0.10.0 # via -r requirements/test.txt, -r requirements/travis.txt, tox
tox-battery==0.5.2 # via -r requirements/travis.txt
tox==3.15.0 # via -r requirements/test.txt, -r requirements/travis.txt, tox-battery
traceback2==1.4.0 # via -r requirements/test.txt, unittest2
typed-ast==1.4.1 # via -r requirements/test.txt, astroid
unittest2==1.1.0 # via -r requirements/test.txt
urllib3==1.25.9 # via -r requirements/test.txt, -r requirements/travis.txt, requests
virtualenv==20.0.20 # via -r requirements/test.txt, -r requirements/travis.txt, tox
wcwidth==0.1.9 # via -r requirements/test.txt, pytest
wrapt==1.11.2 # via -r requirements/test.txt, astroid
zipp==1.2.0 # via -r requirements/test.txt, -r requirements/travis.txt, importlib-metadata, importlib-resources

# The following packages are considered to be unsafe in a requirements file:
# pip
7 changes: 5 additions & 2 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
# make upgrade
#
click==7.0 # via pip-tools
pip-tools==4.4.1
click==7.1.2 # via pip-tools
pip-tools==5.1.2 # via -r requirements/pip-tools.in
six==1.14.0 # via pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
Loading

0 comments on commit 4c7435b

Please sign in to comment.