ericvsmith / dataclasses

Apache License 2.0
584 stars 53 forks source link

InitVar should not discard the type information #135

Closed hackaugusto closed 2 years ago

hackaugusto commented 6 years ago

The metaclass was discarding the type information given to the InitVar which makes runtime introspection impossible.

Proposed fix for https://bugs.python.org/issue33569

ilevkivskyi commented 6 years ago

IMHO it is better to make a PR against CPython repo and then backport it here. We are doing this now for typing and this workflow is quite convenient.

hackaugusto commented 6 years ago

PR opened: https://github.com/python/cpython/pull/8927

ericvsmith commented 4 years ago

I realize this is old, but I'm just getting around to releasing a new version. If you're still motivated, could you add some tests? Hopefully this would be just copying tests from CPython.