-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
DEP: lib: Remove the deprecated financial functions. #17067
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
Conversation
314160f to
2558224
Compare
|
Happy to do this. We could also go through an additional Lets sign it off in the meeting today (technically, its already accepted so...). |
|
Another option: replace the functions with stubs that just raise |
|
Hmm, the error idea is indeed maybe a bit gentler and only leaves like 50 lines of code probably. Too bad we can't put it directly on |
numpy/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit for consistency with the code below:
| raise AttributeError(msg) | |
| except KeyError: | |
| pass | |
| except KeyError: | |
| pass | |
| else: | |
| raise AttributeError(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in an update.
eric-wieser
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thinking on using __getattr__. Maybe worth a test for this - checking that NEP 32 appears in the error message for just np.fv would be plenty.
|
More than one person suggested using the module For example, In Python 3.6, a plain This adds a bit more overhead when accessing the |
|
@WarrenWeckesser thanks, it doesn't actually add additional overhead. The |
|
@seberg, thanks, that's good to know. |
As explained in NEP 32, the financial functions are to be removed from version 1.20.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just put this into numpy/tests/test_public_api.py? Although, that file is mostly complex tests, so I don't care much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that, but test_public_api.py seems to have a specific purpose in maintaing the "standard" numpy API. This new test doesn't seem to fit there. It didn't fit well anywhere, so I just put it into its own file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough :).
ce297c5 to
432f366
Compare
432f366 to
5aaf9e6
Compare
|
Thanks, Warren, pretty amazing to see this actually finished! Now I just wonder how much fallout we will see ;). |
As explained in NEP 32, the financial functions are to be removed
from version 1.20.