skip.montanaro  committed 5b83d1f

PyErr_Warn is deprecated in 2.5 - goes away for 3.0

  • Participants
  • Parent commits 2dbb949

Comments (0)

Files changed (3)

File Doc-3k/c-api/exceptions.rst

    documentation.  There is no C API for warning control.
-.. cfunction:: int PyErr_Warn(PyObject *category, char *message)
-   Issue a warning message.  The *category* argument is a warning category (see
-   below) or *NULL*; the *message* argument is a message string.  The warning will
-   appear to be issued from the function calling :cfunc:`PyErr_Warn`, equivalent to
-   calling :cfunc:`PyErr_WarnEx` with a *stacklevel* of 1.
-   Deprecated; use :cfunc:`PyErr_WarnEx` instead.
 .. cfunction:: int PyErr_WarnExplicit(PyObject *category, const char *message, const char *filename, int lineno, const char *module, PyObject *registry)
    Issue a warning message with explicit control over all warning attributes.  This

File Doc-3k/data/refcounts.dat

 PyErr_WarnEx:const char*:message::

File Doc-3k/library/warnings.rst

 might want to issue a warning when a program uses an obsolete module.
 Python programmers issue warnings by calling the :func:`warn` function defined
-in this module.  (C programmers use :cfunc:`PyErr_Warn`; see
+in this module.  (C programmers use :cfunc:`PyErr_WarnEx`; see
 :ref:`exceptionhandling` for details).
 Warning messages are normally written to ``sys.stderr``, but their disposition