Closed otonnesen closed 1 year ago
The CI test is failing under python 3.6.
Support for python 3.6 was dropped in marshmallow
3.15 (and Enum support was only added in marshmallow
3.18.)
Two options (perhaps there are others) appear to be:
marshmallow_dataclass
. The last time I asked, @lovasoa was against doing that. He'll have to say whether it's time to do that yet.marshmallow.fields.Enum
when it's available, but be able to fall back to using marshmallow_enum.EnumField
when it's not.Python 3.6 reached its end of life over a year ago now. I think it would make sense to drop support for it.
In the interest of keeping this diff self-contained, I'll just add the extra code to keep python 3.6 support as you mentioned. I can open another PR to discuss dropping 3.6 support as well if we like.
Python 3.6 reached its end of life over a year ago now. I think it would make sense to drop support for it.
I do not disagree, however, the last time this came up, @lovasoa wanted to maintain 3.6 support, citing the number of weekly downloads. Since then, download numbers have dropped a bit, but not substantially.
One option might be to bump our minor version number, dropping support for py 3.6 in the new version, and maintain two branches (an 8.5.x that supports py3.6, and an 8.6.x which does not).
But, as long as it's not too painful to maintain 3.6 support in the current codebase, it's probably cleaner and less work just to do so.
@otonnesen Would it be worthwhile (and actually work) to make the [enum]
extra conditional on python version?
E.g., in setup.py:
EXTRAS_REQUIRE = {
"enum": [
"marshmallow-enum; python_version<'3.7'",
"marshmallow>=3.18; python_version>='3.7'",
],
...
}
@otonnesen Would it be worthwhile (and actually work) to make the
[enum]
extra conditional on python version?
Never mind. I see you just did that! :laughing:
Yeah just tested on 3.6 and 3.10 and it does appear to work as I'd expect
Will wait for further comments for a couple of days before merging, but LGTM. Thank you @otonnesen!
Good for me!
Released, just now, in 8.5.11. Thank you, @otonnesen!
Addresses https://github.com/lovasoa/marshmallow_dataclass/issues/225