From 920fd66ac6e723246baf6c3ed9f720675811bb15 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sat, 3 Apr 2010 16:41:20 +0000 Subject: [PATCH] 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. --- Lib/plat-mac/Carbon/__init__.py | 2 +- Lib/plat-mac/appletrunner.py | 2 +- Mac/Modules/ColorPickermodule.c | 2 +- Mac/Modules/MacOS.c | 2 +- Mac/Modules/Nav.c | 2 +- Mac/Modules/OSATerminology.c | 2 +- Mac/Modules/icgluemodule.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Lib/plat-mac/Carbon/__init__.py b/Lib/plat-mac/Carbon/__init__.py index 6739bbdf9c8..37a9ae3535a 100644 --- a/Lib/plat-mac/Carbon/__init__.py +++ b/Lib/plat-mac/Carbon/__init__.py @@ -4,4 +4,4 @@ warnings.filterwarnings("ignore", "", FutureWarning, ".*Controls") warnings.filterwarnings("ignore", "", FutureWarning, ".*MacTextEditor") from warnings import warnpy3k -warnpy3k("In 3.x, Carbon is removed.", stacklevel=2) +warnpy3k("In 3.x, the Carbon package is removed.", stacklevel=2) diff --git a/Lib/plat-mac/appletrunner.py b/Lib/plat-mac/appletrunner.py index a2373aa8560..cdfd4174598 100755 --- a/Lib/plat-mac/appletrunner.py +++ b/Lib/plat-mac/appletrunner.py @@ -4,7 +4,7 @@ # we are not running in a framework build. 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 sys diff --git a/Mac/Modules/ColorPickermodule.c b/Mac/Modules/ColorPickermodule.c index 440642622c7..51d7c37063e 100644 --- a/Mac/Modules/ColorPickermodule.c +++ b/Mac/Modules/ColorPickermodule.c @@ -71,7 +71,7 @@ void initColorPicker(void) { 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; /* Create the module and add the functions */ diff --git a/Mac/Modules/MacOS.c b/Mac/Modules/MacOS.c index bef7f88ceee..19deb44611a 100644 --- a/Mac/Modules/MacOS.c +++ b/Mac/Modules/MacOS.c @@ -695,7 +695,7 @@ initMacOS(void) { 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; m = Py_InitModule("MacOS", MacOS_Methods); diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c index 1c1777663c4..f7b19b97fdb 100644 --- a/Mac/Modules/Nav.c +++ b/Mac/Modules/Nav.c @@ -932,7 +932,7 @@ initNav(void) { 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; #ifdef __LP64__ diff --git a/Mac/Modules/OSATerminology.c b/Mac/Modules/OSATerminology.c index 6a13aeabae5..a7becf78593 100644 --- a/Mac/Modules/OSATerminology.c +++ b/Mac/Modules/OSATerminology.c @@ -96,7 +96,7 @@ static struct PyMethodDef OSATerminology_methods[] = 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; Py_InitModule("OSATerminology", OSATerminology_methods); } diff --git a/Mac/Modules/icgluemodule.c b/Mac/Modules/icgluemodule.c index d995f1619ad..70ca1e36765 100644 --- a/Mac/Modules/icgluemodule.c +++ b/Mac/Modules/icgluemodule.c @@ -454,7 +454,7 @@ initicglue(void) { 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; /* Create the module and add the functions */