summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel J. Smith <njs@pobox.com>2015-10-26 22:47:54 +0000
committerNathaniel J. Smith <njs@pobox.com>2015-10-26 22:47:54 +0000
commit2962abccf92d8c4cf5552de2add81a460fd31c8a (patch)
treef3413a25e347518578b73f50cd7790f52f78a00e
parentacc9f5729d90d6590b12671745eebe2e88ef231d (diff)
parent83d5f9a331543fa0748708972a5e6b7c5dcbcb03 (diff)
downloadnumpy-2962abccf92d8c4cf5552de2add81a460fd31c8a.tar.gz
Merge pull request #6567 from charris/fix-f2py-imports
BUG: Revert some import * fixes in 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 = {}