Commit bb9fa21c authored by Fred Drake's avatar Fred Drake

weakref.ReferenceError becomes a built-in exception now that weak ref objects

are moving into the core; with these changes, it will be possible for the
exception to be raised without the weakref module ever being imported.
parent 39c78510
...@@ -48,6 +48,7 @@ extern DL_IMPORT(PyObject *) PyExc_NotImplementedError; ...@@ -48,6 +48,7 @@ extern DL_IMPORT(PyObject *) PyExc_NotImplementedError;
extern DL_IMPORT(PyObject *) PyExc_SyntaxError; extern DL_IMPORT(PyObject *) PyExc_SyntaxError;
extern DL_IMPORT(PyObject *) PyExc_IndentationError; extern DL_IMPORT(PyObject *) PyExc_IndentationError;
extern DL_IMPORT(PyObject *) PyExc_TabError; extern DL_IMPORT(PyObject *) PyExc_TabError;
extern DL_IMPORT(PyObject *) PyExc_ReferenceError;
extern DL_IMPORT(PyObject *) PyExc_SystemError; extern DL_IMPORT(PyObject *) PyExc_SystemError;
extern DL_IMPORT(PyObject *) PyExc_SystemExit; extern DL_IMPORT(PyObject *) PyExc_SystemExit;
extern DL_IMPORT(PyObject *) PyExc_TypeError; extern DL_IMPORT(PyObject *) PyExc_TypeError;
......
...@@ -97,6 +97,7 @@ Exception\n\ ...@@ -97,6 +97,7 @@ Exception\n\
| | |\n\ | | |\n\
| | +-- UnicodeError\n\ | | +-- UnicodeError\n\
| |\n\ | |\n\
| +-- ReferenceError\n\
| +-- SystemError\n\ | +-- SystemError\n\
| +-- MemoryError\n\ | +-- MemoryError\n\
|\n\ |\n\
...@@ -888,6 +889,9 @@ SystemError__doc__[] = "Internal error in the Python interpreter.\n\ ...@@ -888,6 +889,9 @@ SystemError__doc__[] = "Internal error in the Python interpreter.\n\
Please report this to the Python maintainer, along with the traceback,\n\ Please report this to the Python maintainer, along with the traceback,\n\
the Python version, and the hardware/OS platform and version."; the Python version, and the hardware/OS platform and version.";
static char
ReferenceError__doc__[] = "Weak ref proxy used after referent went away.";
static char static char
MemoryError__doc__[] = "Out of memory."; MemoryError__doc__[] = "Out of memory.";
...@@ -956,6 +960,7 @@ PyObject *PyExc_NotImplementedError; ...@@ -956,6 +960,7 @@ PyObject *PyExc_NotImplementedError;
PyObject *PyExc_SyntaxError; PyObject *PyExc_SyntaxError;
PyObject *PyExc_IndentationError; PyObject *PyExc_IndentationError;
PyObject *PyExc_TabError; PyObject *PyExc_TabError;
PyObject *PyExc_ReferenceError;
PyObject *PyExc_SystemError; PyObject *PyExc_SystemError;
PyObject *PyExc_SystemExit; PyObject *PyExc_SystemExit;
PyObject *PyExc_UnboundLocalError; PyObject *PyExc_UnboundLocalError;
...@@ -1044,6 +1049,7 @@ static struct { ...@@ -1044,6 +1049,7 @@ static struct {
FloatingPointError__doc__}, FloatingPointError__doc__},
{"ValueError", &PyExc_ValueError, 0, ValueError__doc__}, {"ValueError", &PyExc_ValueError, 0, ValueError__doc__},
{"UnicodeError", &PyExc_UnicodeError, &PyExc_ValueError, UnicodeError__doc__}, {"UnicodeError", &PyExc_UnicodeError, &PyExc_ValueError, UnicodeError__doc__},
{"ReferenceError", &PyExc_ReferenceError, 0, ReferenceError__doc__},
{"SystemError", &PyExc_SystemError, 0, SystemError__doc__}, {"SystemError", &PyExc_SystemError, 0, SystemError__doc__},
{"MemoryError", &PyExc_MemoryError, 0, MemoryError__doc__}, {"MemoryError", &PyExc_MemoryError, 0, MemoryError__doc__},
/* Warning categories */ /* Warning categories */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment