flask_accepts
flask_accepts copied to clipboard
Resolve marshmallow deprecation warning and support marshmallow 4.0
Proposal for https://github.com/apryor6/flask_accepts/issues/116.
Codecov Report
Merging #117 (0e4606c) into master (0556746) will decrease coverage by
0.14%
. The diff coverage is84.61%
.
:exclamation: Current head 0e4606c differs from pull request most recent head 1790d39. Consider uploading reports for the commit 1790d39 to get more accurate results
@@ Coverage Diff @@
## master #117 +/- ##
==========================================
- Coverage 98.44% 98.29% -0.15%
==========================================
Files 7 7
Lines 1285 1291 +6
==========================================
+ Hits 1265 1269 +4
- Misses 20 22 +2
Impacted Files | Coverage Δ | |
---|---|---|
flask_accepts/utils.py | 97.87% <80.00%> (-2.13%) |
:arrow_down: |
flask_accepts/utils_test.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 0556746...1790d39. Read the comment docs.
I am not sure how to handle the test coverage decrease.
Proper testing could involve running multiple tox environments and merging the coverage reports.
Alternatively, marshmallow could be pinned to <4.0 for now.
@kreathon did you get this resolved? I would like to use flask_accepts with marshmallow 4 in my project
The issue looks to be here:
if marshmallow_version >= (3, 13, 0):
_ma_key_for_fr_example_key = "dump_default"
_ma_key_for_fr_default_key = "load_default"
else:
_ma_key_for_fr_example_key = "default"
_ma_key_for_fr_default_key = "missing"
where the lines after the else
look to be ignored?
maybe something like this would work for the code coverage instead?
_ma_key_for_fr_example_key = "dump_default"
_ma_key_for_fr_default_key = "load_default"
if marshmallow_version < (3, 13, 0):
_ma_key_for_fr_example_key = "default"
_ma_key_for_fr_default_key = "missing"
I would be interested to know if this works?
@apryor6 can you provide any additional feedback? Additionally how do we run the code coverage tests locally please?
@circulon, you can check the .circleci/config.yml
to see how to run the code coverage tests locally.
But my fear is that this project is dead (and it is not about coverage)
But my fear is that this project is dead (and it is not about coverage)
Bugger ;(
@kreathon are you working with or know of any other projects that are active and provide similar functionality?
Cheers
@circulon I don't know. Personally, I am now sticking to plain Marshmallow.