[Python-checkins] python/dist/src/Lib random.py, 1.51.8.2, 1.51.8.3 sets.py, 1.44.8.2, 1.44.8.3

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Mon Sep 8 13:15:45 EDT 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv12475
Modified Files:
 Tag: release23-maint
	random.py sets.py 
Log Message:
Set the warnings stacklevel to two.
Index: random.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/random.py,v
retrieving revision 1.51.8.2
retrieving revision 1.51.8.3
diff -C2 -d -r1.51.8.2 -r1.51.8.3
*** random.py	5 Sep 2003 21:40:30 -0000	1.51.8.2
--- random.py	8 Sep 2003 19:15:43 -0000	1.51.8.3
***************
*** 334,339 ****
 import warnings
 warnings.warn("The cunifvariate function is deprecated; Use (mean "
! "+ arc * (Random.random() - 0.5)) % Math.pi instead",
! DeprecationWarning)
 
 return (mean + arc * (self.random() - 0.5)) % _pi
--- 334,339 ----
 import warnings
 warnings.warn("The cunifvariate function is deprecated; Use (mean "
! "+ arc * (Random.random() - 0.5)) % Math.pi instead.",
! DeprecationWarning, 2)
 
 return (mean + arc * (self.random() - 0.5)) % _pi
***************
*** 488,493 ****
 import warnings
 warnings.warn("The stdgamma function is deprecated; "
! "use gammavariate() instead",
! DeprecationWarning)
 return self.gammavariate(alpha, 1.0)
 
--- 488,493 ----
 import warnings
 warnings.warn("The stdgamma function is deprecated; "
! "use gammavariate() instead.",
! DeprecationWarning, 2)
 return self.gammavariate(alpha, 1.0)
 
Index: sets.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sets.py,v
retrieving revision 1.44.8.2
retrieving revision 1.44.8.3
diff -C2 -d -r1.44.8.2 -r1.44.8.3
*** sets.py	17 Aug 2003 22:08:58 -0000	1.44.8.2
--- sets.py	8 Sep 2003 19:15:43 -0000	1.44.8.3
***************
*** 503,508 ****
 import warnings
 warnings.warn("The update() method is going to be deprecated; "
! "Use union_update() instead",
! PendingDeprecationWarning)
 self._update(iterable)
 
--- 503,508 ----
 import warnings
 warnings.warn("The update() method is going to be deprecated; "
! "Use union_update() instead.",
! PendingDeprecationWarning, 2)
 self._update(iterable)
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /