Skip to content

MNT: deprecate numpy.f2py.diagnose (instead of discarding it) #28968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

Revert 4a3cbc4 / #28876.

This module is part of the public API, so it needs to be deprecated before it can be discarded.

I'm not certain how to discard a module imported by __init__.py:

from . import diagnose

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the deprecate_f2py.diagnose branch 2 times, most recently from 2ec686d to 9726764 Compare May 16, 2025 11:33
@mattip
Copy link
Member

mattip commented Jul 20, 2025

Doctests tests are failing. I still see f2py.diagnose in test_public_api.py

This reverts commit 4a3cbc4.

The function is not really unused - it is part of the public API.
Deprecate before discarding.
@DimitriPapadopoulos
Copy link
Contributor Author

f2py.diagnose is in PRIVATE_BUT_PRESENT_MODULES. I understand I should remove it entirely from test_public_api.py. Done.

@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Jul 21, 2025

It looks like f2py.diagnose should remain in PRIVATE_BUT_PRESENT_MODULES / test_public_api.py as long as it is not entirely removed. Otherwise, I get the error message:

            if is_unexpected(modname) and modname not in SKIP_LIST:
                # We have a name that is new.  If that's on purpose, add it to
                # PUBLIC_MODULES.  We don't expect to have to add anything to
                # PRIVATE_BUT_PRESENT_MODULES.  Use an underscore in the name!
                modnames.append(modname)
    
        if modnames:
>           raise AssertionError(f'Found unexpected modules: {modnames}')
E           AssertionError: Found unexpected modules: ['numpy.f2py.diagnose']

_          = FileFinder('/home/runner/work/numpy/numpy/build-install/usr/lib/python3.11/site-packages/numpy')
ispkg      = False
modname    = 'numpy.version'
modnames   = ['numpy.f2py.diagnose']

numpy/tests/test_public_api.py:301: AssertionError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy