Repository navigation
Demo: deprecators - #3346
Demo: deprecators#3346hmaarrfk wants to merge 5 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
|
I gotta admit, that's pretty gorgeous. =) |
This comment has been minimized.
This comment has been minimized.
|
Give me some time, please, I've to check this PR with the Federal Antimonopoly Service. |
|
Regarding making it a dependency, I would simply version what you want from. I don't think scikit-image can afford to depend on an alpha library.... I can give scikit-image an other license for it so they don't have to drag around my license text. I just wanted to show that it is possible, to a certain extent, not have to create long todo lists with confusion default parameters when deprecating things. |
|
Finally, one last thing to note is weather or not you want this kind of "magic". Setting something to Those decorators are not understandable. I can maybe improve that with some refactoring, but ultimately, they rely on python introspection which is essentially magic... Me of 6 months ago would have not understood them. |
|
@hmaarrfk thanks again for this. I want to simplify the upstream code and change some names ("kwonly" sounds pretty wonky to me), but I'm very much leaning in favour of adopting something like this. It would simplify our deprecation procedures. As to the library name, I humbly suggest
|
|
I'm glad to take some simplifications upstream so long as breaking changes to the tests can be justified. Also, I'm hoping that performance doesn't get affected too much by such heavy handed use of decorators. I'm also happy to
Preferably in that order in order to retain the ability to relicense wabisabi later on. If versionning is the way you want to move forward (which I recommend), feel free to issue the PR and CC me so that I can formally agree to giving license over to skimage on that PR. Please open an issue on deprecation-factory for the name change, I'm hoping it won't happen more than once. I won't maintain the old names, hence why I recommend versionning. |
|
@jni, @alexdesiqueira this is the demo that I was talking about regarding how the decorator can be used to basically make the change "once". In version 1.0, you are left with "zombie" decorators that would basically do nothing. |

This is a small demo about how a decorator I wrote could be used to transition to keyword only arguments.
@jni
If i can remember how to compile the docs, I'll try to show how they look in screenshots
But you can read more about the package here
https://deprecation-factory.readthedocs.io/en/latest/index.html
Some advantages of using this would be:
References
#3045 (not exactly related to this particular demo, but the library can deprecate default values)
For reviewers
(Don't remove the checklist below.)
later.
__init__.py.doc/release/release_dev.rst.@meeseeksdev backport to v0.14.x