-
Notifications
You must be signed in to change notification settings - Fork 261
[REF] Deprecate kw_only_meth/func decorators #848
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
Uses built-in Python kw-only syntax (*) instead.
Codecov Report
@@ Coverage Diff @@
## master #848 +/- ##
==========================================
- Coverage 90.09% 90.07% -0.02%
==========================================
Files 98 98
Lines 12452 12428 -24
Branches 2190 2190
==========================================
- Hits 11219 11195 -24
Misses 883 883
Partials 350 350
Continue to review full report at Codecov.
|
Also, in case it needs to be said: this is very low priority and can just hang out until after the 3.0 release! I just had a few minutes and though I'd get it off my to-do list 😅 |
Since this is part of the API, I'm afraid it will need to go through a deprecation cycle. Have a look at: Lines 1 to 10 in fcc5448
nibabel/nibabel/tests/test_removalschedule.py Lines 4 to 9 in fcc5448
|
Gotcha! Do you have a preference for what version to list for deprecation? I'm assuming 4.0.0 based on what's currently listed. |
I think we usually go +2 major versions, so let's say 5.0. |
Marked for removal in version 5.0.0
Thanks! |
Closes #841.
This is a minor update, but it removes a bit of custom code (the
nibabel.keywordonly
module) forcing methods/functions to have a pre-specified number of positional arguments and instead uses the Python 3.x*
argument to achieve the same performance.I haven't added any additional tests to check that the
*
argument performs identically to the decorators sincetest_keywordonly.py
was only testing the decorators themselves (and not the functions they wrapped)—and those functions are now removed—but let me know if you'd like to see something explicit!