[Django] #30938: DEFAULT_CONTENT_TYPE django.utils.deprecation.RemovedInDjango30Warning

53 views
Skip to first unread message

Django

unread,
Oct 31, 2019, 1:05:05 PM10/31/19
to django-...@googlegroups.com
#30938: DEFAULT_CONTENT_TYPE django.utils.deprecation.RemovedInDjango30Warning
-----------------------------------------+------------------------
Reporter: אורי | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I'm upgrading Django from 1.11 to 2.2 in [https://github.com/speedy-net
/speedy-net 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 [https://travis-ci.org/speedy-net/speedy-net/jobs/605598271
this job] for example (with Python 3.5). If you check the jobs for Python
[https://travis-ci.org/speedy-net/speedy-net/jobs/605598272 3.6] and
[https://travis-ci.org/speedy-net/speedy-net/jobs/605598273 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
[https://code.djangoproject.com/ticket/30078 one] with Python 3.7).

--
Ticket URL: <https://code.djangoproject.com/ticket/30938>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 31, 2019, 2:58:20 PM10/31/19
to django-...@googlegroups.com
#30938: DEFAULT_CONTENT_TYPE django.utils.deprecation.RemovedInDjango30Warning.
-------------------------------+--------------------------------------
Reporter: אורי | Owner: nobody
Type: Bug | Status: closed
Component: HTTP handling | Version: 2.2
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by felixxm):

* status: new => closed
* component: Uncategorized => HTTP handling
* type: Uncategorized => Bug
* resolution: => invalid


Comment:

`DEFAULT_CONTENT_TYPE` is used by `sorl-thumbnail` (see
[https://github.com/jazzband/sorl-thumbnail/issues/589 issues#589]).
Please don't use trac as a support channel.

Closing per TicketClosingReasons/UseSupportChannels.

--
Ticket URL: <https://code.djangoproject.com/ticket/30938#comment:1>

Django

unread,
Oct 31, 2019, 3:56:45 PM10/31/19
to django-...@googlegroups.com
#30938: DEFAULT_CONTENT_TYPE django.utils.deprecation.RemovedInDjango30Warning.
-------------------------------+--------------------------------------
Reporter: אורי | Owner: nobody

Type: Bug | Status: closed
Component: HTTP handling | Version: 2.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by אורי):

$ 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.du...@gmail.com>
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

--
Ticket URL: <https://code.djangoproject.com/ticket/30938#comment:2>

Django

unread,
Oct 31, 2019, 3:59:15 PM10/31/19
to django-...@googlegroups.com
#30938: DEFAULT_CONTENT_TYPE django.utils.deprecation.RemovedInDjango30Warning.
-------------------------------+--------------------------------------
Reporter: אורי | Owner: nobody

Type: Bug | Status: closed
Component: HTTP handling | Version: 2.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by אורי):

Replying to [comment:1 felixxm]:


> `DEFAULT_CONTENT_TYPE` is used by `sorl-thumbnail` (see
[https://github.com/jazzband/sorl-thumbnail/issues/589 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/30938#comment:3>

Reply all
Reply to author
Forward
0 new messages