mirror of
https://github.com/python/cpython.git
synced 2025-08-21 01:15:03 +00:00
Ensure 'module removed' warning messages contain the word 'module' or 'package'.
This should fix the test_py3kwarn failure on OS X. test_support.import_module also requires this.
This commit is contained in:
parent
0ccc7bbb34
commit
920fd66ac6
7 changed files with 7 additions and 7 deletions
|
@ -4,4 +4,4 @@ warnings.filterwarnings("ignore", "", FutureWarning, ".*Controls")
|
||||||
warnings.filterwarnings("ignore", "", FutureWarning, ".*MacTextEditor")
|
warnings.filterwarnings("ignore", "", FutureWarning, ".*MacTextEditor")
|
||||||
|
|
||||||
from warnings import warnpy3k
|
from warnings import warnpy3k
|
||||||
warnpy3k("In 3.x, Carbon is removed.", stacklevel=2)
|
warnpy3k("In 3.x, the Carbon package is removed.", stacklevel=2)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# we are not running in a framework build.
|
# we are not running in a framework build.
|
||||||
|
|
||||||
from warnings import warnpy3k
|
from warnings import warnpy3k
|
||||||
warnpy3k("In 3.x, appletrunner is removed.", stacklevel=2)
|
warnpy3k("In 3.x, the appletrunner module is removed.", stacklevel=2)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -71,7 +71,7 @@ void initColorPicker(void)
|
||||||
{
|
{
|
||||||
PyObject *m;
|
PyObject *m;
|
||||||
|
|
||||||
if (PyErr_WarnPy3k("In 3.x, ColorPicker is removed.", 1) < 0)
|
if (PyErr_WarnPy3k("In 3.x, the ColorPicker module is removed.", 1) < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
|
|
|
@ -695,7 +695,7 @@ initMacOS(void)
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
if (PyErr_WarnPy3k("In 3.x, MacOS is removed.", 1))
|
if (PyErr_WarnPy3k("In 3.x, the MacOS module is removed.", 1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m = Py_InitModule("MacOS", MacOS_Methods);
|
m = Py_InitModule("MacOS", MacOS_Methods);
|
||||||
|
|
|
@ -932,7 +932,7 @@ initNav(void)
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
if (PyErr_WarnPy3k("In 3.x, Nav is removed.", 1))
|
if (PyErr_WarnPy3k("In 3.x, the Nav module is removed.", 1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
|
|
|
@ -96,7 +96,7 @@ static struct PyMethodDef OSATerminology_methods[] =
|
||||||
void
|
void
|
||||||
initOSATerminology(void)
|
initOSATerminology(void)
|
||||||
{
|
{
|
||||||
if (PyErr_WarnPy3k("In 3.x, OSATerminology is removed.", 1) < 0)
|
if (PyErr_WarnPy3k("In 3.x, the OSATerminology module is removed.", 1) < 0)
|
||||||
return;
|
return;
|
||||||
Py_InitModule("OSATerminology", OSATerminology_methods);
|
Py_InitModule("OSATerminology", OSATerminology_methods);
|
||||||
}
|
}
|
||||||
|
|
|
@ -454,7 +454,7 @@ initicglue(void)
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
if (PyErr_WarnPy3k("In 3.x, icglue is removed.", 1))
|
if (PyErr_WarnPy3k("In 3.x, the icglue module is removed.", 1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue