Marshmallow: Marshmallow warnings.py not Python 2 compatible from version 2.18.0

Created on 9 Aug 2019  路  2Comments  路  Source: marshmallow-code/marshmallow

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.

bug

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. 馃槃

All 2 comments

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!

Was this page helpful?
0 / 5 - 0 ratings