Add a new warning gategory, ResourceWarning, as discussed on python-dev. It is silent by default,
except when configured --with-pydebug.
Emit this warning from the GC shutdown procedure, rather than just printing to stderr.
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 49b5b93..9d77698 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -410,10 +410,20 @@
Base class for warnings related to Unicode.
+
.. exception:: BytesWarning
Base class for warnings related to :class:`bytes` and :class:`buffer`.
+
+.. exception:: ResourceWarning
+
+ Base class for warnings related to resource usage.
+
+ .. versionadded:: 3.2
+
+
+
Exception hierarchy
-------------------