R. David Murray added the comment: Yes, but the way deprecation warnings work is that there is a stacklevel specified, and the line reported in the error is that number of steps back up the call stack from where the warning was actually issued. The json module doesn't natively handle datetime, so there *must* be third party code that is doing the datetime encoding. It is that code that is triggering the Deprecation warning, and the stacklevel on that deprecation warning must skip the third party code and go up another level to land in the encode.py file. (self.iterencode can result in a call out to user code.) This may or may not be a bug in the third party DeprecationWarning...it is sometimes hard to get stacklevel right for all cases, especially if the code in question is usually called from a nested function inside the library.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30063> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com