Skip to content

Commit

Permalink
Merge pull request #83 from nitmir/dev
Browse files Browse the repository at this point in the history
Update to version 2.0.0

v2.0.0 - 2022-10-17
===================

Added
-----
* Support for Django 4.0 and 4.1
* Add locale for zh_Hans
* Add a unit test with a non ascii char in service url
* Add settings to allow deletings Django cookies upon logout

Changed
-------
* Update CI: require pytest >= 7 and remove pytest-pythonpath dependancy

Fixes
-----
* Fix unicode sandwich issue in cas_server.utils.update_url
* Fix DeprecationWarning about default_app_config in Django 3.2
* Fix DeprecationWarning about USE_L10N in Django 4.0

Removed
-------
* Drop support for python 2.7 (now deprecated for more than 2 years,
  expect it to break now or in a near future)
* Drop support for python 3.5 (but it should keep working for a while.
  pytest >= 7 do not support python 3.5 and Debian Stretch support ended)
  • Loading branch information
nitmir authored Oct 17, 2022
2 parents 9cf10ef + 06f525b commit 0025a37
Show file tree
Hide file tree
Showing 17 changed files with 601 additions and 54 deletions.
23 changes: 13 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: focal
language: python
matrix:
include:
Expand All @@ -8,13 +9,7 @@ matrix:
env: TOX_ENV=check_rst
- python: "3.9"
env: TOX_ENV=coverage
# Debian strech support
- python: "3.5"
env: TOX_ENV=py35-django111
- python: "3.5"
env: TOX_ENV=py35-django111
arch: ppc64le
# Ubuntu bionic and EPEL 7 support
# REHL 7 support and Ubuntu bionic
- python: "3.6"
env: TOX_ENV=py36-django111
- python: "3.6"
Expand All @@ -38,17 +33,25 @@ matrix:
- python: "3.8"
env: TOX_ENV=py38-django22
arch: ppc64le
# Debian bullseye and Ubuntu hirsute support
# Debian bullseye and Ubuntu hirsute and impish support
- python: "3.9"
env: TOX_ENV=py39-django22
- python: "3.9"
env: TOX_ENV=py39-django22
arch: ppc64le
# Ubuntu jammy and kinetic support
- python: "3.10"
env: TOX_ENV=py310-django32
- python: "3.10"
env: TOX_ENV=py310-django32
arch: ppc64le
# Django additional supported version
- python: "3.9"
env: TOX_ENV=py39-django31
- python: "3.9"
env: TOX_ENV=py39-django32
- python: "3.10"
env: TOX_ENV=py310-django40
- python: "3.10"
env: TOX_ENV=py310-django41

cache:
directories:
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ All notable changes to this project will be documented in this file.
.. contents:: Table of Contents
:depth: 2

v2.0.0 - 2022-10-17
===================

Added
-----
* Support for Django 4.0 and 4.1
* Add locale for zh_Hans
* Add a unit test with a non ascii char in service url
* Add settings to allow deletings Django cookies upon logout

Changed
-------
* Update CI: require pytest >= 7 and remove pytest-pythonpath dependancy

Fixes
-----
* Fix unicode sandwich issue in cas_server.utils.update_url
* Fix DeprecationWarning about default_app_config in Django 3.2
* Fix DeprecationWarning about USE_L10N in Django 4.0

Removed
-------
* Drop support for python 2.7 (now deprecated for more than 2 years,
expect it to break now or in a near future)
* Drop support for python 3.5 (but it should keep working for a while.
pytest >= 7 do not support python 3.5 and Debian Stretch support ended)


v1.3.1 - 2021-07-03
===================

Expand Down
17 changes: 14 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Features
* Possibility to rename/rewrite attributes per service
* Possibility to require some attribute values per service
* Federated mode between multiple CAS
* Supports Django 1.11, 2.2, 3.1 and 3.2
* Supports Python 3.5+
* Supports Django 1.11, 2.2, 3.2, 4.0 and 4.1
* Supports Python 3.6+

Dependencies
============

``django-cas-server`` depends on the following python packages:

* Django >= 1.11 < 3.3
* Django >= 1.11 < 4.2
* requests >= 2.4
* requests_futures >= 0.9.5
* lxml >= 3.4
Expand Down Expand Up @@ -285,6 +285,17 @@ Authentication settings

* ``CAS_SLO_TIMEOUT``: Timeout for a single SLO request in seconds. The default is ``5``.

* ``CAS_REMOVE_DJANGO_SESSION_COOKIE_ON_LOGOUT``: If `True` Django session cookie will be removed
on logout from CAS server (default `False`). Note that Django session middleware will generate
a new session cookie.

* ``CAS_REMOVE_DJANGO_CSRF_COOKIE_ON_LOGOUT``: If `True` Django csrf cookie will be removed on
logout from CAS server (default `False`). Note that Django csrf middleware will generate a new
csrf token cookie.

* ``CAS_REMOVE_DJANGO_LANGUAGE_COOKIE_ON_LOGOUT``: If `True` Django language cookie will be
removed on logout from CAS server (default `False`).


Federation settings
-------------------
Expand Down
11 changes: 8 additions & 3 deletions cas_server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@
#
# (c) 2015-2016 Valentin Samir
"""A django CAS server application"""
try:
import django
except ModuleNotFoundError:
django = None

#: version of the application
VERSION = '1.3.1'
VERSION = '2.0.0'

#: path the the application configuration class
default_app_config = 'cas_server.apps.CasAppConfig'
if django is None or django.VERSION < (3, 2):
#: path the the application configuration class
default_app_config = 'cas_server.apps.CasAppConfig'
7 changes: 7 additions & 0 deletions cas_server/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@
#: Let the list empty to disable messages display.
CAS_INFO_MESSAGES_ORDER = []

#: :class:`bool` If `True` Django session cookie will be removed on logout from CAS server
CAS_REMOVE_DJANGO_SESSION_COOKIE_ON_LOGOUT = False
#: :class:`bool` If `True` Django csrf cookie will be removed on logout from CAS server
CAS_REMOVE_DJANGO_CSRF_COOKIE_ON_LOGOUT = False
#: :class:`bool` If `True` Django language cookie will be removed on logout from CAS server
CAS_REMOVE_DJANGO_LANGUAGE_COOKIE_ON_LOGOUT = False


GLOBALS = globals().copy()
for name, default_value in GLOBALS.items():
Expand Down
Binary file added cas_server/locale/zh_Hans/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 0025a37

Please sign in to comment.