Logging attributes standardization

I agree with you that it’d be nice if the names had been standardized. I’m just not sure the change is worth it. Not that I have any authority on such matters!

It just seems like changing this interface has a huge surface area (20 years of legacy code, and the code most likely to use logging is probably more complex than average), with a pretty small upside: aesthetically more satisfying, and slightly easier for new users to get into because the naming fits their expectations.

I doubt that it would ever be worth dropping the existing names. It’s a ton of churn for code that is working just fine at the moment. Raising DeprecationWarning would be a huge pain for that code too, so it’d probably be a “soft” deprecation [1]. So the options are “introduce new, duplicate names” or the status quo. Duplicate names seems confusing to me.

The most realistic way I could imagine this happening is if a whole new logging module came along, the way that argparse replaced optparse (which took many years). But logging would probably stick around even then due to legacy code. And obviously such a change would need more substantial improvement than just conforming to PEP 8.


  1. see this thread for a general discussion of how deprecation currently works in Python ↩︎

2 Likes