Skip to content

Add support for Django 5.2 - #332

Merged
feanil merged 2 commits into
openedx:masterfrom
hinakhadim:django52support
Apr 29, 2025
Merged

feanil merged 2 commits into
openedx:masterfrom
hinakhadim:django52support

Conversation

@hinakhadim

@hinakhadim hinakhadim commented Apr 17, 2025 •

Copy link
Copy Markdown
Contributor

Add Django 5.2 Support

This PR updates the codebase to be compatible with Django 5.2 while maintaining compatibility with Django 4.2.

Changes Made:

  • Update ci and tox files
  • Ran django-upgrade to apply necessary syntax updates for Django 5.2.
  • Run tests using tox command and resolved the warning
  • Ensured all modifications remain backward-compatible with Django 4.2.

django-upgrade usage:

I ran command git ls-files -z -- '*.py' | xargs -0r django-upgrade --target-version 5.2

Comment thread setup.py
by_canonical_name[canonical] = package
elif seen_spelling != package:
raise Exception(
raise RuntimeError(

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.

Pylint is giving broad-exception Warning on using Exception.

Comment thread pylintrc

[EXCEPTIONS]
overgeneral-exceptions = Exception
overgeneral-exceptions = builtins.Exception

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.

Updating it because pylint was giving warning on this. pylint: Command line or configuration file:1: UserWarning: 'Exception' is not a proper value for the 'overgeneral-exceptions' option. Use fully qualified name (maybe 'builtins.Exception' ?) instead. This will cease to be checked at runtime when the configuration upgrader is released

@awais786

Copy link
Copy Markdown
Contributor

@feanil Please review.

@feanil
feanil merged commit 6bf1c1b into openedx:master Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Django 5.2 support to api-doc-tools

3 participants