Fix Django 5.0+ deprecation warnings for Django 5.2 LTS upgrade#135
Fix Django 5.0+ deprecation warnings for Django 5.2 LTS upgrade#135subinita01 wants to merge 4 commits intocytoscape:masterfrom
Conversation
…2+ compatibility)
|
Did python manage.py test succeed? |
|
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! |
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
USE_L10Nsetting (deprecated since Django 5.0,localized formatting is now always enabled)
USE_TZ = Falsesetting 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