diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index 3e9a0f3bd..ce2ffb957 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -1142,7 +1142,8 @@ class Boolean(Field): "YES", "1", 1, - True, + # Equal to 1 + # True, } #: Default falsy values. falsy = { @@ -1161,8 +1162,9 @@ class Boolean(Field): "NO", "0", 0, - 0.0, - False, + # Equal to 0 + # 0.0, + # False, } #: Default error messages. diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index 6f15a0f3c..ca4eb082c 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -212,6 +212,7 @@ def __init__(self, meta, ordered: bool = False): warnings.warn( "The json_module class Meta option is deprecated. Use render_module instead.", RemovedInMarshmallow4Warning, + stacklevel=2, ) render_module = getattr(meta, "json_module", json) else: