Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#23890 closed Cleanup/optimization (fixed)

Deprecation warning with numpy 1.8+

Reported by: Tim Graham Owned by: nobody
Component: Template system Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

$ python -Wall runtests.py template_tests

django/template/base.py:770: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  current = current[bit]

Change History (4)

comment:1 by Tim Graham, 10 years ago

It looks like if the current string based lookup fails with any of the caught exceptions (TypeError, AttributeError, KeyError, ValueError, IndexError), then we'll fall back to trying integer based lookup which should work. I'll just silence the deprecation warnings in our tests for now.

comment:2 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In d43dd03ca3afecc27f43fbc932f239470a2f07db:

Fixed #23890 -- Silenced numpy DeprecationWarnings in template tests.

comment:3 by Tim Graham <timograham@…>, 10 years ago

In 3bb52c50193bdfaa56134d055f067d1dfe302158:

Refs #23890 -- Restored silencing of numpy DeprecationWarnings in template tests.

comment:4 by Tim Graham <timograham@…>, 7 years ago

In a917a560:

Refs #23890 -- Removed numpy deprecation warning silencing.

Obsolete since numpy 1.12.0.

Note: See TracTickets for help on using tickets.
Back to Top