python-desert / desert

Deserialize to objects while staying DRY
https://desert.readthedocs.io
MIT License
158 stars 10 forks source link

Use Marshmallow's native Enum field if possible #260

Closed dargueta closed 11 months ago

dargueta commented 1 year ago

This allows us to remove the dependency on marshmallow_enum if marshmallow 3.18+ is installed.

Changes

Other changes:

codecov[bot] commented 1 year ago

Codecov Report

Merging #260 (1032862) into main (0c43ff5) will decrease coverage by 1.46%. The diff coverage is 41.66%.

@@             Coverage Diff             @@
##              main     #260      +/-   ##
===========================================
- Coverage   100.00%   98.54%   -1.46%     
===========================================
  Files            6        6              
  Lines          472      480       +8     
  Branches        90       91       +1     
===========================================
+ Hits           472      473       +1     
- Misses           0        6       +6     
- Partials         0        1       +1     
Impacted Files Coverage Δ
src/desert/_make.py 94.81% <41.66%> (-5.19%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

dargueta commented 1 year ago

Unless we run the test suite four times, one for each combination of Marshmallow + backport package, I don't know how we'd keep coverage at 100%. (I'm guessing pragma: no cover is off the table?)

ChenoChosencar commented 1 year ago

(feel free to delete if out of place) This would fix an enum field incompatibility with apispec detailed here: https://github.com/marshmallow-code/apispec/issues/506