Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#30938 closed Bug (invalid)

DEFAULT_CONTENT_TYPE django.utils.deprecation.RemovedInDjango30Warning.

Reported by: אורי Owned by: nobody
Component: HTTP handling Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm upgrading Django from 1.11 to 2.2 in Speedy Net. I noticed that if I run make_migrations with deprecation warnings (./manage_all_sites_with_deprecation_warnings.sh make_migrations), I receive the following error message (with Django 2.2):

django.utils.deprecation.RemovedInDjango30Warning: The DEFAULT_CONTENT_TYPE setting is deprecated.

Although I checked, and we don't use DEFAULT_CONTENT_TYPE anywhere in our project. It's only used in Django.

You can see this job for example (with Python 3.5). If you check the jobs for Python 3.6 and 3.7, there is another deprecation warning because of distutils which is used by Django. This is since Django version 2.0. In Django 1.11 there are no deprecation warnings with Python 3.5 and 3.6 (but there is one with Python 3.7).

Change History (3)

comment:1 by Mariusz Felisiak, 4 years ago

Component: UncategorizedHTTP handling
Resolution: invalid
Status: newclosed
Summary: DEFAULT_CONTENT_TYPE django.utils.deprecation.RemovedInDjango30WarningDEFAULT_CONTENT_TYPE django.utils.deprecation.RemovedInDjango30Warning.
Type: UncategorizedBug

DEFAULT_CONTENT_TYPE is used by sorl-thumbnail (see issues#589). Please don't use trac as a support channel.

Closing per TicketClosingReasons/UseSupportChannels.

comment:2 by אורי, 4 years ago

$ git bisect run python -W error::DeprecationWarning ../speedy-net/speedy/net/tests_manage.py test speedy.core.accounts.tests.test_models.UserEnglishTestCase

99d4fc18bdb8110147165531d348be53529eece5 is the first bad commit
commit 99d4fc18bdb8110147165531d348be53529eece5
Author: Jon Dufresne <jon.dufresne@…>
Date: Mon Oct 15 11:46:35 2018 -0700

Refs #27829 -- Added warning for settings.DEFAULT_CONTENT_TYPE usage outside of Django.

:040000 040000 7accc492ad16abdc78e76889906e65d0ed3743b2 16519246f31eabef79895b3c84ea418ffaf5ebc0 M django
:040000 040000 3ced083a23d19172fb1d08d3cf3f0cea12863e02 ec67a170d7a443f8d9c65780c5a6012f8dbf8ad1 M tests
bisect run success

in reply to:  1 comment:3 by אורי, 4 years ago

Replying to felixxm:

DEFAULT_CONTENT_TYPE is used by sorl-thumbnail (see issues#589). Please don't use trac as a support channel.

Closing per TicketClosingReasons/UseSupportChannels.

I thought it was a bug of Django and I was not aware that one of our requirements uses DEFAULT_CONTENT_TYPE. Sorry.

Note: See TracTickets for help on using tickets.
Back to Top