Re: deprecation warning
Frank Millman <[email protected]> Fri, 19 Mar 2021 13:24:34 +0200
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <[email protected]> |
On 2021-03-19 1:05 PM, Robin Becker wrote: > How strange, I run all the tests in many pythons including 3.8.6 etc > etc and don't see this warning; I'm just wondering if I need to excite > it somehow. I run on linux mostly, but the appveyor is windows and the > github actions include OS X. > From the docs - WhatÂ’s New In Python 3.9 """ You should check for DeprecationWarning in your code When Python 2.7 was still supported, a lot of functionality in Python 3 was kept for backward compatibility with Python 2.7. With the end of Python 2 support, these backward compatibility layers have been removed, or will be removed soon. Most of them emitted a|DeprecationWarning| <https://docs.python.org/3.9/library/exceptions.html#DeprecationWarning>warning for several years. For example, using|collections.Mapping|instead of|collections.abc.Mapping|emits a|DeprecationWarning| <https://docs.python.org/3.9/library/exceptions.html#DeprecationWarning>since Python 3.3, released in 2012. Test your application with the|-W| <https://docs.python.org/3.9/using/cmdline.html#cmdoption-w>|default|command-line option to see|DeprecationWarning| <https://docs.python.org/3.9/library/exceptions.html#DeprecationWarning>and|PendingDeprecationWarning| <https://docs.python.org/3.9/library/exceptions.html#PendingDeprecationWarning>, or even with|-W| <https://docs.python.org/3.9/using/cmdline.html#cmdoption-w>|error|to treat them as errors.Warnings Filter <https://docs.python.org/3.9/library/warnings.html#warning-filter>can be used to ignore warnings from third-party code. """ Maybe they are running their program using 'python -W default'? Frank Millman