File "/home/tim/code/django/tests/template_tests/tests.py", line 596, in
test_templates
output = self.render(test_template, vals)
File "/home/tim/code/django/tests/template_tests/tests.py", line 622, in
render
output = test_template.render(context)
File "/home/tim/code/django/django/template/base.py", line 150, in
render
return self._render(context)
File "/home/tim/code/django/django/test/utils.py", line 89, in
instrumented_test_render
return self.nodelist.render(context)
File "/home/tim/code/django/django/template/base.py", line 853, in
render
bit = self.render_node(node, context)
File "/home/tim/code/django/django/template/debug.py", line 80, in
render_node
return node.render(context)
File "/home/tim/code/django/django/template/debug.py", line 90, in
render
output = self.filter_expression.resolve(context)
File "/home/tim/code/django/django/template/base.py", line 598, in
resolve
obj = self.var.resolve(context)
File "/home/tim/code/django/django/template/base.py", line 739, in
resolve
value = self._resolve_lookup(context)
File "/home/tim/code/django/django/template/base.py", line 769, in
_resolve_lookup
current = current[bit]
IndexError: index 5 is out of bounds for axis 0 with size 2
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23489>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
Comment:
Here is the change in behavior:
NumPy < 1.9
{{{
>>> numpy.array(["first item", "second item"])['2']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: field named 2 not found
}}}
NumPy 1.9+
{{{
>>> numpy.array(["first item", "second item"])['2']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: index 2 is out of bounds for axis 0 with size 2
}}}
Attaching a patch to fix it. I guess we shouldn't backport, but require
specific version of test dependencies in Jenkins as suggested in #21793.
The original issue where these tests were added: [7d5e35cd].
--
Ticket URL: <https://code.djangoproject.com/ticket/23489#comment:1>
Comment (by Tim Graham <timograham@…>):
In [changeset:"4743a944295faccb494e31b7a805499bad2cedaa"]:
{{{
#!CommitTicketReference repository=""
revision="4743a944295faccb494e31b7a805499bad2cedaa"
[1.7.x] Required numpy < 1.9 for tests; refs #23489.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23489#comment:2>
Comment (by Tim Graham <timograham@…>):
In [changeset:"011541d948dac99100940e974f5cf243199be534"]:
{{{
#!CommitTicketReference repository=""
revision="011541d948dac99100940e974f5cf243199be534"
[1.6.x] Required numpy < 1.9 for tests; refs #23489.
Backport of 4743a94429 from stable/1.7.x
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23489#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"df657a768248c07fdbdc950b08366f655d0f2f5d"]:
{{{
#!CommitTicketReference repository=""
revision="df657a768248c07fdbdc950b08366f655d0f2f5d"
[1.4.x] Required numpy < 1.9 for tests; refs #23489.
Backport of 4743a94429 from stable/1.7.x
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23489#comment:4>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"12809e160995eb617fe394c75e5b9f3211c056ff"]:
{{{
#!CommitTicketReference repository=""
revision="12809e160995eb617fe394c75e5b9f3211c056ff"
Fixed #23489 -- Added numpy 1.9+ support in template lookups
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23489#comment:5>