22.03.19 13:23, Inada Naoki пише:
On Fri, Mar 22, 2019 at 7:36 PM Serhiy Storchaka firstname.lastname@example.org wrote:
What is wrong with PendingDeprecationWarning? What problem do you want to solve at the cost of removing this feature?
The main problem is complexity. In other words, learning cost.
Do you have evidences that many people have troubles with learning PendingDeprecationWarning?
All Python library developer would like to know how to deprecate something.
They will understand "deprecated" means "will be removed in the future version" easily.
Then, "will be deprecated"  is easy to understand? "will be (will be removed)" is very curious. To understand what PendingDeprecationWarning is for, they need to learn history which is not documented in clearly.
Perhaps the better solution of this is to improve the documentation.
PendingDeprecationWarning means that you still can use the deprecated feature.
When we deprecate some feature, we should provide an alternate way to solve the same problem. And it is better if that way is available in few previous Python versions. So the developer which need to support several Python versions could just switch to a modern way. This is how we do, or at least must to do, to be polite with Python programmers.
PendingDeprecationWarning just give us time to add an alternate way if it is not available yet, and give Python programmers time to adapt their code.
If we deprecate PendingDeprecationWarning, people don't have to understand what it is for.
Now, when DeprecationWarning is displayed by default in the interactive session, in __main__ and in development runtime mode (and this list can be extended), PendingDeprecationWarning is useful again. Even if the interpreter itself would not use it, it is used in third-party projects.
This benefits seems too small compared to the learning cost.
I do not think so.