On Mon, Mar 25, 2019 at 8:53 PM Nick Coghlan email@example.com wrote:
On Mon, 25 Mar 2019 at 14:39, Inada Naoki firstname.lastname@example.org wrote:
We have many ways to deprecation:
- Document only deprecation (no warning) -- no actual removal is planned.
- FutureWarning -- to warn end users.
- DeprecationWarning -- to warn Python developers.
- PendingDeprecationWarning -- to warn Python developers.
The key difference between the last two:
- DeprecationWarning: the decision has already been made, you have
little chance of getting the deprecation reversed
- PendingDeprecationWarning: full deprecation is being considered, now
is the time to get in touch if you'd like to avoid full deprecation
Hence the last one only showing up to those folks that are running automated tests or otherwise enabling all warnings.
PendingDeprecationWarning was added when DeprecationWarning is shown by default and it is too noisy for end users.
After Python 2.7 and 3.2, there are no difference between two classes.
PEP 565 tried to introduce difference again. But the difference is still too little.
I have not seen DeprecationWarning enabled by PEP 565. I see both warning when I'm using PYTHONWARNINGS=default or -Wd, or running test.
I don't think it's worth enough to try giving meaning to PendingDeprecationWarning again. C, Rust, Java, Ruby, PHP, don't have PendingDeprecation. Programmers only need Deprecation. Why programmers need PendingDeprecation only in Python?
If it is really important, I think we need easy option to enable only DeprecationWarning. It must be as easy as -Wd.