Mercurial > cpython-lru_cache-weakref
diff Python/exceptions.c @ 23564:3f242cdd0904 legacy-trunk
As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning).
Docs could be improved.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Wed, 29 May 2002 15:54:55 +0000 |
| parents | 7230e01c3c49 |
| children | ed1ba37a46b7 |
line wrap: on
line diff
--- a/Python/exceptions.c Wed May 29 14:00:22 2002 +0000 +++ b/Python/exceptions.c Wed May 29 15:54:55 2002 +0000 @@ -110,6 +110,7 @@ |\n\ +-- UserWarning\n\ +-- DeprecationWarning\n\ + +-- PendingDeprecationWarning\n\ +-- SyntaxWarning\n\ +-- OverflowWarning\n\ +-- RuntimeWarning"; @@ -920,6 +921,11 @@ "Base class for warnings about deprecated features."; static char +PendingDeprecationWarning__doc__[] = +"Base class for warnings about features which will be deprecated " +"in the future."; + +static char SyntaxWarning__doc__[] = "Base class for warnings about dubious syntax."; static char @@ -987,6 +993,7 @@ PyObject *PyExc_Warning; PyObject *PyExc_UserWarning; PyObject *PyExc_DeprecationWarning; +PyObject *PyExc_PendingDeprecationWarning; PyObject *PyExc_SyntaxWarning; PyObject *PyExc_OverflowWarning; PyObject *PyExc_RuntimeWarning; @@ -1063,6 +1070,8 @@ {"UserWarning", &PyExc_UserWarning, &PyExc_Warning, UserWarning__doc__}, {"DeprecationWarning", &PyExc_DeprecationWarning, &PyExc_Warning, DeprecationWarning__doc__}, + {"PendingDeprecationWarning", &PyExc_PendingDeprecationWarning, &PyExc_Warning, + PendingDeprecationWarning__doc__}, {"SyntaxWarning", &PyExc_SyntaxWarning, &PyExc_Warning, SyntaxWarning__doc__}, {"OverflowWarning", &PyExc_OverflowWarning, &PyExc_Warning, OverflowWarning__doc__},
