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

feat: migration from 2.2 -> 3.2 -> 4.2 #2413

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
22 changes: 11 additions & 11 deletions base-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dj-database-url==0.5.0
django-pipeline==2.0.6
django-sitetree==1.17.0
django-pipeline==3.0.0 # 3.0.0 is first version that supports Django 4.2
django-sitetree==1.18.0 # >=1.17.1 is (?) first version that supports Django 4.2
JacobCoffee marked this conversation as resolved.
Show resolved Hide resolved
django-apptemplates==1.5
django-admin-interface==0.24.2
django-translation-aliases==0.1.0
Django==3.2.24
Django==4.2.11
docutils==0.12
Markdown==3.3.4
cmarkgfm==0.6.0
Expand All @@ -22,32 +22,32 @@ chardet==4.0.0
celery[redis]==5.3.6
django-celery-beat==2.5.0
# TODO: We may drop 'django-imagekit' completely.
django-imagekit==4.0.2
django-imagekit==5.0 # 5.0 is first version that supports Django 4.2
django-haystack==3.2.1
elasticsearch>=7,<8
# TODO: 0.14.0 only supports Django 1.8 and 1.11.
django-tastypie==0.14.3
django-tastypie==0.14.6 # 0.14.6 is first version that supports Django 4.2

pytz==2021.1
python-dateutil==2.8.2

requests[security]>=2.26.0

django-honeypot==1.0.1
django-markupfield==2.0.0
django-markupfield-helpers==0.1.1
django-honeypot==1.0.4 # 1.0.4 is first version that supports Django 4.2
django-markupfield==2.0.1
# django-markupfield-helpers==0.1.1 # this hasnt been moved out of alpha and is last published 2018, we do import it
JacobCoffee marked this conversation as resolved.
Show resolved Hide resolved

django-allauth==0.41.0
django-allauth==0.61.1 # 0.55.0 is first version that supports Django 4.2
ewdurbin marked this conversation as resolved.
Show resolved Hide resolved

django-waffle==2.2.1

djangorestframework==3.12.2
djangorestframework==3.14.0 # 3.14.0 is first version that supports Django 4.1, 4.2 support hasnt been "released"
django-filter==2.4.0
django-ordered-model==3.4.3
django-widget-tweaks==1.4.8
django-countries==7.2.1
num2words==0.5.10
django-polymorphic==3.0.0
django-polymorphic==3.1.0 # 3.1.0 is first version that supports Django 4.0, unsure if it fully supports 4.2
sorl-thumbnail==12.7.0
django-extensions==3.1.4
django-import-export==2.7.1
Expand Down
15 changes: 14 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
version: "3.9"

services:
# postgres:
# image: postgres:10-bullseye
# ports:
# - "5433:5432"
# environment:
# POSTGRES_USER: pythondotorg
# POSTGRES_PASSWORD: pythondotorg
# POSTGRES_DB: pythondotorg
# POSTGRES_HOST_AUTH_METHOD: trust # never do this in production!
# healthcheck:
# test: ["CMD", "pg_isready", "-U", "pythondotorg", "-d", "pythondotorg"]
# interval: 1s

JacobCoffee marked this conversation as resolved.
Show resolved Hide resolved
postgres:
image: postgres:10-bullseye
image: postgres:12-bullseye # required for 4.2 upgrades
ewdurbin marked this conversation as resolved.
Show resolved Hide resolved
ports:
- "5433:5432"
environment:
Expand Down
4 changes: 2 additions & 2 deletions prod-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ gunicorn==19.9.0
raven==6.10.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's an old one 😄 Not sure it supports Django 4.2, but maybe it's fine... Would be nice to see if we can switch to its successor, sentry-sdk.


# Heroku
Whitenoise==6.0.0 # 6.0.0 is latest version that supports Django 2.2
django-storages==1.12.3 # 1.12.3 is latest version that supports Django 2.2
Whitenoise==6.6.0 # 6.4.0 is first version that supports Django 4.2
django-storages==1.42.2 # 1.42.2 is first version that supports Django 4.2
boto3==1.26.165
1 change: 1 addition & 0 deletions pydotorg/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'pages.middleware.PageFallbackMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'allauth.account.middleware.AccountMiddleware',
JacobCoffee marked this conversation as resolved.
Show resolved Hide resolved
]

AUTH_USER_MODEL = 'users.User'
Expand Down
2 changes: 1 addition & 1 deletion users/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ApiKeyInline(TastypieApiKeyInline):

@admin.register(User)
class UserAdmin(BaseUserAdmin):
inlines = BaseUserAdmin.inlines + [ApiKeyInline, MembershipInline]
inlines = BaseUserAdmin.inlines + (ApiKeyInline, MembershipInline,)
fieldsets = (
(None, {'fields': ('username', 'password')}),
(_('Personal info'), {'fields': (
Expand Down