https://github.com/python/cpython/commit/2360bda599981745dbefb17162a7237372bde8be
commit: 2360bda599981745dbefb17162a7237372bde8be
branch: main
author: Owen Carey <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-09-11T16:09:48+01:00
summary:

gh-124205: Align descriptions of classes in 'Warning Categories' (#157255)

Co-authored-by: Stan Ulbrych <[email protected]>

files:
M Doc/library/warnings.rst

diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
index d5f89102d5853b..1e8acb0cb51c91 100644
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -68,45 +68,48 @@ The following warnings category classes are currently 
defined:
 
+----------------------------------+-----------------------------------------------+
 | Class                            | Description                               
    |
 
+==================================+===============================================+
-| :exc:`Warning`                   | This is the base class of all warning     
    |
-|                                  | category classes.  It is a subclass of    
    |
-|                                  | :exc:`Exception`.                         
    |
+| :exc:`Warning`                   | Base class for warning categories. It is 
a    |
+|                                  | subclass of :exc:`Exception`.             
    |
 
+----------------------------------+-----------------------------------------------+
-| :exc:`UserWarning`               | The default category for :func:`warn`.    
    |
+| :exc:`UserWarning`               | Base class for warnings generated by user 
    |
+|                                  | code. The default category for 
:func:`warn`.  |
 
+----------------------------------+-----------------------------------------------+
-| :exc:`DeprecationWarning`        | Base category for warnings about 
deprecated   |
+| :exc:`DeprecationWarning`        | Base class for warnings about deprecated  
    |
 |                                  | features when those warnings are intended 
for |
 |                                  | other Python developers (ignored by 
default,  |
 |                                  | unless triggered by code in 
``__main__``).    |
 
+----------------------------------+-----------------------------------------------+
-| :exc:`SyntaxWarning`             | Base category for warnings about dubious  
    |
-|                                  | syntactic features (typically emitted 
when    |
-|                                  | compiling Python source code, and hence   
    |
-|                                  | may not be suppressed by runtime filters) 
    |
+| :exc:`PendingDeprecationWarning` | Base class for warnings about features    
    |
+|                                  | that will be deprecated in the future     
    |
+|                                  | (ignored by default).                     
    |
 
+----------------------------------+-----------------------------------------------+
-| :exc:`RuntimeWarning`            | Base category for warnings about dubious  
    |
-|                                  | runtime features.                         
    |
+| :exc:`SyntaxWarning`             | Base class for warnings about dubious 
syntax  |
+|                                  | (typically emitted when compiling Python  
    |
+|                                  | source code, and hence may not be 
suppressed  |
+|                                  | by runtime filters).                      
    |
 
+----------------------------------+-----------------------------------------------+
-| :exc:`FutureWarning`             | Base category for warnings about 
deprecated   |
+| :exc:`RuntimeWarning`            | Base class for warnings about dubious 
runtime |
+|                                  | behavior.                                 
    |
++----------------------------------+-----------------------------------------------+
+| :exc:`FutureWarning`             | Base class for warnings about deprecated  
    |
 |                                  | features when those warnings are intended 
for |
 |                                  | end users of applications that are 
written in |
 |                                  | Python.                                   
    |
 
+----------------------------------+-----------------------------------------------+
-| :exc:`PendingDeprecationWarning` | Base category for warnings about features 
    |
-|                                  | that will be deprecated in the future     
    |
-|                                  | (ignored by default).                     
    |
-+----------------------------------+-----------------------------------------------+
-| :exc:`ImportWarning`             | Base category for warnings triggered 
during   |
+| :exc:`ImportWarning`             | Base class for warnings triggered during  
    |
 |                                  | the process of importing a module 
(ignored by |
 |                                  | default).                                 
    |
 
+----------------------------------+-----------------------------------------------+
-| :exc:`UnicodeWarning`            | Base category for warnings related to     
    |
+| :exc:`UnicodeWarning`            | Base class for warnings related to        
    |
 |                                  | Unicode.                                  
    |
 
+----------------------------------+-----------------------------------------------+
-| :exc:`BytesWarning`              | Base category for warnings related to     
    |
+| :exc:`EncodingWarning`           | Base class for warnings related to 
encodings. |
+|                                  | See :ref:`io-encoding-warning` for 
details.   |
++----------------------------------+-----------------------------------------------+
+| :exc:`BytesWarning`              | Base class for warnings related to        
    |
 |                                  | :class:`bytes` and :class:`bytearray`.    
    |
 
+----------------------------------+-----------------------------------------------+
-| :exc:`ResourceWarning`           | Base category for warnings related to     
    |
+| :exc:`ResourceWarning`           | Base class for warnings related to        
    |
 |                                  | resource usage (ignored by default).      
    |
 
+----------------------------------+-----------------------------------------------+
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to