[Zope-Checkins] CVS: Zope/lib/python/ZServer/medusa/test - max_sockets.py:1.7

Fred L. Drake, Jr. fred@zope.com
Fri, 11 Jul 2003 10:01:42 -0400


Update of /cvs-repository/Zope/lib/python/ZServer/medusa/test
In directory cvs.zope.org:/tmp/cvs-serv26954

Modified Files:
	max_sockets.py 
Log Message:
In Python 2.3, range() cares that it was passed integer types, so pass
an integer to avoid an unhelpful deprecation warning.  (Before Python
2.3, range() and many other built-in functions accepted floats as ints
"by accident"; those cases now generate warnings when passes a float.)


=== Zope/lib/python/ZServer/medusa/test/max_sockets.py 1.6 => 1.7 ===
--- Zope/lib/python/ZServer/medusa/test/max_sockets.py:1.6	Tue Mar 18 16:16:49 2003
+++ Zope/lib/python/ZServer/medusa/test/max_sockets.py	Fri Jul 11 10:01:37 2003
@@ -50,7 +50,7 @@
     while 1:
         try:
             num = len(sl)
-            for i in range(1 + len(sl) * 0.05):
+            for i in range(1 + int(len(sl) * 0.05)):
                     # Increase exponentially.
                 s = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
                 s.bind (('',0))