Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

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).

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33463>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to