Skip to content

Upgrade to Python 3.13 and Django 6#125

Open
delitamakanda wants to merge 5 commits intomasterfrom
codex/update-project-to-python-1.13-and-django-6
Open

Upgrade to Python 3.13 and Django 6#125
delitamakanda wants to merge 5 commits intomasterfrom
codex/update-project-to-python-1.13-and-django-6

Conversation

@delitamakanda
Copy link
Copy Markdown
Owner

Summary

  • bump the stack to Python 3.13/Django 6 and refresh dependency versions to match
  • modernize project settings for Django 6 (pathlib paths, timezone handling, whitenoise storage, updated CORS configuration)
  • update URL routing to modern path/re_path usage and refresh documentation for the new runtime

Testing

  • Not run (environment not yet configured for Python 3.13/Django 6 dependencies)

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread myelearning/settings.py
BASE_DIR / 'static',
)

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Replace removed STATICFILES_STORAGE in Django 6

The settings now declare STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage', but requirements pin the project to Django >=6.0a1. Django 6 removes the legacy STATICFILES_STORAGE/DEFAULT_FILE_STORAGE settings in favor of the STORAGES mapping, so keeping this line causes startup/staticfiles initialization to fail and prevents WhiteNoise from being used. Configure the STORAGES['staticfiles'] backend instead to keep the app running on the new Django version.

Useful? React with 👍 / 👎.

@delitamakanda
Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

- Keep Django 6 requirements from PR branch (supersedes master's 4.2.30 bumps)
- Update CI workflow Python version to 3.13 (aligns with the upgrade goal)

Co-authored-by: delitamakanda <9744074+delitamakanda@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts in commit 5a3faee. The conflicts were in requirements.txt and requirements-dev.txt where master had incremental == version pins (Django 4.2.30, pandas 1.4.4, etc.) that conflicted with the PR's Django 6 >= constraints. Kept the PR's Django 6 versions since they supersede master's bumps. Also updated the CI workflow's Python version to 3.13 (master had bumped it to 3.10).

@delitamakanda
Copy link
Copy Markdown
Owner Author

@copilot downgrade django-embed-video to 1.4.10

Agent-Logs-Url: https://github.com/delitamakanda/elearning/sessions/8c7d1cdb-5d5a-4c6a-a7d0-428c58b8f215

Co-authored-by: delitamakanda <9744074+delitamakanda@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

@copilot downgrade django-embed-video to 1.4.10

Done in commit 23fef1fdjango-embed-video is now pinned to 1.4.10 in both requirements.txt and requirements-dev.txt.

@delitamakanda delitamakanda self-assigned this May 4, 2026
@delitamakanda
Copy link
Copy Markdown
Owner Author

@copilot downgrade python3-memcached to 1.51

Agent-Logs-Url: https://github.com/delitamakanda/elearning/sessions/730cc001-069c-432e-b5d3-3ec21d735874

Co-authored-by: delitamakanda <9744074+delitamakanda@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

@copilot downgrade python3-memcached to 1.51

Done in commit 331ae57python3-memcached is now pinned to 1.51 in both requirements.txt and requirements-dev.txt.

@delitamakanda
Copy link
Copy Markdown
Owner Author

@copilot
django-taggit-serializer not supported anymore what equivalent should you code ?

…nd TaggitSerializer

Agent-Logs-Url: https://github.com/delitamakanda/elearning/sessions/00a5534c-f903-4450-8799-edaeabb86786

Co-authored-by: delitamakanda <9744074+delitamakanda@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

@copilot
django-taggit-serializer not supported anymore what equivalent should you code ?

Done in commit f9cf2b9. Since django-taggit-serializer is abandoned and has no active replacement on PyPI, I implemented the equivalent directly in apps/common/serializers.py:

  • TagListSerializerField – a DRF Field that serializes a TaggableManager as a flat list of tag name strings, and accepts both a list or a comma-separated string on write.
  • TaggitSerializer – a mixin for ModelSerializer that auto-detects TagListSerializerField fields and calls TaggableManager.set(tags) after create/update.

Usage going forward:

from apps.common.serializers import TaggitSerializer, TagListSerializerField

class MySerializer(TaggitSerializer, serializers.ModelSerializer):
    tags = TagListSerializerField()
    ...

taggit_serializer has also been removed from INSTALLED_APPS and django-taggit-serializer dropped from both requirements files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants