Message338243
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. |
|
Date |
User |
Action |
Args |
2019-03-18 15:31:00 | josh.r | set | recipients:
+ josh.r, rhettinger, levkivskyi |
2019-03-18 15:31:00 | josh.r | set | messageid: <1552923060.02.0.344376655137.issue36320@roundup.psfhosted.org> |
2019-03-18 15:31:00 | josh.r | link | issue36320 messages |
2019-03-18 15:30:59 | josh.r | create | |
|