Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1633: Update Django dependency to version 5.1.5 #1792

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repos:
rev: "1.22.2"
hooks:
- id: django-upgrade
args: [--target-version, "5.0"]
args: [--target-version, "5.1"]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
Expand Down
12 changes: 0 additions & 12 deletions accounts/hashers.py

This file was deleted.

14 changes: 1 addition & 13 deletions accounts/migrations/0002_migrate_sha1_passwords.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
from django.db import migrations

from ..hashers import PBKDF2WrappedSHA1PasswordHasher


def forwards_func(apps, schema_editor):
User = apps.get_model("auth", "User")
users = User.objects.filter(password__startswith="sha1$")
hasher = PBKDF2WrappedSHA1PasswordHasher()
for user in users:
algorithm, salt, sha1_hash = user.password.split("$", 2)
user.password = hasher.encode_sha1_hash(sha1_hash, salt)
user.save(update_fields=["password"])

ulgens marked this conversation as resolved.
Show resolved Hide resolved

class Migration(migrations.Migration):

Expand All @@ -21,5 +9,5 @@ class Migration(migrations.Migration):
]

operations = [
migrations.RunPython(forwards_func),
migrations.RunPython(migrations.RunPython.noop),
]
21 changes: 0 additions & 21 deletions accounts/test_hashers.py

This file was deleted.

2 changes: 1 addition & 1 deletion aggregator/migrations/0004_add_local_django_community.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ class Migration(migrations.Migration):
),
migrations.AddConstraint(
model_name='localdjangocommunity',
constraint=models.CheckConstraint(check=models.Q(models.Q(('event_site_url__isnull', False), ('website_url__isnull', False)), models.Q(('event_site_url__isnull', False), ('website_url__isnull', True)), models.Q(('event_site_url__isnull', True), ('website_url__isnull', False)), _connector='OR'), name='website_url_and_or_event_site_url'),
constraint=models.CheckConstraint(condition=models.Q(models.Q(('event_site_url__isnull', False), ('website_url__isnull', False)), models.Q(('event_site_url__isnull', False), ('website_url__isnull', True)), models.Q(('event_site_url__isnull', True), ('website_url__isnull', False)), _connector='OR'), name='website_url_and_or_event_site_url'),
),
]
2 changes: 1 addition & 1 deletion aggregator/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class Meta:
verbose_name_plural = _("Local Django Communities")
constraints = [
models.CheckConstraint(
check=(
condition=(
models.Q(website_url__isnull=False, event_site_url__isnull=False)
| models.Q(website_url__isnull=True, event_site_url__isnull=False)
| models.Q(website_url__isnull=False, event_site_url__isnull=True)
Expand Down
5 changes: 0 additions & 5 deletions djangoproject/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@
"django_hosts.middleware.HostsResponseMiddleware",
]

PASSWORD_HASHERS = [
"django.contrib.auth.hashers.PBKDF2PasswordHasher",
"accounts.hashers.PBKDF2WrappedSHA1PasswordHasher",
]

ROOT_URLCONF = "djangoproject.urls.www"

SECRET_KEY = str(SECRETS["secret_key"])
Expand Down
2 changes: 1 addition & 1 deletion requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ django-push @ git+https://github.com/brutasse/django-push.git@22fda99641cfbd2f30
django-read-only==1.18.0
django-recaptcha==4.0.0
django-registration-redux==2.13
Django==5.0.11
Django==5.1.5
docutils==0.21.2
feedparser==6.0.11
Jinja2==3.1.5
Expand Down
Loading