marshmallow_dataclass icon indicating copy to clipboard operation
marshmallow_dataclass copied to clipboard

Add Annotated support

Open mvanderlee opened this issue 1 year ago • 3 comments

Fixes #256

Moving away from NewType and instead add Annotated support.

  • https://docs.python.org/3/library/typing.html#typing.Annotated
  • https://peps.python.org/pep-0593/

mvanderlee avatar Mar 09 '24 21:03 mvanderlee

I would recommend importing Annotated from typing_extensions for Python 3.8 support (at least for as long as that continues receiving security updates).

mivade avatar Mar 09 '24 23:03 mivade

Rebased, and retested.

mvanderlee avatar Mar 20 '24 16:03 mvanderlee

@lovasoa @dairiki Any idea when you'll have time to review this? I'd like to see this merged so I can rebase and finalize the generic dataclass PR #259

mvanderlee avatar Apr 05 '24 15:04 mvanderlee

I apologize for the delay. (Life has been crazy.)

The feature addition is a good one, I think. (Thank you!) And other than some style nits, I think it looks fine.

I think the addition of tox test configuration is long overdue. Ideally, it would be a separate PR, but since it's in here, already, I'm fine leaving it here. I do have a few comments about that.

I haven't had time since either, so I get it. Thank you for taking the time to review it!

mvanderlee avatar Jun 18 '24 21:06 mvanderlee

I think I've resolved all issues. The PR is ready for review again.

mvanderlee avatar Jun 20 '24 13:06 mvanderlee

I've removed tox.ini from this PR.

mvanderlee avatar Jun 23 '24 14:06 mvanderlee

Merged. Thank you, @mvanderlee !

I tried to make a new PyPI release (8.7.0) but #270 happened.

dairiki avatar Jun 23 '24 18:06 dairiki

Now released in 8.7.0.

dairiki avatar Jun 23 '24 19:06 dairiki