[Python-Dev] A new warning category? (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Thu Oct 14 11:25:39 CEST 2010
- Previous message: [Python-Dev] Add aware local time support to datetime module
- Next message: [Python-Dev] A new warning category?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
In the http://bugs.python.org/issue10093 discussion, I proposed to add a specific warning category for unclosed files. The rationale is that these warnings will happen in destructors and therefore filtering by line number and filename doesn't make sense. So a new category would be useful in order to allow defining specific rules. Do you think it would go against the moratorium?
As for the category name, I would suggest ResourceWarning if we use it specifically for resource-consumption warnings. Or perhaps DebugWarning if we want to put all kinds of debugging helpers in it.
Regards
Antoine.
- Previous message: [Python-Dev] Add aware local time support to datetime module
- Next message: [Python-Dev] A new warning category?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]