[Django] #21551: 1.6 regression: Can't load fixtures from subdir

41 views
Skip to first unread message

Django

unread,
Dec 2, 2013, 7:02:16 PM12/2/13
to django-...@googlegroups.com
#21551: 1.6 regression: Can't load fixtures from subdir
--------------------------------------------+------------------------------
Reporter: jonash | Owner: nobody
Type: Bug | Status: new
Component: Core (Management commands) | Version: 1.6
Severity: Normal | Keywords: loaddata,
Triage Stage: Unreviewed | fixtures
Easy pickings: 0 | Has patch: 0
| UI/UX: 0
--------------------------------------------+------------------------------
Consider this fixture directory (added to `FIXTURE_DIRS`):

{{{
- fixtures/
+ initial_data.json
+ tests/
- initial_data_inner.json
}}}

Loading the outer fixture works:

{{{
$ ./manage.py loaddata initial_data
Installed 3 object(s) from 1 fixture(s)
}}}

The inner does not:

{{{
$ ./manage.py loaddata initial_data_inner
…site-packages/django/core/management/commands/loaddata.py:218:
UserWarning: No fixture named 'initial_data_inner' found.
warnings.warn("No fixture named '%s' found." % fixture_name)

Installed 0 object(s) from 0 fixture(s)

$ ./manage.py loaddata tests/initial_data_inner
…site-packages/django/core/management/commands/loaddata.py:218:
UserWarning: No fixture named 'initial_data_inner' found.
warnings.warn("No fixture named '%s' found." % fixture_name)

Installed 0 object(s) from 0 fixture(s)
}}}

This used to work in Django 1.5.

The cause of this is that all fixture names that contain an `os.path.sep`
are considered absolute paths in the `loaddata` management command.

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

Django

unread,
Dec 3, 2013, 8:46:40 AM12/3/13
to django-...@googlegroups.com
#21551: 1.6 regression: Can't load fixtures from subdir
-------------------------------------+-------------------------------------

Reporter: jonash | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: 1.6
commands) | Resolution:
Severity: Release blocker | Triage Stage:
Keywords: loaddata, fixtures | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* severity: Normal => Release blocker
* needs_tests: => 0
* needs_docs: => 0


Comment:

Marking as a release blocker since it's a regression.

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

Django

unread,
Dec 5, 2013, 8:14:33 AM12/5/13
to django-...@googlegroups.com
#21551: 1.6 regression: Can't load fixtures from subdir
-------------------------------------+-------------------------------------

Reporter: jonash | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: 1.6
commands) | Resolution:
Severity: Release blocker | Triage Stage: Accepted
Keywords: loaddata, fixtures | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timo):

* stage: Unreviewed => Accepted


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

Django

unread,
Dec 5, 2013, 5:10:09 PM12/5/13
to django-...@googlegroups.com
#21551: 1.6 regression: Can't load fixtures from subdir
-------------------------------------+-------------------------------------

Reporter: jonash | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: 1.6
commands) | Resolution:
Severity: Release blocker | Triage Stage: Accepted
Keywords: loaddata, fixtures | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0

Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/2036
This issue is partially related to #20933.

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

Django

unread,
Dec 7, 2013, 4:48:04 AM12/7/13
to django-...@googlegroups.com
#21551: 1.6 regression: Can't load fixtures from subdir
-------------------------------------+-------------------------------------
Reporter: jonash | Owner: nobody
Type: Bug | Status: closed

Component: Core (Management | Version: 1.6
commands) | Resolution: fixed

Severity: Release blocker | Triage Stage: Accepted
Keywords: loaddata, fixtures | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"41ebc4838d2b09e7f3ece8889e21492902b55dc8"]:
{{{
#!CommitTicketReference repository=""
revision="41ebc4838d2b09e7f3ece8889e21492902b55dc8"
Fixed #21551 -- Reenabled loading fixtures from subdirectory

This was a regression in Django 1.6 that was only partially
restored in 839940f27f.
Thanks Jonas Haag for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21551#comment:4>

Django

unread,
Dec 7, 2013, 4:49:19 AM12/7/13
to django-...@googlegroups.com
#21551: 1.6 regression: Can't load fixtures from subdir
-------------------------------------+-------------------------------------
Reporter: jonash | Owner: nobody

Type: Bug | Status: closed
Component: Core (Management | Version: 1.6
commands) | Resolution: fixed
Severity: Release blocker | Triage Stage: Accepted
Keywords: loaddata, fixtures | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"45c0d2e1ce0fe024e4a80c9dde8263f5ff59d577"]:
{{{
#!CommitTicketReference repository=""
revision="45c0d2e1ce0fe024e4a80c9dde8263f5ff59d577"
[1.6.x] Fixed #21551 -- Reenabled loading fixtures from subdirectory

This was a regression in Django 1.6 that was only partially
restored in 839940f27f.
Thanks Jonas Haag for the report.

Backport of 41ebc4838d from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21551#comment:5>

Reply all
Reply to author
Forward
0 new messages