[Zope3-checkins] 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
regebro at gmail.com
Tue Dec 8 06:51:55 EST 2009
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((
More information about the Zope3-Checkins
mailing list