The unused_and_removed_in_ma3 decorator introduced in version 2.18.0 is not Python 2.7 compatible due to absolute import not being used.
To reproduce simply attempt to call a decorated method.
from marshmallow.utils import float_to_decimal
float_to_decimal(12.3)
Expected:
Method executes but logs a RemovedInMarshmallow3Warning
Actual:
AttributeError: 'module' object has no attribute 'warn' is raised.
I was able to reproduce this issue on v2.19.5 with python 2.7.16. I also confirmed that this issue is not present on python 3.7.2. I also noticed this issue number is very #1337. 馃槃
Fix is released in 2.20.0. Thanks for the report and fix!
Most helpful comment
I was able to reproduce this issue on v2.19.5 with python 2.7.16. I also confirmed that this issue is not present on python 3.7.2. I also noticed this issue number is very #1337. 馃槃