Author serhiy.storchaka
Recipients rhettinger, selik, serhiy.storchaka
Date 2018-05-15.05:26:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526361968.45.0.682650639539.issue33463@psf.upfronthosting.co.za>
In-reply-to
Content
DeprecationWarning is for things that will be removed. This is a sign: don't use this feature, rewrite you code so that doesn't use it, otherwise it will be broken in future versions.

FutureVersion is for things that work now and will work in future, but will change its behavior in future. This is a sign: be prepared that your code will be broken in a way that will lead to returning a wrong result instead of failing. It is better to use alternatives until this feature be stabilized.

Both warnings are not well appropriate here. They are too loud, and there are no good alternatives to _asdict(). Most users don't care about additional methods or performance guaranties of the result, thy just need a mapping, and it is desirable if it preserves the order of named tuple fields. I think it would be better to not add a runtime warning. Instead you can add a warning in the documentation in previous versions (just to the versionchanged directive that says when _dict() started returning an OrderedDict).
History
Date User Action Args
2018-05-15 05:26:08serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, selik
2018-05-15 05:26:08serhiy.storchakasetmessageid: <1526361968.45.0.682650639539.issue33463@psf.upfronthosting.co.za>
2018-05-15 05:26:08serhiy.storchakalinkissue33463 messages
2018-05-15 05:26:08serhiy.storchakacreate