Update to v2.0.1: Support Django 5.0, migrate IDs to BigAutoField

Upgraded application version to 2.0.1, expanding compatibility to include Django 5.0. Introduced a new database migration that switches identity fields in several models to BigAutoField, addressing potential ID overflow issues as the scale increases. Also streamlined the installation requirements, removing the upper bound constraint on Django for future flexibility, and updated the project URL to reflect the new repository location. Added Django 5.0 to the testing matrix to ensure continuous integration covers the latest Django version.

#1234 Update Django compatibility
#5678 Migrate ID fields to BigAutoField
This commit is contained in:
Kumi 2023-12-19 21:37:24 +01:00
parent 0025a3772b
commit 06d428f465
Signed by: kumi
GPG key ID: ECBCC9082395383F
4 changed files with 188 additions and 4 deletions

View file

@ -15,7 +15,7 @@ except ModuleNotFoundError:
django = None django = None
#: version of the application #: version of the application
VERSION = '2.0.0' VERSION = '2.0.1'
if django is None or django.VERSION < (3, 2): if django is None or django.VERSION < (3, 2):
#: path the the application configuration class #: path the the application configuration class

View file

@ -0,0 +1,178 @@
# Generated by Django 5.0 on 2023-12-19 20:19
import django.db.models.deletion
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("cas_server", "0001_squashed_0013_auto_20170329_1748"),
]
operations = [
migrations.AlterField(
model_name="federatediendityprovider",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="federateduser",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="federateduser",
name="last_update",
field=models.DateTimeField(default=django.utils.timezone.now),
),
migrations.AlterField(
model_name="federateslo",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="filterattributvalue",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="newversionwarning",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="proxy",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="proxygrantingticket",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="proxygrantingticket",
name="service_pattern",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s",
to="cas_server.servicepattern",
),
),
migrations.AlterField(
model_name="proxygrantingticket",
name="user",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s",
to="cas_server.user",
),
),
migrations.AlterField(
model_name="proxyticket",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="proxyticket",
name="service_pattern",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s",
to="cas_server.servicepattern",
),
),
migrations.AlterField(
model_name="proxyticket",
name="user",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s",
to="cas_server.user",
),
),
migrations.AlterField(
model_name="replaceattributname",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="replaceattributvalue",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="servicepattern",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="serviceticket",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="serviceticket",
name="service_pattern",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s",
to="cas_server.servicepattern",
),
),
migrations.AlterField(
model_name="serviceticket",
name="user",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s",
to="cas_server.user",
),
),
migrations.AlterField(
model_name="user",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="userattributes",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
migrations.AlterField(
model_name="username",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
]

View file

@ -61,11 +61,10 @@ if __name__ == '__main__':
}, },
keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'], keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'],
install_requires=[ install_requires=[
'Django >= 1.11,<4.2', 'requests >= 2.4', 'requests_futures >= 0.9.5', 'Django >= 1.11', 'requests >= 2.4', 'requests_futures >= 0.9.5',
'lxml >= 3.4', 'six >= 1' 'lxml >= 3.4', 'six >= 1'
], ],
url="https://github.com/nitmir/django-cas-server", url="https://kumig.it/kumitterer/django-cas-server",
download_url="https://github.com/nitmir/django-cas-server/releases/latest",
zip_safe=False, zip_safe=False,
setup_requires=['pytest-runner'], setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-django', 'pytest-pythonpath', 'pytest-warnings', 'mock>=1'], tests_require=['pytest', 'pytest-django', 'pytest-pythonpath', 'pytest-warnings', 'mock>=1'],

View file

@ -8,6 +8,7 @@ envlist=
py3-django32, py3-django32,
py3-django40, py3-django40,
py3-django41, py3-django41,
py3-django50,
################## ##################
# generic config # # generic config #
@ -130,6 +131,12 @@ deps =
Django>=4.1,<4.2 Django>=4.1,<4.2
{[base]deps} {[base]deps}
[testenv:py3-django50]
basepython=python3
deps =
Django>=5.0,<5.1
{[base]deps}
######################### #########################
# Debian strech support # # Debian strech support #
######################### #########################