Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DEFAULT_FILE_STORAGE/STATICFILES_STORAGE in django 4.2 #256

Merged
merged 4 commits into from
Jan 28, 2024

Conversation

yakky
Copy link
Member

@yakky yakky commented Dec 30, 2023

Description

Describe:

DEFAULT_FILE_STORAGE / STATICFILES_STORAGE are deprecated on django 4.2+

When using pytest-django (and in other circumstances) django settings are basically evaluated twice: one when triggering app_helper.utils._make_settings and one by pytest-django.

Adding legacy and new settings in the exclusion list in pytest compatibility function, we ensure only one setting is evaluated

References

Fix #255

Checklist

  • I have read the contribution guide
  • Code lint checked via inv lint
  • changes file included (see docs)
  • Usage documentation added in case of new features
  • Tests added

@yakky yakky requested a review from protoroto December 30, 2023 16:57
@yakky yakky force-pushed the bugfix/issue-255-storage branch from 67e6636 to a426cde Compare December 30, 2023 17:00
Copy link

codecov bot commented Dec 30, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (8adb36e) 92.24% compared to head (b1bf4ee) 92.30%.

Files Patch % Lines
app_helper/utils.py 96.42% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #256      +/-   ##
===========================================
+ Coverage    92.24%   92.30%   +0.06%     
===========================================
  Files           10       10              
  Lines          799      806       +7     
  Branches       126      126              
===========================================
+ Hits           737      744       +7     
  Misses          24       24              
  Partials        38       38              
Flag Coverage Δ
unittests 92.30% <96.55%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yakky yakky force-pushed the bugfix/issue-255-storage branch from a426cde to 20f9f4d Compare December 30, 2023 17:02
@yakky yakky changed the title Drop DEFAULT_FILE_STORAGE/STATICFILES_STORAGE in django 4.2 Fix DEFAULT_FILE_STORAGE/STATICFILES_STORAGE in django 4.2 Dec 31, 2023
@yakky yakky marked this pull request as draft December 31, 2023 14:06
@yakky yakky marked this pull request as ready for review January 26, 2024 23:23
@yakky yakky merged commit e7a6d40 into develop Jan 28, 2024
113 of 139 checks passed
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.

DEFAULT_FILE_STORAGE/STORAGES are mutually exclusive exception on django 4.2+
2 participants