SVN: zope.testing/branches/regebro-python3-reloaded/src/zope/testing/ Now it seems to be mostly genuine changes and incompatibilities between Python 2 and 3, including the empty line in diffs.

Lennart Regebro <[email protected]>
Newsgroups gmane.comp.web.zope.zope3.cvs
Message-ID <20091208115155.4D8559417F__14451.8944471658$1260273126$gmane$org@cvs.zope.org>
Log message for revision 106276:
  Now it seems to be mostly genuine changes and incompatibilities between Python 2 and 3, including the empty line in diffs.
  

Changed:
  U   zope.testing/branches/regebro-python3-reloaded/src/zope/testing/server.py
  U   zope.testing/branches/regebro-python3-reloaded/src/zope/testing/tests.py

-=-
Modified: zope.testing/branches/regebro-python3-reloaded/src/zope/testing/server.py
===================================================================
--- zope.testing/branches/regebro-python3-reloaded/src/zope/testing/server.py	2009-12-08 11:34:54 UTC (rev 106275)
+++ zope.testing/branches/regebro-python3-reloaded/src/zope/testing/server.py	2009-12-08 11:51:55 UTC (rev 106276)
@@ -24,7 +24,11 @@
 
 $Id$
 """
-import urllib2
+try:
+    # A bug in Python 3.1's fixer doesn't handle this conversion:
+    from urllib2 import urlparse
+except:
+    from urllib import parse as urlparse
 import webbrowser
 from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
 import sys
@@ -80,10 +84,10 @@
         'http://localhost:555/index.html'
 
     """
-    (scheme, netloc, url, query, fragment) = urllib2.urlparse.urlsplit(url)
+    (scheme, netloc, url, query, fragment) = urlparse.urlsplit(url)
     netloc = netloc.split(':')[0]
     netloc = "%s:%s" % (netloc, port)
-    url = urllib2.urlparse.urlunsplit((scheme, netloc, url, query, fragment))
+    url = urlparse.urlunsplit((scheme, netloc, url, query, fragment))
     return url
 
 

Modified: zope.testing/branches/regebro-python3-reloaded/src/zope/testing/tests.py
===================================================================
--- zope.testing/branches/regebro-python3-reloaded/src/zope/testing/tests.py	2009-12-08 11:34:54 UTC (rev 106275)
+++ zope.testing/branches/regebro-python3-reloaded/src/zope/testing/tests.py	2009-12-08 11:51:55 UTC (rev 106276)
@@ -18,7 +18,8 @@
 
 import re
 import unittest
-import doctest, renormalizing
+import doctest
+import renormalizing
 
 def test_suite():
     return unittest.TestSuite((
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.