﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20548	Deprecation warnings when running the test suite	Aymeric Augustin	nobody	"When running the test suite with:
{{{
cd tests; PYTHONPATH=.. python3.3 -Wd runtests.py --settings=test_sqlite
}}}
the following warnings are displayed at compile time:
{{{
django/contrib/comments/__init__.py:9: PendingDeprecationWarning: django.contrib.comments is deprecated and will be removed before Django 1.8.
  warnings.warn(""django.contrib.comments is deprecated and will be removed before Django 1.8."", PendingDeprecationWarning)
tests/model_forms_regress/tests.py:96: PendingDeprecationWarning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form PartiallyLocalizedTripleForm needs updating
  class PartiallyLocalizedTripleForm(forms.ModelForm):
tests/model_forms_regress/tests.py:102: PendingDeprecationWarning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form FullyLocalizedTripleForm needs updating
  class FullyLocalizedTripleForm(forms.ModelForm):
django/test/_doctest.py:57: PendingDeprecationWarning: The django.test._doctest module is deprecated; use the doctest module from the Python standard library instead.
  PendingDeprecationWarning)
django/test/simple.py:24: PendingDeprecationWarning: The django.test.simple module and DjangoTestSuiteRunner are deprecated; use django.test.runner.DiscoverRunner instead.
  PendingDeprecationWarning)
}}}
and the following warnings are displayed at runtime:
{{{
/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/unittest/case.py:135: PendingDeprecationWarning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form Form needs updating
  callable_obj(*args, **kwargs)
tests/forms_tests/tests/tests.py:223: PendingDeprecationWarning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form Form needs updating
  self.assertTrue(issubclass(ModelFormMetaclass(str('Form'), (ModelForm,), {'Meta': Meta}), ModelForm))
django/db/models/base.py:418: ResourceWarning: unclosed <socket.socket object, fd=9, family=2, type=1, proto=0>
  super(Model, self).__init__()
}}}


There's also fourteen `ResourceWarning: unclosed file ...` warnings from the form wizard tests which I haven't copied.

----

The one in django.contrib.comments is tracked in #20065.

The fourteen in django.contrib.formtools are tracked in #19905.

I don't know where the one in django.db comes from. That's hard to guess without turning it into an exception.

The two in django.test were discussed in #20503; I'm still seeing them with latest master.

All the others are most likely a consequence of #19733.

----

Since I'd like the test suite to run without deprecation warnings in the 1.6 release, I'm filing this ticket to drive some attention to this issue."	Bug	closed	Testing framework	dev	Release blocker	fixed			Accepted	0	0	0	0	0	0
