ericvsmith / dataclasses

Apache License 2.0
584 stars 53 forks source link

bpo-34363: dataclasses.asdict() and .astuple() for namedtuples #141

Closed cliffxuan closed 6 months ago

cliffxuan commented 5 years ago

bpo-34363: dataclasses.asdict() and .astuple() now handle fields which are namedtuples

https://github.com/python/cpython/commit/9b9d97dd139a799d28ff8bc90d118b1cac190b03

cliffxuan commented 5 years ago

@ericvsmith what's your plan for this repository? are you still maintaining it? thanks.

ericvsmith commented 5 years ago

Sorry for not responding earlier. This repo is only for backporting dataclasses to 3.6. For new features, please open an issue on bugs.python.org. I'm going to close this issue, and if you open a new issue on bpo I'll comment there.

cliffxuan commented 5 years ago

@ericvsmith my change is exactly that -- backporting dataclasses to 3.6. it picked up one of the latest changes on dataclasses in 3.7 for namedtuples and added it to 3.6.

ericvsmith commented 5 years ago

Ah, I didn't notice that.

My plan us to just wholesale copy the 3.8 version back here, once I fix a few more problems in the stdlib code.

cliffxuan commented 5 years ago

OK. That'll be good. When do you expect this to happen?

anthrotype commented 3 years ago

I wonder why this patch was never backported in the end?

ericvsmith commented 3 years ago

I wonder why this patch was never backported in the end?

Mostly because I never had the time to verify that it was the identical behavior as in 3.8, or I guess now 3.10.