From 7f5af37e26ba2e99ad3ee6928b78437f601e96e0 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Thu, 11 Apr 2013 14:31:52 -0600 Subject: 2to3: Apply the `numliterals` fixer and skip the `long` fixer. The numliterals fixer replaces the old style octal number like '01' by '0o1' removes the 'L' suffix. Octal values were previously mistakenly specified in some dates, those uses have been corrected by removing the leading zeros. Simply Removing the 'L' suffix should not be a problem, but in some testing code it looks neccesary, so in those places the Python long constructor is used instead. The 'long' type is no longer defined in Python 3. Because we need to have it defined for Python 2 it is added to numpy/compat/np3k.py where it is defined as 'int' for Python 3 and 'long' for Python 2. The `long` fixer then needs to be skipped so that it doesn't undo the good work. Closes #3074, #3067. --- numpy/core/defchararray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/defchararray.py') diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index d5acb1e97..874a295ef 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -22,7 +22,7 @@ from .numerictypes import string_, unicode_, integer, object_, bool_, character from .numeric import ndarray, compare_chararrays from .numeric import array as narray from numpy.core.multiarray import _vec_string -from numpy.compat import asbytes +from numpy.compat import asbytes, long import numpy __all__ = ['chararray', -- cgit v1.2.1