This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author josh.r
Recipients josh.r, levkivskyi, rhettinger
Date 2019-03-18.15:30:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552923060.02.0.344376655137.issue36320@roundup.psfhosted.org>
In-reply-to
Content
Would it make sense to convert _field_types to a property, so the method(s) that implement the property can do:

warnings.warn("_field_types is deprecated; use __annotations__ instead", DeprecationWarning)

to indicate the deprecation programmatically, not just in the documentation? The property could be backed by __annotations__ directly; they're already aliases of one another, so the only difference in behavior would be if someone was actually reassigning _field_types after class definition time (which I'm hoping is an invalid use case...). Would save some headaches for folks who run with warnings enabled, but don't read the What's New notices in detail.
History
Date User Action Args
2019-03-18 15:31:00josh.rsetrecipients: + josh.r, rhettinger, levkivskyi
2019-03-18 15:31:00josh.rsetmessageid: <1552923060.02.0.344376655137.issue36320@roundup.psfhosted.org>
2019-03-18 15:31:00josh.rlinkissue36320 messages
2019-03-18 15:30:59josh.rcreate