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 r.david.murray
Recipients Paul Durack, r.david.murray
Date 2017-04-14.19:18:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492197484.99.0.606260403251.issue30063@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-04-14 19:18:05r.david.murraysetrecipients: + r.david.murray, Paul Durack
2017-04-14 19:18:04r.david.murraysetmessageid: <1492197484.99.0.606260403251.issue30063@psf.upfronthosting.co.za>
2017-04-14 19:18:04r.david.murraylinkissue30063 messages
2017-04-14 19:18:04r.david.murraycreate