EMS-TU-Ilmenau / fastmat

A library to build up lazily evaluated expressions of linear transforms for efficient scientific computing.
https://fastmat.readthedocs.io
Apache License 2.0
24 stars 8 forks source link

Specifying unprocessed keyworded arguments to an __init__ should raise a warning #79

Closed ChristophWWagner closed 4 years ago

ChristophWWagner commented 4 years ago

Since we are refactoring also names of options, this would cause silent breaks due to refactoring if we do not output sensible warnings. Especially since the names of the row and column selection parameters in Partial were changed, this may cause intransparent problems with code using the legacy interface.

Also, the use of the old names should also be allowed a grace period of deprecation warnings.

ChristophWWagner commented 4 years ago

After closer investigation, it turns out it is sufficient to patch Partial to produce FutureWarnings. Implementing warnings when __init__ parameters are not collected will cause multiple false-polsitive warnings since the kwargs are usually passed on to nested class __init__ calls as well