From: Jack Jansen Date: Sat, 25 Aug 2001 11:53:43 +0000 (+0000) Subject: Step 2 in putting the MacOS toolbox modules in a package: issue a DepracationWarning... X-Git-Tag: v2.2a3~325 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6dba6bc0a226c2dd384d9311b9ad842be653c2b5;p=thirdparty%2FPython%2Fcpython.git Step 2 in putting the MacOS toolbox modules in a package: issue a DepracationWarning in the compatibility modules. --- diff --git a/Mac/Lib/lib-compat/AE.py b/Mac/Lib/lib-compat/AE.py index f30e2a1d0ed6..6d8b6d0866a9 100644 --- a/Mac/Lib/lib-compat/AE.py +++ b/Mac/Lib/lib-compat/AE.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.AE import * diff --git a/Mac/Lib/lib-compat/App.py b/Mac/Lib/lib-compat/App.py index c6db44a904d2..f0aa9c7d3961 100644 --- a/Mac/Lib/lib-compat/App.py +++ b/Mac/Lib/lib-compat/App.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.App import * diff --git a/Mac/Lib/lib-compat/Appearance.py b/Mac/Lib/lib-compat/Appearance.py index 1cedc1ef4388..3bd5dbedb141 100644 --- a/Mac/Lib/lib-compat/Appearance.py +++ b/Mac/Lib/lib-compat/Appearance.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Appearance import * diff --git a/Mac/Lib/lib-compat/AppleEvents.py b/Mac/Lib/lib-compat/AppleEvents.py index 4cf9e40af6d5..2db9a9bf405c 100644 --- a/Mac/Lib/lib-compat/AppleEvents.py +++ b/Mac/Lib/lib-compat/AppleEvents.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.AppleEvents import * diff --git a/Mac/Lib/lib-compat/Balloons.py b/Mac/Lib/lib-compat/Balloons.py index fab32a7c1fbe..2a8493282386 100644 --- a/Mac/Lib/lib-compat/Balloons.py +++ b/Mac/Lib/lib-compat/Balloons.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Balloons import * diff --git a/Mac/Lib/lib-compat/CF.py b/Mac/Lib/lib-compat/CF.py index 190aaa4956b6..8ecf212de8bb 100644 --- a/Mac/Lib/lib-compat/CF.py +++ b/Mac/Lib/lib-compat/CF.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.CF import * diff --git a/Mac/Lib/lib-compat/Cm.py b/Mac/Lib/lib-compat/Cm.py index 38865025e57a..16a16dcf7341 100644 --- a/Mac/Lib/lib-compat/Cm.py +++ b/Mac/Lib/lib-compat/Cm.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Cm import * diff --git a/Mac/Lib/lib-compat/Components.py b/Mac/Lib/lib-compat/Components.py index 904b6bdd27e3..cd9e04c587f1 100644 --- a/Mac/Lib/lib-compat/Components.py +++ b/Mac/Lib/lib-compat/Components.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Components import * diff --git a/Mac/Lib/lib-compat/ControlAccessor.py b/Mac/Lib/lib-compat/ControlAccessor.py index 29019f8b138f..5859da68cad3 100644 --- a/Mac/Lib/lib-compat/ControlAccessor.py +++ b/Mac/Lib/lib-compat/ControlAccessor.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.ControlAccessor import * diff --git a/Mac/Lib/lib-compat/Controls.py b/Mac/Lib/lib-compat/Controls.py index 4c7a63ce54ef..05b81d29da39 100644 --- a/Mac/Lib/lib-compat/Controls.py +++ b/Mac/Lib/lib-compat/Controls.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Controls import * diff --git a/Mac/Lib/lib-compat/Ctl.py b/Mac/Lib/lib-compat/Ctl.py index ac92302b4303..fc6b8554c9ee 100644 --- a/Mac/Lib/lib-compat/Ctl.py +++ b/Mac/Lib/lib-compat/Ctl.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Ctl import * diff --git a/Mac/Lib/lib-compat/Dialogs.py b/Mac/Lib/lib-compat/Dialogs.py index 9f724f787411..dc8b35f027ca 100644 --- a/Mac/Lib/lib-compat/Dialogs.py +++ b/Mac/Lib/lib-compat/Dialogs.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Dialogs import * diff --git a/Mac/Lib/lib-compat/Dlg.py b/Mac/Lib/lib-compat/Dlg.py index 57a353409f53..7c84af2590af 100644 --- a/Mac/Lib/lib-compat/Dlg.py +++ b/Mac/Lib/lib-compat/Dlg.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Dlg import * diff --git a/Mac/Lib/lib-compat/Drag.py b/Mac/Lib/lib-compat/Drag.py index 4e24db08986f..30fe93dab1ba 100644 --- a/Mac/Lib/lib-compat/Drag.py +++ b/Mac/Lib/lib-compat/Drag.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Drag import * diff --git a/Mac/Lib/lib-compat/Dragconst.py b/Mac/Lib/lib-compat/Dragconst.py index 6a787b9aa4f4..9a3b7254a1d5 100644 --- a/Mac/Lib/lib-compat/Dragconst.py +++ b/Mac/Lib/lib-compat/Dragconst.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Dragconst import * diff --git a/Mac/Lib/lib-compat/Events.py b/Mac/Lib/lib-compat/Events.py index 47b38342d69e..a3d14b3e5847 100644 --- a/Mac/Lib/lib-compat/Events.py +++ b/Mac/Lib/lib-compat/Events.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Events import * diff --git a/Mac/Lib/lib-compat/Evt.py b/Mac/Lib/lib-compat/Evt.py index 015810c2f980..a9e9cd572dc9 100644 --- a/Mac/Lib/lib-compat/Evt.py +++ b/Mac/Lib/lib-compat/Evt.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Evt import * diff --git a/Mac/Lib/lib-compat/Fm.py b/Mac/Lib/lib-compat/Fm.py index 5c4cf600c63d..7653f9cb025b 100644 --- a/Mac/Lib/lib-compat/Fm.py +++ b/Mac/Lib/lib-compat/Fm.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Fm import * diff --git a/Mac/Lib/lib-compat/Fonts.py b/Mac/Lib/lib-compat/Fonts.py index f0a9a52241c5..08ace636ea0c 100644 --- a/Mac/Lib/lib-compat/Fonts.py +++ b/Mac/Lib/lib-compat/Fonts.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Fonts import * diff --git a/Mac/Lib/lib-compat/Help.py b/Mac/Lib/lib-compat/Help.py index fb2ac271d917..f9b3cb22596d 100644 --- a/Mac/Lib/lib-compat/Help.py +++ b/Mac/Lib/lib-compat/Help.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Help import * diff --git a/Mac/Lib/lib-compat/Icn.py b/Mac/Lib/lib-compat/Icn.py index 0e3b44d44e0e..270dbc5ab4e2 100644 --- a/Mac/Lib/lib-compat/Icn.py +++ b/Mac/Lib/lib-compat/Icn.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Icn import * diff --git a/Mac/Lib/lib-compat/Icons.py b/Mac/Lib/lib-compat/Icons.py index 2a310c0f409d..d211a2ad41f2 100644 --- a/Mac/Lib/lib-compat/Icons.py +++ b/Mac/Lib/lib-compat/Icons.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Icons import * diff --git a/Mac/Lib/lib-compat/List.py b/Mac/Lib/lib-compat/List.py index 0b9fe565c7c6..91423ed119ee 100644 --- a/Mac/Lib/lib-compat/List.py +++ b/Mac/Lib/lib-compat/List.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.List import * diff --git a/Mac/Lib/lib-compat/Lists.py b/Mac/Lib/lib-compat/Lists.py index 55155995dfaf..6b610b18826d 100644 --- a/Mac/Lib/lib-compat/Lists.py +++ b/Mac/Lib/lib-compat/Lists.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Lists import * diff --git a/Mac/Lib/lib-compat/MacTextEditor.py b/Mac/Lib/lib-compat/MacTextEditor.py index d9f7226f6305..ba19e27a6b02 100644 --- a/Mac/Lib/lib-compat/MacTextEditor.py +++ b/Mac/Lib/lib-compat/MacTextEditor.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.MacTextEditor import * diff --git a/Mac/Lib/lib-compat/MediaDescr.py b/Mac/Lib/lib-compat/MediaDescr.py index a188c80c48ce..3cf69129f713 100644 --- a/Mac/Lib/lib-compat/MediaDescr.py +++ b/Mac/Lib/lib-compat/MediaDescr.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.MediaDescr import * diff --git a/Mac/Lib/lib-compat/Menu.py b/Mac/Lib/lib-compat/Menu.py index 9163f6d9c3a7..f2210cba970c 100644 --- a/Mac/Lib/lib-compat/Menu.py +++ b/Mac/Lib/lib-compat/Menu.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Menu import * diff --git a/Mac/Lib/lib-compat/Menus.py b/Mac/Lib/lib-compat/Menus.py index a3c6cfcc7121..073a6d396900 100644 --- a/Mac/Lib/lib-compat/Menus.py +++ b/Mac/Lib/lib-compat/Menus.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Menus import * diff --git a/Mac/Lib/lib-compat/Mlte.py b/Mac/Lib/lib-compat/Mlte.py index 2e354cdf7a2b..bc15dc05c9da 100644 --- a/Mac/Lib/lib-compat/Mlte.py +++ b/Mac/Lib/lib-compat/Mlte.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Mlte import * diff --git a/Mac/Lib/lib-compat/QDOffscreen.py b/Mac/Lib/lib-compat/QDOffscreen.py index e902e4b6c967..a13c620ac2db 100644 --- a/Mac/Lib/lib-compat/QDOffscreen.py +++ b/Mac/Lib/lib-compat/QDOffscreen.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.QDOffscreen import * diff --git a/Mac/Lib/lib-compat/Qd.py b/Mac/Lib/lib-compat/Qd.py index 74e3b93cd7ef..ccfa80d2928c 100644 --- a/Mac/Lib/lib-compat/Qd.py +++ b/Mac/Lib/lib-compat/Qd.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Qd import * diff --git a/Mac/Lib/lib-compat/Qdoffs.py b/Mac/Lib/lib-compat/Qdoffs.py index 4f7744cd9262..b1f033b590ca 100644 --- a/Mac/Lib/lib-compat/Qdoffs.py +++ b/Mac/Lib/lib-compat/Qdoffs.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Qdoffs import * diff --git a/Mac/Lib/lib-compat/Qt.py b/Mac/Lib/lib-compat/Qt.py index a694792c00f6..1b91fabfabff 100644 --- a/Mac/Lib/lib-compat/Qt.py +++ b/Mac/Lib/lib-compat/Qt.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Qt import * diff --git a/Mac/Lib/lib-compat/QuickDraw.py b/Mac/Lib/lib-compat/QuickDraw.py index d543183b249f..d92fda598eeb 100644 --- a/Mac/Lib/lib-compat/QuickDraw.py +++ b/Mac/Lib/lib-compat/QuickDraw.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.QuickDraw import * diff --git a/Mac/Lib/lib-compat/QuickTime.py b/Mac/Lib/lib-compat/QuickTime.py index 80e1bcc67174..e80bdba64d6c 100644 --- a/Mac/Lib/lib-compat/QuickTime.py +++ b/Mac/Lib/lib-compat/QuickTime.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.QuickTime import * diff --git a/Mac/Lib/lib-compat/Res.py b/Mac/Lib/lib-compat/Res.py index ea3d20a963ea..e43f49bd8e7f 100644 --- a/Mac/Lib/lib-compat/Res.py +++ b/Mac/Lib/lib-compat/Res.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Res import * diff --git a/Mac/Lib/lib-compat/Resources.py b/Mac/Lib/lib-compat/Resources.py index e4540d9ab44a..ec60421e3f6d 100644 --- a/Mac/Lib/lib-compat/Resources.py +++ b/Mac/Lib/lib-compat/Resources.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Resources import * diff --git a/Mac/Lib/lib-compat/Scrap.py b/Mac/Lib/lib-compat/Scrap.py index a2192aa49b81..2af9d5939e12 100644 --- a/Mac/Lib/lib-compat/Scrap.py +++ b/Mac/Lib/lib-compat/Scrap.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Scrap import * diff --git a/Mac/Lib/lib-compat/Snd.py b/Mac/Lib/lib-compat/Snd.py index 9c3000425159..0d2920cfe1db 100644 --- a/Mac/Lib/lib-compat/Snd.py +++ b/Mac/Lib/lib-compat/Snd.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Snd import * diff --git a/Mac/Lib/lib-compat/Sndihooks.py b/Mac/Lib/lib-compat/Sndihooks.py index be704773f9ee..8a98520f6037 100644 --- a/Mac/Lib/lib-compat/Sndihooks.py +++ b/Mac/Lib/lib-compat/Sndihooks.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Sndihooks import * diff --git a/Mac/Lib/lib-compat/Sound.py b/Mac/Lib/lib-compat/Sound.py index fc3c3bb3f152..4666c036bf0d 100644 --- a/Mac/Lib/lib-compat/Sound.py +++ b/Mac/Lib/lib-compat/Sound.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Sound import * diff --git a/Mac/Lib/lib-compat/TE.py b/Mac/Lib/lib-compat/TE.py index fcadaf873088..018313fbb26b 100644 --- a/Mac/Lib/lib-compat/TE.py +++ b/Mac/Lib/lib-compat/TE.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.TE import * diff --git a/Mac/Lib/lib-compat/TextEdit.py b/Mac/Lib/lib-compat/TextEdit.py index b1c3fbf67d77..5add4e4f3dba 100644 --- a/Mac/Lib/lib-compat/TextEdit.py +++ b/Mac/Lib/lib-compat/TextEdit.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.TextEdit import * diff --git a/Mac/Lib/lib-compat/Win.py b/Mac/Lib/lib-compat/Win.py index f8e64dd10b22..3982dea7191d 100644 --- a/Mac/Lib/lib-compat/Win.py +++ b/Mac/Lib/lib-compat/Win.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Win import * diff --git a/Mac/Lib/lib-compat/Windows.py b/Mac/Lib/lib-compat/Windows.py index 06da2f14e431..852a0b75c045 100644 --- a/Mac/Lib/lib-compat/Windows.py +++ b/Mac/Lib/lib-compat/Windows.py @@ -1 +1,4 @@ +import warnings +warnings.warn("The %s module is deprecated; use Carbon.%s"%(__name__, __name__), + DeprecationWarning, stacklevel=2) from Carbon.Windows import *