oxan / djangorestframework-dataclasses

Dataclasses serializer for Django REST framework
BSD 3-Clause "New" or "Revised" License
431 stars 28 forks source link

Support new X | Y union syntax in Python 3.10 (PEP 604) #50

Closed intgr closed 2 years ago

intgr commented 2 years ago

Allow using the new X | None union syntax for specifying optional fields in Python 3.10+ (PEP 604).

oxan commented 2 years ago

Man, Python typing is a mess. Why do we need another module defining types? :disappointed:

intgr commented 2 years ago

Heh. The types module has existed way longer than typing. I assume there's a distinction between the two, but I'm as puzzled as you are about what that distinction is. :)

oxan commented 2 years ago

Thanks!

intgr commented 2 years ago

Thanks also for developing and maintaining djangorestframework-dataclasses, we've been very happy with it!

intgr commented 2 years ago

I would like to start using this feature in January. If you could publish a release, that would be great. :)

oxan commented 2 years ago

Sorry, this got lost in the holiday shuffle. Released now!