[Python-checkins] python/dist/src/Lib/plat-mac macfs.py,1.4,1.5

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Tue, 21 Jan 2003 14:58:41 -0800


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv2921

Modified Files:
	macfs.py 
Log Message:
Added DepracationWarnings to the old Standard File calls.


Index: macfs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/macfs.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** macfs.py	21 Jan 2003 15:31:16 -0000	1.4
--- macfs.py	21 Jan 2003 22:58:39 -0000	1.5
***************
*** 7,10 ****
--- 7,11 ----
  import Carbon.File
  import Nav
+ import warnings
  
  # First step: ensure we also emulate the MACFS module, which contained
***************
*** 144,147 ****
--- 145,150 ----
  	specifying 4-char file types that are allowable"""
  	import EasyDialogs
+ 	warnings.warn("macfs.StandardGetFile and friends are deprecated, use EasyDialogs.AskFileForOpen",
+               DeprecationWarning, stacklevel=2)
  	if not typelist:
  		typelist = None
***************
*** 154,157 ****
--- 157,162 ----
  	default output filename"""
  	import EasyDialogs
+ 	warnings.warn("macfs.StandardGetFile and friends are deprecated, use EasyDialogs.AskFileForOpen",
+               DeprecationWarning, stacklevel=2)
  	fss = EasyDialogs.AskFileForSave(wanted=FSSpec, message=prompt, 
  	savedFileName=default, defaultLocation=_handleSetFolder())
***************
*** 160,163 ****
--- 165,170 ----
  def SetFolder(folder):
  	global _curfolder
+ 	warnings.warn("macfs.StandardGetFile and friends are deprecated, use EasyDialogs.AskFileForOpen",
+               DeprecationWarning, stacklevel=2)
  	if _curfolder:
  		rv = FSSpec(_curfolder)
***************
*** 176,179 ****
--- 183,188 ----
  	"""Ask the user to select a folder. Optionally you can give a prompt."""
  	import EasyDialogs
+ 	warnings.warn("macfs.StandardGetFile and friends are deprecated, use EasyDialogs.AskFileForOpen",
+               DeprecationWarning, stacklevel=2)
  	fss = EasyDialogs.AskFolder(message=prompt, wanted=FSSpec, 
  		defaultLocation=_handleSetFolder())