Skip to content

Fix Django 5.0+ deprecation warnings for Django 5.2 LTS upgrade#135

Open
subinita01 wants to merge 4 commits intocytoscape:masterfrom
subinita01:django-5.2-upgrade
Open

Fix Django 5.0+ deprecation warnings for Django 5.2 LTS upgrade#135
subinita01 wants to merge 4 commits intocytoscape:masterfrom
subinita01:django-5.2-upgrade

Conversation

@subinita01
Copy link
Copy Markdown

Summary

This PR fixes deprecation warnings that appear when running the AppStore
with Django 5.0+ as part of the Django 5.2 LTS migration effort.

Changes

  • Removed deprecated USE_L10N setting (deprecated since Django 5.0,
    localized formatting is now always enabled)
  • Added explicit USE_TZ = False setting to maintain current behavior
    (Django 5.0+ defaults USE_TZ to True)

Testing

Verified no deprecation warnings with:
python -W all manage.py check --settings=settings.production

@coleslaw481
Copy link
Copy Markdown
Contributor

Did python manage.py test succeed?

@subinita01
Copy link
Copy Markdown
Author

Hi Chris,

Yes, I made sure to run the full make test / python manage.py test suite against my updated settings/base.py locally in my WSL2/Ubuntu environment.

I was also anticipating a lot of breaking changes with the jump to 5.0+, but after fixing the USE_L10N and USE_TZ deprecations, all 74 unit tests pass successfully. It seems the test suite's coverage of the app doesn't currently rely on any of the other deprecated Django 4.x features!

(note: I noticed that if someone tries to run the test suite natively on Windows, 4 tests fail because of FileNotFoundError on the unzip subprocess and os.path.join backslash issues. They pass perfectly on WSL/Linux, but I'd be happy to open a separate minor PR to fix those cross-platform test bugs if you want native Windows support for future contributors!)

Let me know if you’d like me to check any specific un-tested edge cases manually, otherwise, this should be good to go for Django 5.2!

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.

2 participants