[Python-modules-commits] [python-django] 02/03: Add numpy 1.9 support

Brian May bam at moszumanska.debian.org
Mon Oct 12 01:38:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

bam pushed a commit to branch debian/sid
in repository python-django.

commit cdf0cc9f72f1847763290c018038990b3bcec4c1
Author: Brian May <bam at debian.org>
Date:   Mon Oct 12 12:16:13 2015 +1100

    Add numpy 1.9 support
    
    From upstream:
    https://github.com/django/django/commit/12809e160995eb617fe394c75e5b9f3211c056ff
    
    Closes: #801554
---
 django/template/base.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/django/template/base.py b/django/template/base.py
index 822e026..25008d5 100644
--- a/django/template/base.py
+++ b/django/template/base.py
@@ -762,7 +762,9 @@ class Variable(object):
             for bit in self.lookups:
                 try:  # dictionary lookup
                     current = current[bit]
-                except (TypeError, AttributeError, KeyError, ValueError):
+                    # ValueError/IndexError are for numpy.array lookup on
+                    # numpy < 1.9 and 1.9+ respectively
+                except (TypeError, AttributeError, KeyError, ValueError, IndexError):
                     try:  # attribute lookup
                         # Don't return class attributes if the class is the context:
                         if isinstance(current, BaseContext) and getattr(type(current), bit):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django.git



More information about the Python-modules-commits mailing list