﻿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
23651	fixtures.tests.FixtureLoadingTests.test_loading_and_dumping fails with Python 3	Raphaël Hertzog	nobody	"When running the test suite with Python 3.4.2 you get this error:

{{{
======================================================================
FAIL: test_loading_and_dumping (fixtures.tests.FixtureLoadingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/«PKGBUILDDIR»/tests/fixtures/tests.py"", line 170, in test_loading_and_dumping
    self.assertEqual(len(w), 0)
AssertionError: 1 != 0
}}}

The failing code is this:
{{{
        # An attempt to load a nonexistent 'initial_data' fixture isn't an error
        with warnings.catch_warnings(record=True) as w:
            management.call_command('loaddata', 'initial_data.json', verbosity=0)
        self.assertEqual(len(w), 0)
}}}

It seems that the code is generating a RemovedInDjango19Warning warning about deprecation of initial_data fixtures:

From django/core/management/commands/loaddata.py line 297:
{{{
        elif fixture_name == 'initial_data' and fixture_files:
            warnings.warn(
                'initial_data fixtures are deprecated. Use data migrations instead.',
                RemovedInDjango19Warning
            )
}}}

It's not clear why this test only started failing recently, it might related to a change between Python 3.4.1 and 3.4.2 but I could not identify which one.

This bug has been initially reported in Debian: http://bugs.debian.org/765117 and Brian May did the initial investigation that I report here. Thank you for your help."	Bug	closed	Core (Management commands)	1.7	Normal	fixed			Accepted	1	0	0	0	0	0
