Skip to content

chore: support upgrading to django 5.2 - #359

Closed
pomegranited wants to merge 10 commits into
masterfrom
django-5.2
Closed

pomegranited wants to merge 10 commits into
masterfrom
django-5.2

Conversation

@pomegranited

@pomegranited pomegranited commented Apr 3, 2025 •

Copy link
Copy Markdown
Contributor

Description:

Support upgrading to django 5.2 while maintaining django 4.2 compatibility.

  • Ran django-upgrade and updated migration
  • Added django52 target to tox & CI
  • Squashed migrations to get tests passing without index_together
  • Updated setup docs
  • Bumped package version
  • Fixed coverage

See https://discuss.openedx.org/t/django-5-2-upgrade-plan/15397
Closes: #360

Testing instructions:

CI should be sufficient here.

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPi after tag-triggered build is finished.
  • Delete working branch (if not needed anymore)

* Ran django-upgrade and updated migration
* Added django52 target to tox & CI
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @pomegranited!

This repository is currently maintained by @openedx/committers-completion.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 3, 2025
@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Apr 3, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Apr 7, 2025
@pomegranited

Copy link
Copy Markdown
Contributor Author

Hi @irtazaakram , do you happen to have any time available to review this PR? Just looking for a sanity check :)

Comment thread tox.ini Outdated
@@ -1,5 +1,5 @@
[tox]
envlist = drf{314,latest},py{311,312}-django{42}
envlist = drf{314,latest},py{311,312}-django{42,52}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

py{311,312}-django{42,52}-drf{314,latest}, docs, quality

@@ -0,0 +1,23 @@
# Generated by Django 4.2.20 on 2025-04-03 05:37

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you share the SQL this migration generates (sqlmigrate output)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure thing:

--
-- Rename unnamed index for ('user', 'context_key', 'modified') on blockcompletion to completion__user_id_861fe5_idx
--
ALTER TABLE `completion_blockcompletion` RENAME INDEX `completion_blockcompletio_user_id_course_key_modifi_ed54291e_idx` TO `completion__user_id_861fe5_idx`;
--
-- Rename unnamed index for ('context_key', 'block_type', 'user') on blockcompletion to completion__course__c6e6ad_idx
--
ALTER TABLE `completion_blockcompletion` RENAME INDEX `completion_blockcompletio_course_key_block_type_use_0f0d4d2d_idx` TO `completion__course__c6e6ad_idx`;

@pomegranited

Copy link
Copy Markdown
Contributor Author

Thank you @irtazaakram !

@pomegranited

Copy link
Copy Markdown
Contributor Author

Hi @mphilbrick211 , can you help me find a reviewer with write access to approve this PR? It won't let me approve my own PRs :)

@mphilbrick211
mphilbrick211 requested a review from a team April 16, 2025 13:38
@mphilbrick211 mphilbrick211 moved this from Waiting on Author to Ready for Review in Contributions Apr 16, 2025
@mphilbrick211

Copy link
Copy Markdown

@e0d @pkulkark could one of you please review / merge?

@pomegranited

Copy link
Copy Markdown
Contributor Author

Or maybe @irtazaakram , if you're willing to open a new PR with these changes, then I can approve and merge?

@pomegranited

Copy link
Copy Markdown
Contributor Author

Closed in favor of #364

@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in Contributions Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add Django 5.2 support to completion

4 participants