summaryrefslogtreecommitdiff
path: root/numpy/f2py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-10-26 14:59:57 -0600
committerCharles Harris <charlesr.harris@gmail.com>2015-10-26 15:19:33 -0600
commit83d5f9a331543fa0748708972a5e6b7c5dcbcb03 (patch)
tree2c37032dd00132671bac8545efe91ced9e46c1d8 /numpy/f2py
parent42fefc59a502d1b17873d19f9d60d039e55ccfc4 (diff)
downloadnumpy-83d5f9a331543fa0748708972a5e6b7c5dcbcb03.tar.gz
BUG: Revert some import * fixes in f2py.
The files * capi_maps.py * crackfortran.py * f90mod_rules.py previously used `from .auxfuncs import *` and also called `eval` without an explicit enviroment. An attempt to use explicit imports led to errors, and because static code analysis in not sufficient to determine what functions need to be imported, it is safest to continue using `import *` pending a major refactoring of f2py. Closes #6563.
Diffstat (limited to 'numpy/f2py')
-rw-r--r--numpy/f2py/capi_maps.py16
-rwxr-xr-xnumpy/f2py/crackfortran.py11
-rw-r--r--numpy/f2py/f90mod_rules.py10
3 files changed, 15 insertions, 22 deletions
diff --git a/numpy/f2py/capi_maps.py b/numpy/f2py/capi_maps.py
index 11cd47702..6e5293cc8 100644
--- a/numpy/f2py/capi_maps.py
+++ b/numpy/f2py/capi_maps.py
@@ -22,20 +22,14 @@ import copy
import re
import os
import sys
-from .auxfuncs import (
- debugcapi, dictappend, errmess, gentitle, getcallprotoargument,
- getcallstatement, getfortranname, getpymethoddef, getrestdoc,
- getusercode, getusercode1, hasinitvalue, hasnote, hasresultnote,
- isarray, iscomplex, iscomplexarray, iscomplexfunction, isexternal,
- isfunction, isintent_aux, isintent_callback, isintent_dict,
- isintent_hide, isintent_in, isintent_inout, isintent_out, ismodule,
- isoptional, isrequired, isscalar, isstring, isstringarray,
- isstringfunction, issubroutine, l_and, l_not, l_or, outmess
-)
-
from .crackfortran import markoutercomma
from . import cb_rules
+# The eviroment provided by auxfuncs.py is needed for some calls to eval.
+# As the needed functions cannot be determined by static inspection of the
+# code, it is safest to use import * pending a major refactoring of f2py.
+from .auxfuncs import *
+
__all__ = [
'getctype', 'getstrlength', 'getarrdims', 'getpydocsign',
'getarrdocsign', 'getinit', 'sign2map', 'routsign2map', 'modsign2map',
diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
index 6146e5098..9f8c8962a 100755
--- a/numpy/f2py/crackfortran.py
+++ b/numpy/f2py/crackfortran.py
@@ -149,12 +149,11 @@ import copy
import platform
from . import __version__
-from .auxfuncs import (
- errmess, hascommon, isdouble, iscomplex, isexternal, isinteger,
- isintent_aux, isintent_c, isintent_callback, isintent_in,
- isintent_inout, isintent_inplace, islogical, isoptional, isscalar,
- isstring, isstringarray, l_or, show
-)
+
+# The eviroment provided by auxfuncs.py is needed for some calls to eval.
+# As the needed functions cannot be determined by static inspection of the
+# code, it is safest to use import * pending a major refactoring of f2py.
+from .auxfuncs import *
f2py_version = __version__.version
diff --git a/numpy/f2py/f90mod_rules.py b/numpy/f2py/f90mod_rules.py
index 88d661369..ec3a24839 100644
--- a/numpy/f2py/f90mod_rules.py
+++ b/numpy/f2py/f90mod_rules.py
@@ -21,15 +21,15 @@ f2py_version = 'See `f2py -v`'
import numpy as np
-from .auxfuncs import (
- applyrules, dictappend, hasbody, hasnote, isallocatable, isfunction,
- isintent_hide, ismodule, isprivate, isroutine, isstringarray, l_or,
- outmess
-)
from . import capi_maps
from . import func2subr
from .crackfortran import undo_rmbadname, undo_rmbadname1
+# The eviroment provided by auxfuncs.py is needed for some calls to eval.
+# As the needed functions cannot be determined by static inspection of the
+# code, it is safest to use import * pending a major refactoring of f2py.
+from .auxfuncs import *
+
options = {}