diff --git a/numpy/f2py/__init__.py b/numpy/f2py/__init__.py index e34dd99aec1c..1367d01881c1 100644 --- a/numpy/f2py/__init__.py +++ b/numpy/f2py/__init__.py @@ -16,7 +16,7 @@ from numpy.exceptions import VisibleDeprecationWarning -from . import diagnose, f2py2e +from . import f2py2e run_main = f2py2e.run_main main = f2py2e.main diff --git a/numpy/f2py/diagnose.py b/numpy/f2py/diagnose.py index 7eb1697cc787..62013fccdd69 100644 --- a/numpy/f2py/diagnose.py +++ b/numpy/f2py/diagnose.py @@ -2,6 +2,18 @@ import os import sys import tempfile +import warnings + +# NumPy 2.3.0, 2025-05-01 +warnings.warn('The module numpy.f2py.diagnose is deprecated since NumPy 2.3.0.', + DeprecationWarning, + stacklevel=2) + + +def run_command(cmd): + print(f'Running {cmd!r}:') + os.system(cmd) + print('------') def run():