[Checkins] SVN: zc.buildout/branches/regebro-python3/ Loads of fixes.

Lennart Regebro regebro at gmail.com
Sun Nov 21 12:16:47 EST 2010


Log message for revision 118518:
  Loads of fixes.
  

Changed:
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/__init__.py
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.py
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/repeatable.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/runsetup.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/update.txt
  U   zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt
  U   zc.buildout/branches/regebro-python3/test_all_pythons.cfg
  U   zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt
  U   zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
  U   zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/README.txt
  U   zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/api.txt
  U   zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/custom.txt
  U   zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt

-=-
Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/__init__.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/__init__.py	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/__init__.py	2010-11-21 17:16:47 UTC (rev 118518)
@@ -21,4 +21,4 @@
     """
 
     def __str__(self):
-        return " ".join(map(str, self))
+        return " ".join(map(str, self.args))

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -91,7 +91,8 @@
     >>> cat(sample_buildout, 'buildout.cfg')
     [buildout]
     parts =
-
+    <BLANKLINE>
+    
 A part is simply something to be created by a buildout.  It can be
 almost anything, such as a Python package, a program, a directory, or
 even a configuration file.
@@ -811,7 +812,7 @@
     ...         items = self.options.items()
     ...         items.sort()
     ...         for option, value in items:
-    ...             print option, value
+    ...             print(option, value)
     ...         return ()
     ...
     ...     update = install
@@ -1143,8 +1144,8 @@
     >>> write(sample_buildout, 'demo', 'demo.py',
     ... """
     ... def ext(buildout):
-    ...     print [part['option'] for name, part in buildout.items() \
-    ...           if name.startswith('part')]
+    ...     print([part['option'] for name, part in buildout.items() \
+    ...           if name.startswith('part')])
     ... """)
 
     >>> write(sample_buildout, 'demo', 'setup.py',
@@ -1562,7 +1563,7 @@
     ...         self.options = options
     ...
     ...     def install(self):
-    ...         print "chkconfig --add %s" % self.options['script']
+    ...         print("chkconfig --add %s" % self.options['script'])
     ...         return ()
     ...
     ...     def update(self):
@@ -1570,7 +1571,7 @@
     ...
     ...
     ... def uninstall_service(name, options):
-    ...     print "chkconfig --del %s" % options['script']
+    ...     print("chkconfig --del %s" % options['script'])
     ... """)
 
 To use these recipes we must register them using entry points. Make
@@ -1684,7 +1685,7 @@
     ... def backup_directory(name, options):
     ...     path = options['path']
     ...     size = len(os.listdir(path))
-    ...     print "backing up directory %s of size %s" % (path, size)
+    ...     print("backing up directory %s of size %s" % (path, size))
     ... """)
 
 It must be registered with the zc.buildout.uninstall entry
@@ -2738,9 +2739,9 @@
     >>> write(sample_bootstrapped, 'demo', 'demo.py',
     ... """
     ... def ext(buildout):
-    ...     print 'ext', list(buildout)
+    ...     print('ext ' + str(list(buildout)))
     ... def unload(buildout):
-    ...     print 'unload', list(buildout)
+    ...     print('unload ' + str(list(buildout)))
     ... """)
 
     >>> write(sample_bootstrapped, 'demo', 'setup.py',

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.py	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.py	2010-11-21 17:16:47 UTC (rev 118518)
@@ -186,6 +186,8 @@
         i, o = (p.stdin, p.stdout)
         i.close()
         version = o.read().strip()
+        if not isinstance(version, str): # It's probably Python 3 and bytes so
+            version = version.decode()   # make it a string
         o.close()
         pystring, version = version.split()
         assert pystring == 'Python'

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/easy_install.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -785,8 +785,8 @@
 
     >>> write('ascript', '''
     ... "demo doc"
-    ... print sys.argv
-    ... print (__name__, __file__, __doc__)
+    ... print(sys.argv)
+    ... print(__name__, __file__, __doc__)
     ... ''')
     >>> print(system(join(bin, 'py')+' ascript a b c'), end=' ')
     ['ascript', 'a', 'b', 'c']
@@ -1110,10 +1110,10 @@
 
 Here are some examples of the interpreter in use.
 
-    >>> print(call_py(interpreter_path, "print 16+26"))
+    >>> print(call_py(interpreter_path, "print(16+26)"))
     42
     <BLANKLINE>
-    >>> res = call_py(interpreter_path, "import sys; print sys.path")
+    >>> res = call_py(interpreter_path, "import sys; print(sys.path)")
     >>> print(res) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     ['',
      '/interpreter/parts/interpreter',
@@ -1144,7 +1144,7 @@
     >>> cat(sitecustomize_path)
     import os
     os.environ['FOO'] = 'bar baz bing shazam'
-    >>> print(call_py(interpreter_path, "import os; print os.environ['FOO']"))
+    >>> print(call_py(interpreter_path, "import os; print(os.environ['FOO'])"))
     bar baz bing shazam
     <BLANKLINE>
 
@@ -1305,7 +1305,7 @@
 this package give the feature a more thorough workout, but this should
 give you an idea of the feature.
 
-    >>> res = call_py(interpreter_path, "import sys; print sys.path")
+    >>> res = call_py(interpreter_path, "import sys; print(sys.path)")
     >>> print(res) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     ['',
      '/interpreter/parts/interpreter',
@@ -1376,7 +1376,7 @@
     <BLANKLINE>
     def original_addsitepackages(known_paths):...
 
-    >>> print(call_py(interpreter_path, "import sys; print sys.path"))
+    >>> print(call_py(interpreter_path, "import sys; print(sys.path)"))
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     ['',
      '/interpreter/parts/interpreter',
@@ -1441,7 +1441,7 @@
     <BLANKLINE>
     def original_addsitepackages(known_paths):...
 
-    >>> print(call_py(interpreter_path, "import sys; print sys.path"))
+    >>> print(call_py(interpreter_path, "import sys; print(sys.path)"))
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     ['',
      '/interpreter/parts/interpreter',

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/repeatable.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/repeatable.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/repeatable.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -24,7 +24,7 @@
     ... class Recipe:
     ...     def __init__(*a): pass
     ...     def install(self):
-    ...         print 'recipe v1'
+    ...         print('recipe v1')
     ...         return ()
     ...     update = install
     ... ''')
@@ -50,7 +50,7 @@
     ... class Recipe:
     ...     def __init__(*a): pass
     ...     def install(self):
-    ...         print 'recipe v2'
+    ...         print('recipe v2')
     ...         return ()
     ...     update = install
     ... ''')

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/runsetup.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/runsetup.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/runsetup.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -17,7 +17,7 @@
 To illustrate this, we'll create a package in a sample buildout:
 
     >>> mkdir('hello')
-    >>> write('hello', 'hello.py', 'print "Hello World!"')
+    >>> write('hello', 'hello.py', 'print("Hello World!")')
     >>> write('hello', 'README', 'This is hello')
     >>> write('hello', 'setup.py',
     ... """

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py	2010-11-21 17:16:47 UTC (rev 118518)
@@ -168,7 +168,7 @@
         if os.path.exists(e):
             return e
     else:
-        cmd = 'python%s -c "import sys; print sys.executable"' % version
+        cmd = 'python%s -c "import sys; print(sys.executable)"' % version
         p = subprocess.Popen(cmd,
                              shell=True,
                              stdin=subprocess.PIPE,
@@ -181,7 +181,7 @@
         o.close()
         if os.path.exists(e):
             return e
-        cmd = 'python -c "import sys; print \'%s.%s\' % sys.version_info[:2]"'
+        cmd = 'python -c "import sys; print(\'%s.%s\' % sys.version_info[:2])"'
         p = subprocess.Popen(cmd,
                              shell=True,
                              stdin=subprocess.PIPE,
@@ -193,7 +193,7 @@
         e = o.read().strip()
         o.close()
         if e == version:
-            cmd = 'python -c "import sys; print sys.executable"'
+            cmd = 'python -c "import sys; print(sys.executable)"'
             p = subprocess.Popen(cmd,
                                 shell=True,
                                 stdin=subprocess.PIPE,

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py	2010-11-21 17:16:47 UTC (rev 118518)
@@ -48,7 +48,7 @@
     ... parts =
     ... ''')
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')))
     Develop: '/sample-buildout/foo'
 
     >>> ls('develop-eggs')
@@ -76,7 +76,7 @@
     ... parts =
     ... ''')
 
-    >>> print system(join('bin', 'buildout')+' -vv'), # doctest: +ELLIPSIS
+    >>> print(system(join('bin', 'buildout')+' -vv'), end=' ') # doctest: +ELLIPSIS
     Installing...
     Develop: '/sample-buildout/foo'
     ...
@@ -88,7 +88,7 @@
     -  z3c.recipe.scripts.egg-link
     -  zc.recipe.egg.egg-link
 
-    >>> print system(join('bin', 'buildout')+' -vvv'), # doctest: +ELLIPSIS
+    >>> print(system(join('bin', 'buildout')+' -vvv'), end=' ') # doctest: +ELLIPSIS
     Installing...
     Develop: '/sample-buildout/foo'
     in: '/sample-buildout/foo'
@@ -129,7 +129,7 @@
     ... z = ${buildout:x}
     ... ''')
 
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
     ... # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     While:
       Initializing.
@@ -151,7 +151,7 @@
     ... x = ${bui$ldout:y}
     ... ''')
 
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
     While:
       Initializing.
       Getting section buildout.
@@ -168,7 +168,7 @@
     ... x = ${buildout:y{z}
     ... ''')
 
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
     While:
       Initializing.
       Getting section buildout.
@@ -187,7 +187,7 @@
     ... x = ${parts}
     ... ''')
 
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
     While:
       Initializing.
       Getting section buildout.
@@ -204,7 +204,7 @@
     ... x = ${buildout:y:z}
     ... ''')
 
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
     While:
       Initializing.
       Getting section buildout.
@@ -221,7 +221,7 @@
     ... parts = x
     ... ''')
 
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
     While:
       Installing.
       Getting section x.
@@ -239,7 +239,7 @@
     ... foo = 1
     ... ''')
 
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
     While:
       Installing.
     Error: Missing option: x:recipe
@@ -288,7 +288,7 @@
     ...        samplez
     ... ''' % globals())
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/sampley'
     Develop: '/sample-buildout/samplez'
     Installing eggs.
@@ -321,7 +321,7 @@
 
 If we use the verbose switch, we can see where requirements are coming from:
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     We have a develop egg: zc.buildout 1.0.0
     We have the best distribution that satisfies 'setuptools'.
@@ -372,7 +372,7 @@
     ... eggs = samplea
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/sampley'
     Develop: '/sample-buildout/samplea'
     Develop: '/sample-buildout/sampleb'
@@ -420,7 +420,7 @@
 indicate the eggs from site-packages that have been selected.  You'll see
 we have two: demo 0.3 and demoneeded 1.1.
 
-    >>> print system(buildout+" -v"),
+    >>> print(system(buildout+" -v"), end=' ')
     Installing 'zc.buildout', 'setuptools'.
     We have a develop egg: zc.buildout V
     We have the best distribution that satisfies 'setuptools'.
@@ -506,14 +506,14 @@
     >>> os.chdir(sample_buildout)
     >>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Installing debug.
 
 If we run the buildout again, we shoudn't get a message about
 uninstalling anything because the configuration hasn't changed.
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Updating debug.
 """
@@ -577,7 +577,7 @@
     >>> write('demo', 'demo.py',
     ... '''
     ... def main():
-    ...     print 'Python 2.5'
+    ...     print('Python 2.5')
     ... ''')
 
     >>> write('buildout.cfg',
@@ -587,7 +587,7 @@
     ... parts =
     ... ''')
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/demo'
 
     >>> import zc.buildout.easy_install
@@ -597,7 +597,7 @@
     ...      ['demo'], ws, sys.executable, 'bin'))
     True
 
-    >>> print system(join('bin', 'demo')),
+    >>> print(system(join('bin', 'demo')), end=' ')
     Python 2.5
 
 Now, finally, let's test _get_version:
@@ -616,7 +616,7 @@
     ... x = ${foo:bar}
     ... ''')
 
-    >>> print system(buildout + ' foo:bar=1 -vv'), # doctest: +ELLIPSIS
+    >>> print(system(buildout + ' foo:bar=1 -vv'), end=' ') # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     ...
     [foo]
@@ -627,7 +627,7 @@
 
 def test_help():
     """
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')+' -h'),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')+' -h'), end=' ')
     ... # doctest: +ELLIPSIS
     Usage: buildout [options] [assignments] [command [command arguments]]
     <BLANKLINE>
@@ -636,8 +636,8 @@
       -h, --help
     ...
 
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')
-    ...              +' --help'),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')
+    ...              +' --help'), end=' ')
     ... # doctest: +ELLIPSIS
     Usage: buildout [options] [assignments] [command [command arguments]]
     <BLANKLINE>
@@ -663,8 +663,8 @@
     ... ''')
 
     >>> os.chdir(d)
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')
-    ...              + ' bootstrap'),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')
+    ...              + ' bootstrap'), end=' ')
     Creating directory '/sample-bootstrap/bin'.
     Creating directory '/sample-bootstrap/parts'.
     Creating directory '/sample-bootstrap/eggs'.
@@ -690,15 +690,15 @@
     ... ''')
 
     >>> os.chdir(d)
-    >>> print system(os.path.join(sample_buildout, 'bin', 'buildout')
-    ...              + ' bootstrap'),
+    >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')
+    ...              + ' bootstrap'), end=' ')
     Creating directory '/sample-bootstrap/bin'.
     Creating directory '/sample-bootstrap/parts'.
     Creating directory '/sample-bootstrap/eggs'.
     Creating directory '/sample-bootstrap/develop-eggs'.
     Generated script '/sample-bootstrap/bin/buildout'.
 
-    >>> print system(os.path.join('bin', 'buildout')),
+    >>> print(system(os.path.join('bin', 'buildout')), end=' ')
     Unused options for buildout: 'scripts' 'eggs'.
 
     """
@@ -722,7 +722,7 @@
     ... parts =
     ... """)
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/foo'
 
     >>> ls('develop-eggs')
@@ -745,7 +745,7 @@
     ... parts =
     ... """)
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/foo'
     Develop: '/sample-buildout/bar'
 
@@ -763,7 +763,7 @@
     ... develop = bar
     ... parts =
     ... """)
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/bar'
 
 It is gone
@@ -780,7 +780,7 @@
     ... [buildout]
     ... parts =
     ... """)
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
 
 All gone
 
@@ -826,7 +826,7 @@
     ... parts =
     ... """)
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/foo'
 
 Now, if we generate a working set using the egg link, we will get a warning
@@ -845,7 +845,7 @@
     ...     ])]
     ['foox', 'setuptools']
 
-    >>> print handler
+    >>> print(handler)
     zc.buildout.easy_install WARNING
       Develop distribution: foox 0.0.0
     uses namespace packages but the distribution does not require setuptools.
@@ -863,7 +863,7 @@
     -  z3c.recipe.scripts.egg-link
     -  zc.recipe.egg.egg-link
 
-    >>> print 'START ->'; ls('eggs') # doctest: +ELLIPSIS
+    >>> print('START ->'); ls('eggs') # doctest: +ELLIPSIS
     START...
     -  foox-0.0.0-py2.4.egg
     ...
@@ -878,7 +878,7 @@
     ...     ])]
     ['foox', 'setuptools']
 
-    >>> print handler,
+    >>> print(handler, end=' ')
 
 We get the same behavior if the it is a depedency that uses a
 namespace package.
@@ -899,7 +899,7 @@
     ... parts =
     ... """)
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/foo'
     Develop: '/sample-buildout/bar'
 
@@ -911,7 +911,7 @@
     ...     ])]
     ['bar', 'foox', 'setuptools']
 
-    >>> print handler,
+    >>> print(handler, end=' ')
     zc.buildout.easy_install WARNING
       Develop distribution: foox 0.0.0
     uses namespace packages but the distribution does not require setuptools.
@@ -987,9 +987,9 @@
     ... class Install:
     ...     def __init__(*args): pass
     ...     def install(self):
-    ...         print 'installing'
+    ...         print('installing')
     ...         return ()
-    ... def uninstall(name, options): print 'uninstalling'
+    ... def uninstall(name, options): print('uninstalling')
     ... ''')
 
     >>> write('buildout.cfg', '''
@@ -1000,7 +1000,7 @@
     ... recipe = recipes:demo
     ... ''')
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/recipes'
     Installing demo.
     installing
@@ -1015,7 +1015,7 @@
     ... x = 1
     ... ''')
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/recipes'
     Uninstalling demo.
     Running uninstall recipe.
@@ -1030,7 +1030,7 @@
     ... parts =
     ... ''')
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/recipes'
     Uninstalling demo.
     Running uninstall recipe.
@@ -1045,7 +1045,7 @@
     >>> write('demo', 'demo.py',
     ... """
     ... def ext(buildout):
-    ...     print 'ext', list(buildout)
+    ...     print('ext ' + str(list(buildout)))
     ... """)
 
     >>> write('demo', 'setup.py',
@@ -1070,7 +1070,7 @@
     ... offline = true
     ... """)
 
-    >>> print system(join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
     ext ['buildout']
 
 
@@ -1108,20 +1108,20 @@
     ... ''')
 
 
-    >>> print system(join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/recipe'
     Installing foo.
 
     >>> mkdir('recipe', '.svn')
     >>> mkdir('recipe', 'CVS')
-    >>> print system(join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/recipe'
     Updating foo.
 
     >>> write('recipe', '.svn', 'x', '1')
     >>> write('recipe', 'CVS', 'x', '1')
 
-    >>> print system(join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/recipe'
     Updating foo.
 
@@ -1160,7 +1160,7 @@
     ... ''')
 
 
-    >>> print system(join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/recipe'
     Installing foo.
 
@@ -1177,7 +1177,7 @@
 
     >>> remove('recipe', 'some-file')
 
-    >>> print system(join(sample_buildout, 'bin', 'buildout')),
+    >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/recipe'
     Updating foo.
 
@@ -1185,7 +1185,7 @@
 
 def o_option_sets_offline():
     """
-    >>> print system(join(sample_buildout, 'bin', 'buildout')+' -vvo'),
+    >>> print(system(join(sample_buildout, 'bin', 'buildout')+' -vvo'), end=' ')
     ... # doctest: +ELLIPSIS
     <BLANKLINE>
     ...
@@ -1206,7 +1206,7 @@
     ... class Recipe:
     ...     def __init__(*a): pass
     ...     def install(self):
-    ...         print 'recipe v1'
+    ...         print('recipe v1')
     ...         return ()
     ...     update = install
     ... ''')
@@ -1221,7 +1221,7 @@
 
     >>> write('recipe', 'README', '')
 
-    >>> print system(buildout+' setup recipe bdist_egg'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
     Running setup script 'recipe/setup.py'.
     ...
 
@@ -1239,7 +1239,7 @@
     ... recipe = recipe
     ... ''' % join('recipe', 'dist'))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Getting distribution for 'recipe'.
     Got recipe 1.
     Installing foo.
@@ -1252,7 +1252,7 @@
     ... class Recipe:
     ...     def __init__(*a): pass
     ...     def install(self):
-    ...         print 'recipe v2'
+    ...         print('recipe v2')
     ...         return ()
     ...     update = install
     ... ''')
@@ -1266,25 +1266,25 @@
     ... ''')
 
 
-    >>> print system(buildout+' setup recipe bdist_egg'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
     Running setup script 'recipe/setup.py'.
     ...
 
 We won't get the update if we specify -N:
 
-    >>> print system(buildout+' -N'),
+    >>> print(system(buildout+' -N'), end=' ')
     Updating foo.
     recipe v1
 
 or if we use -o:
 
-    >>> print system(buildout+' -o'),
+    >>> print(system(buildout+' -o'), end=' ')
     Updating foo.
     recipe v1
 
 But we will if we use neither of these:
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Getting distribution for 'recipe'.
     Got recipe 2.
     Uninstalling foo.
@@ -1303,7 +1303,7 @@
     ... recipe = recipe ==1
     ... ''' % join('recipe', 'dist'))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling foo.
     Installing foo.
     recipe v1
@@ -1352,11 +1352,11 @@
     ... recipe = recipe
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipe'
     Installing foo.
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipe'
     Updating foo.
 
@@ -1388,7 +1388,7 @@
     ...     ['demo==0.2'], dest,
     ...     links=[link_server], index=link_server+'index/')
 
-    >>> print handler # doctest: +ELLIPSIS
+    >>> print(handler) # doctest: +ELLIPSIS
     zc.buildout.easy_install DEBUG
       Installing 'demo==0.2'.
     zc.buildout.easy_install DEBUG
@@ -1434,7 +1434,7 @@
     ... recipe = recipes:mkdir
     ... ''')
 
-    >>> print system(buildout), # doctest: +ELLIPSIS
+    >>> print(system(buildout), end=' ') # doctest: +ELLIPSIS
     Develop: '/sample-buildout/recipes'
     While:
       Installing.
@@ -1486,7 +1486,7 @@
     ... z = 1
     ... """)
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/.'
     Unused options for buildout: 'a'.
     Installing foo.
@@ -1554,19 +1554,19 @@
     ... recipe = recipes:clean
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Installing p1.
     Installing p2.
     Installing p3.
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Updating p1.
     Updating p2.
     Installing p3.
 
-    >>> print system(buildout+' buildout:parts='),
+    >>> print(system(buildout+' buildout:parts='), end=' ')
     Develop: '/sample-buildout/recipes'
     Uninstalling p2.
     Uninstalling p1.
@@ -1592,20 +1592,20 @@
     ... recipe = recipes:clean
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Installing p1.
     Installing p2.
     Installing p3.
     Installing p4.
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Updating p1.
     Updating p2.
     Updating p3.
 
-    >>> print system(buildout+' buildout:parts='),
+    >>> print(system(buildout+' buildout:parts='), end=' ')
     Develop: '/sample-buildout/recipes'
     Uninstalling p2.
     Uninstalling p1.
@@ -1633,7 +1633,7 @@
     ... recipe = recipes:clean
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Installing p1.
     Installing p2.
@@ -1660,7 +1660,7 @@
     ... x = 1
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Uninstalling p4.
     Updating p1.
@@ -1684,7 +1684,7 @@
     ... recipe = recipes:clean
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Uninstalling p1.
     Installing p1.
@@ -1717,7 +1717,7 @@
     ...     zip_safe=False)
     ... ''')
 
-    >>> print system(buildout+' setup badegg sdist'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' setup badegg sdist'), end=' ') # doctest: +ELLIPSIS
     Running setup script 'badegg/setup.py'.
     ...
 
@@ -1739,7 +1739,7 @@
     ... scripts = buildout=bo
     ... ''' % globals())
 
-    >>> print system(buildout);print 'X' # doctest: +ELLIPSIS
+    >>> print(system(buildout));print('X') # doctest: +ELLIPSIS
     Installing eggs.
     Getting distribution for 'badegg'.
     Got badegg 1.
@@ -1801,7 +1801,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing x.
     Getting distribution for 'demo'.
     Got demo 0.4c1.
@@ -1809,7 +1809,7 @@
     Got demoneeded 1.2c1.
     Generated script '/sample-buildout/bin/demo'.
 
-    >>> print system(join('bin', 'demo')),
+    >>> print(system(join('bin', 'demo')), end=' ')
     4 2
 
     >>> write('buildout.cfg',
@@ -1823,14 +1823,14 @@
     ... eggs = demo ==0.1
     ... ''' % globals())
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling x.
     Installing x.
     Getting distribution for 'demo==0.1'.
     Got demo 0.1.
     Generated script '/sample-buildout/bin/demo'.
 
-    >>> print system(join('bin', 'demo')),
+    >>> print(system(join('bin', 'demo')), end=' ')
     1 2
     """
 
@@ -1852,9 +1852,9 @@
 version 0.3 and demoneeded version 1.1.
 
     >>> py_path = make_py_with_system_install(make_py, sample_eggs)
-    >>> print call_py(
+    >>> print(call_py(
     ...     py_path,
-    ...     "import tellmy.version; print tellmy.version.__version__"),
+    ...     "import tellmy.version; print(tellmy.version.__version__)"))
     1.1
 
 Now here's a setup that would expose the bug, using the
@@ -1869,7 +1869,7 @@
     >>> for dist in workingset:
     ...     res = str(dist)
     ...     if res.startswith('tellmy.version'):
-    ...         print res
+    ...         print(res)
     ...         break
     tellmy.version 1.0
 
@@ -1889,9 +1889,9 @@
 tellmy.version 1.1, and tellmy.fortune 1.0.  tellmy.version 1.1 is installed.
 
     >>> py_path = make_py_with_system_install(make_py, sample_eggs)
-    >>> print call_py(
+    >>> print(call_py(
     ...     py_path,
-    ...     "import tellmy.version; print tellmy.version.__version__")
+    ...     "import tellmy.version; print(tellmy.version.__version__)"))
     1.1
     <BLANKLINE>
 
@@ -1918,12 +1918,12 @@
     ...        demo
     ... script-initialization =
     ...     import tellmy.version
-    ...     print tellmy.version.__version__
+    ...     print(tellmy.version.__version__)
     ...     import tellmy.fortune
-    ...     print tellmy.fortune.__version__
+    ...     print(tellmy.fortune.__version__)
     ... ''' % globals())
 
-    >>> print system(buildout)
+    >>> print(system(buildout))
     Installing eggs.
     Getting distribution for 'tellmy.version==1.0'.
     Got tellmy.version 1.0.
@@ -1950,16 +1950,16 @@
 we could not import tellmy.fortune at all.  The following are the correct
 results for the interpreter and for the script.
 
-    >>> print call_py(
+    >>> print(call_py(
     ...     join('bin', 'py'),
     ...     "import tellmy.version; " +
-    ...     "print tellmy.version.__version__; " +
+    ...     "print(tellmy.version.__version__); " +
     ...     "import tellmy.fortune; " +
-    ...     "print tellmy.fortune.__version__") # doctest: +ELLIPSIS
+    ...     "print(tellmy.fortune.__version__)")) # doctest: +ELLIPSIS
     1.0
     1.0...
 
-    >>> print system(join('bin', 'demo'))
+    >>> print(system(join('bin', 'demo')))
     1.0
     1.0
     4 2
@@ -2015,9 +2015,9 @@
     ...             zc.buildout.testing.sys_install(tmp, site_packages_path)
     ...     finally:
     ...         shutil.rmtree(tmp)
-    >>> print call_py(
+    >>> print(call_py(
     ...     py_path,
-    ...     "import tellmy.version; print tellmy.version.__version__")
+    ...     "import tellmy.version; print(tellmy.version.__version__)"))
     1.0
     <BLANKLINE>
     >>> write('buildout.cfg',
@@ -2055,7 +2055,7 @@
 the comment leading up to zc.buildout.easy_install._easy_install_cmd).
 Now the install works correctly, as seen here.
 
-    >>> print system(buildout)
+    >>> print(system(buildout))
     Installing eggs.
     Getting distribution for 'tellmy.version==1.1'.
     Got tellmy.version 1.1.
@@ -2344,7 +2344,7 @@
 site-packages are at the end.  They were not before this bugfix.
 
     >>> test = 'import pprint, sys; pprint.pprint(sys.path[-4:])'
-    >>> print call_py(join(interpreter_bin_dir, 'py'), test)
+    >>> print(call_py(join(interpreter_bin_dir, 'py'), test))
     ['/interpreter/eggs/other-1.0-pyN.N.egg',
      '/interpreter/eggs/demoneeded-1.1-pyN.N.egg',
      '/executable_buildout/eggs/setuptools-0.0-pyN.N.egg',
@@ -2374,7 +2374,7 @@
     >>> test = (
     ...     "import subprocess, sys; subprocess.call("
     ...     "[sys.executable, '-c', "
-    ...     "'import eggrecipedemo; print eggrecipedemo.x'])")
+    ...     "'import eggrecipedemo; print(eggrecipedemo.x)'])")
     >>> generated = zc.buildout.easy_install.sitepackage_safe_scripts(
     ...     interpreter_bin_dir, ws, sys.executable, interpreter_parts_dir,
     ...     reqs=['demo'], interpreter='py',
@@ -2382,13 +2382,13 @@
 
 This works for the script.
 
-    >>> print system(join(interpreter_bin_dir, 'demo'))
+    >>> print(system(join(interpreter_bin_dir, 'demo')))
     3
     <BLANKLINE>
 
 This also works for the generated interpreter.
 
-    >>> print call_py(join(interpreter_bin_dir, 'py'), test)
+    >>> print(call_py(join(interpreter_bin_dir, 'py'), test))
     3
     <BLANKLINE>
 
@@ -2411,7 +2411,7 @@
 You can also see, actually more easily than in the other example, that we
 have the desired eggs available.
 
-    >>> print system(join(interpreter_bin_dir, 'demo')), # doctest: +ELLIPSIS
+    >>> print(system(join(interpreter_bin_dir, 'demo')), end=' ') # doctest: +ELLIPSIS
     ['',
      '/interpreter/parts/interpreter',
      '/sample-buildout/foo',
@@ -2421,7 +2421,7 @@
 
 This also works for the generated interpreter, with identical results.
 
-    >>> print call_py(join(interpreter_bin_dir, 'py'), test),
+    >>> print(call_py(join(interpreter_bin_dir, 'py'), test), end=' ')
     ... # doctest: +ELLIPSIS
     ['',
      '/interpreter/parts/interpreter',
@@ -2514,7 +2514,7 @@
 
 Now, it is handled smoothly.
 
-    >>> print system(buildout)
+    >>> print(system(buildout))
     Develop: '/sample-buildout/recipes'
     Getting distribution for 'demoneeded==1.2c1'.
     Got demoneeded 1.2c1.
@@ -2575,7 +2575,7 @@
 
 Now we actually run the buildout.
 
-    >>> print system(buildout)
+    >>> print(system(buildout))
     Develop: '/sample-buildout/ns'
     Develop: '/sample-buildout/recipes'
     Uninstalling dummy.
@@ -2592,8 +2592,8 @@
         ...     p = subprocess.Popen(s, stdin=subprocess.PIPE,
         ...                 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
         ...     p.stdin.close()
-        ...     print p.stdout.read()
-        ...     print 'Exit:', bool(p.wait())
+        ...     print(p.stdout.read())
+        ...     print('Exit:', bool(p.wait()))
 
         >>> call(buildout)
         <BLANKLINE>
@@ -2664,11 +2664,11 @@
     ... import os
     ... class Bad:
     ...     def __init__(self, *_):
-    ...         print os.getcwd()
+    ...         print(os.getcwd())
     ...     def install(self):
-    ...         print os.getcwd()
+    ...         print(os.getcwd())
     ...         os.chdir('bad_start')
-    ...         print os.getcwd()
+    ...         print(os.getcwd())
     ...         return ()
     ... ''')
 
@@ -2691,8 +2691,8 @@
     ... ''')
 
     >>> os.chdir('bad_start')
-    >>> print system(join(sample_buildout, 'bin', 'buildout')
-    ...              +' -c '+join(sample_buildout, 'buildout.cfg')),
+    >>> print(system(join(sample_buildout, 'bin', 'buildout')
+    ...              +' -c '+join(sample_buildout, 'buildout.cfg')), end=' ')
     Develop: '/sample-buildout/.'
     /sample-buildout
     /sample-buildout
@@ -2721,7 +2721,7 @@
 
 
     >>> for dist in ws:
-    ...     print dist
+    ...     print(dist)
     demo 0.2
     demoneeded 1.1
 
@@ -2734,7 +2734,7 @@
 def bug_75607_buildout_should_not_run_if_it_creates_an_empty_buildout_cfg():
     """
     >>> remove('buildout.cfg')
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     While:
       Initializing.
     Error: Couldn't open /sample-buildout/buildout.cfg
@@ -2775,7 +2775,7 @@
     ... eggs = pack0
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/pack0'
     Develop: '/sample-buildout/pack1'
     Develop: '/sample-buildout/pack2'
@@ -2791,7 +2791,7 @@
 
     However, if we run in verbose mode, we can see why packages were included:
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     We have a develop egg: zc.buildout 1.0.0
     We have the best distribution that satisfies 'setuptools'.
@@ -2856,7 +2856,7 @@
     ...             },
     ...       )
     ... ''')
-    >>> print system(buildout+' setup '+src+' bdist_egg'),
+    >>> print(system(buildout+' setup '+src+' bdist_egg'), end=' ')
     ... # doctest: +ELLIPSIS
     Running setup ...
     creating 'dist/wackyextension-1-...
@@ -2880,7 +2880,7 @@
 When we run the buildout. it will load the extension from the dist
 directory and then use the wacky extension to load the demo package
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Getting distribution for 'wackyextension'.
     Got wackyextension 1.
     Installing demo.
@@ -2902,7 +2902,7 @@
     ... setup(name='foo')
     ... ''')
 
-    >>> print system(buildout+' setup test bdist_egg'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' setup test bdist_egg'), end=' ') # doctest: +ELLIPSIS
     Running setup script 'test/setup.py'.
     ...
 
@@ -3082,7 +3082,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     ...
     Picked: demo = 0.4c1
@@ -3104,7 +3104,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     ...
     Picked: demo = 0.4c1
@@ -3126,7 +3126,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     Installing 'zc.buildout', 'setuptools'.
     ...
     Picked: demo = 0.3
@@ -3147,7 +3147,7 @@
     ... eggs = demo
     ... ''' % globals())
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     While:
       Initializing.
     Error: Invalid value for prefer-final option: no
@@ -3181,7 +3181,7 @@
     ... recipe = demorecipe
     ... ''' % globals())
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     Installing ...
     Picked: demoextension = 1.0
     ...
@@ -3205,7 +3205,7 @@
     ... recipe = demorecipe
     ... ''' % globals())
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     Installing ...
     Picked: demoextension = 1.0
     ...
@@ -3227,7 +3227,7 @@
     ... recipe = demorecipe
     ... ''' % globals())
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     Installing ...
     Picked: demoextension = 1.1b1
     ...
@@ -3248,7 +3248,7 @@
     ... recipe = demorecipe
     ... ''' % globals())
 
-    >>> print system(buildout+' -v'), # doctest: +ELLIPSIS
+    >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
     While:
       Initializing.
     Error: Invalid value for accept-buildout-test-releases option: no
@@ -3278,7 +3278,7 @@
     ... parts =
     ... ''')
 
-    >>> print system(join('bin', 'buildout')),
+    >>> print(system(join('bin', 'buildout')), end=' ')
     Develop: '/sample-buildout/foo'
 
     >>> ls('develop-eggs')
@@ -3329,7 +3329,7 @@
     ...         pkg_resources.Requirement.parse('setuptools')).version,
     ...        distribute_version))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing foo.
     Getting distribution for 'foo==1'.
     Got foo 1.
@@ -3357,11 +3357,11 @@
     >>> write('t.py',
     ... '''
     ... import eggrecipedemo, eggrecipedemoneeded
-    ... print eggrecipedemo.main.func_code.co_filename
-    ... print eggrecipedemoneeded.f.func_code.co_filename
+    ... print(eggrecipedemo.main.func_code.co_filename)
+    ... print(eggrecipedemoneeded.f.func_code.co_filename)
     ... ''')
 
-    >>> print system(join('bin', 'py')+ ' t.py'),
+    >>> print(system(join('bin', 'py')+ ' t.py'), end=' ')
     /sample-buildout/eggs/demo-0.4c1-py2.4.egg/eggrecipedemo.py
     /sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg/eggrecipedemoneeded.py
 
@@ -3384,7 +3384,7 @@
     ... eggs-directory = ${buildout:directory}/develop-eggs
     ... parts =
     ... ''' % globals())
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
 
     """
 
@@ -3415,7 +3415,7 @@
 
     We can see that both eggs were found:
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/sampley'
     Develop: '/sample-buildout/samplez'
     Installing eggs.
@@ -3447,7 +3447,7 @@
     We should get one of the eggs, and a warning for the pattern that
     did not match anything.
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/samplea'
     Couldn't develop '/sample-buildout/grumble*' (not found)
     Installing eggs.
@@ -3502,7 +3502,7 @@
     ... <= p1
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing p1.
       foo='1\n2 b'
       recipe='zc.buildout:debug'
@@ -3542,7 +3542,7 @@
     ... x = ${buildout:bar-option} ${buildout:foo-option}
     ... ''')
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing p.
       recipe='zc.buildout:debug'
       x='bar\nbaz foo\nham'
@@ -3569,7 +3569,7 @@
     ... <= p1
     ... ''')
 
-    >>> print system(buildout+' buildout:parts+=p2 p1:foo+=bar'),
+    >>> print(system(buildout+' buildout:parts+=p2 p1:foo+=bar'), end=' ')
     Installing p1.
       foo='1 a\nb\nbar'
       recipe='zc.buildout:debug'
@@ -3704,7 +3704,7 @@
         tmp, 'eggrecipedemo.py',
         'import eggrecipedemoneeded\n'
         'x=%s\n'
-        'def main(): print x, eggrecipedemoneeded.y\n'
+        'def main(): print(x, eggrecipedemoneeded).y\n'
         % minor_version)
     write(
         tmp, 'setup.py',
@@ -3791,7 +3791,7 @@
 from distutils.core import setup, Extension
 
 if os.environ.get('test-variable'):
-    print "Have environment test-variable:", os.environ['test-variable']
+    print("Have environment test-variable: " + os.environ['test-variable'])
 
 setup(name = "extdemo", version = "%s", url="http://www.zope.org",
       author="Demo", author_email="demo at demo.com",
@@ -4188,3 +4188,4 @@
             ))
 
     return unittest.TestSuite(test_suite)
+

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/update.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/update.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/update.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -44,7 +44,7 @@
     ...     def install(self):
     ...         for project in 'zc.buildout', 'setuptools':
     ...             req = pkg_resources.Requirement.parse(project)
-    ...             print project, pkg_resources.working_set.find(req).version
+    ...             print(project + ' ' + pkg_resources.working_set.find(req).version)
     ...         return ()
     ...     update = install
     ... """)

Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/windows.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -21,7 +21,7 @@
     ...              name)
     ...
     ...     def install(self):
-    ...         print "can't remove read only files"
+    ...         print("can't remove read only files")
     ...         if not os.path.exists (self.location):
     ...             os.makedirs (self.location)
     ...

Modified: zc.buildout/branches/regebro-python3/test_all_pythons.cfg
===================================================================
--- zc.buildout/branches/regebro-python3/test_all_pythons.cfg	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/test_all_pythons.cfg	2010-11-21 17:16:47 UTC (rev 118518)
@@ -12,6 +12,11 @@
 # And then run "bin/buildout install test24 test25 test26" to build the
 # version-specific test scripts.  Once that's done you ran run "bin/test24"
 # (etc.).
+#
+# Note that all versions of Python will use the same version of 
+# setuptools/distribute, the one buildout is run with. This means you can
+# not run buildout with Python 3 and install test25 below, or run it with
+# Python 2 and install test31.
 
 [test24]
 python = python2.4
@@ -28,11 +33,6 @@
 recipe = ${test:recipe}
 eggs = ${test:eggs}
 
-[test31]
-python = python3.1
-recipe = ${test:recipe}
-eggs = ${test:eggs}
-
 [oltest24]
 python = python2.4
 recipe = ${oltest:recipe}
@@ -50,9 +50,3 @@
 recipe = ${oltest:recipe}
 eggs = ${oltest:eggs}
 defaults = ${oltest:defaults}
-
-[oltest31]
-python = python3.1
-recipe = ${oltest:recipe}
-eggs = ${oltest:eggs}
-defaults = ${oltest:defaults}

Modified: zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt
===================================================================
--- zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -111,7 +111,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing demo.
     Getting distribution for 'demo<0.3'.
     Got demo 0.2.
@@ -119,7 +119,7 @@
     Got demoneeded 1.2c1.
     Generated script '/sample-buildout/bin/demo'.
 
-    >>> print system(join(sample_buildout, 'bin', 'demo')),
+    >>> print(system(join(sample_buildout, 'bin', 'demo')), end=' ')
     2 2
 
 Interpreter generation
@@ -142,7 +142,7 @@
     ... interpreter = py
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
@@ -163,7 +163,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
@@ -198,8 +198,8 @@
 
 Here's an example of using the generated interpreter.
 
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ' -c "import sys, pprint; pprint.pprint(sys.path[-2:])"')
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ' -c "import sys, pprint; pprint.pprint(sys.path[-2:])"'))
     ['/sample-buildout/eggs/demo-0.2-pyN.N.egg',
      '/sample-buildout/eggs/demoneeded-1.2c1-pyN.N.egg']
     <BLANKLINE>
@@ -243,7 +243,7 @@
     ... import os
     ... os.environ['zc.buildout'] = 'foo bar baz shazam'
     ... ''')
-    >>> print site_packages_path
+    >>> print(site_packages_path)
     /executable_buildout/site-packages
 
 Now let's take a look at include-site-packages.
@@ -264,15 +264,15 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server, py_path=py_path))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling py.
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
 
 Now executable_buildout/site-packages is included in sys.path.
 
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import sys, pprint; pprint.pprint(sys.path)"''')
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import sys, pprint; pprint.pprint(sys.path)"'''))
     ... # doctest: +ELLIPSIS
     ['',
      '/sample-buildout/parts/py',
@@ -300,13 +300,13 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server, py_path=py_path))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling py.
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
 
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import sys, pprint; pprint.pprint(sys.path)"''')
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import sys, pprint; pprint.pprint(sys.path)"'''))
     ... # doctest: +ELLIPSIS
     ['',
      '/sample-buildout/parts/py',
@@ -359,7 +359,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Creating directory '/sample-buildout/tmpeggs'.
     Uninstalling py.
     Installing eggs.
@@ -387,7 +387,7 @@
     ... allowed-eggs-from-site-packages =
     ... eggs = demoneeded
     ... ''' % globals())
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Creating directory '/sample-buildout/tmpeggs'.
     Uninstalling eggs.
     Installing eggs.
@@ -426,7 +426,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing eggs.
 
    This fails:
@@ -449,7 +449,7 @@
     ... python = primed_python
     ... eggs = demoneeded
     ... ''' % globals())
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Creating directory '/sample-buildout/tmpeggs'.
     Uninstalling eggs.
     Installing eggs.
@@ -483,7 +483,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server, py_path=py_path))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
 
@@ -496,8 +496,8 @@
     import os
     os.environ['zc.buildout'] = 'foo bar baz shazam'
 
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import os; print os.environ['zc.buildout']"''')
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''))
     foo bar baz shazam
     <BLANKLINE>
 
@@ -520,7 +520,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server, py_path=py_path))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Updating py.
 
     >>> cat(sample_buildout, 'parts', 'py', 'sitecustomize.py')
@@ -532,8 +532,8 @@
     import os
     os.environ['zc.buildout'] = 'foo bar baz shazam'
 
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import os; print os.environ['zc.buildout']"''')
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''))
     foo bar baz shazam
     <BLANKLINE>
 
@@ -573,20 +573,20 @@
 
 Now let's put it in action.
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling py.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
     Installing python.
     Generated interpreter '/sample-buildout/bin/python'.
 
-    >>> print system(join(sample_buildout, 'bin', 'python') +
-    ...              ' -c "import sys, pprint; pprint.pprint(sys.path[-2:])"')
+    >>> print(system(join(sample_buildout, 'bin', 'python') +
+    ...              ' -c "import sys, pprint; pprint.pprint(sys.path[-2:])"'))
     ['/sample-buildout/eggs/demo-0.2-pyN.N.egg',
      '/sample-buildout/eggs/demoneeded-1.2c1-pyN.N.egg']
     <BLANKLINE>
-    >>> print system(join(sample_buildout, 'bin', 'python') +
-    ...              ''' -c "import os; print os.environ['zc.buildout']"'''),
+    >>> print(system(join(sample_buildout, 'bin', 'python') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), end=' ')
     foo bar baz shazam
 
 Note that the parts/py directory has been cleaned up, and parts/python has
@@ -612,21 +612,21 @@
     ... index = %(server)s/index
     ... interpreter = py
     ... script-initialization =
-    ...     print "Hi from the script"
+    ...     print("Hi from the script")
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling python.
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
     Generated interpreter '/sample-buildout/bin/py'.
 
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "print 'Hi from the interpreter'"'''),
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "print('Hi from the interpreter')"'''), end=' ')
     Hi from the interpreter
 
-    >>> print system(join(sample_buildout, 'bin', 'demo')),
+    >>> print(system(join(sample_buildout, 'bin', 'demo')), end=' ')
     Hi from the script
     2 2
 
@@ -646,14 +646,15 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing interpreter.
     Generated interpreter '/sample-buildout/bin/python2'.
 
-    >>> print system(join(sample_buildout, 'bin', 'python2') +
-    ...              ' -c "print 42"')
+    >>> print(system(join(sample_buildout, 'bin', 'python2') +
+    ...              ' -c "print(42)"'))
     42
     <BLANKLINE>
 
 The other options all identical to zc.recipe.egg.
+

Modified: zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
===================================================================
--- zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py	2010-11-21 17:16:47 UTC (rev 118518)
@@ -56,7 +56,7 @@
     ... python = custom_python
     ... ''' % dict(server=link_server, py_path=py_path))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing py.
     Getting distribution for 'demo<0.3'.
     Got demo 0.2.
@@ -64,8 +64,8 @@
     Got demoneeded 1.2c1.
     Generated interpreter '/sample-buildout/bin/py'.
 
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import os; print os.environ['zc.buildout']"'''),
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), end=' ')
     foo bar baz shazam
 """
 
@@ -93,11 +93,11 @@
     ...    ${buildout:directory}/spam
     ... ''' % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import sys;print 'path' + ' '.join(sys.path)"''')
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import sys;print('path' + ' '.join(sys.path))"'''))
     ... # doctest:+ELLIPSIS
     path.../foo/bar /sample-buildout/spam...
 
@@ -123,7 +123,7 @@
     ... index = %(server)s/index
     ... ''' % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing py.
     Getting distribution for 'demo<0.3'.
     Got demo 0.2.
@@ -136,8 +136,8 @@
     <BLANKLINE>
     import os
     os.environ['zc.buildout'] = 'foo bar baz shazam'
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import os; print os.environ['zc.buildout']"'''),
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), end=' ')
     foo bar baz shazam
 
 This also works with the exec-sitecustomize option, processing local
@@ -169,7 +169,7 @@
     ... python = custom_python
     ... ''' % dict(server=link_server, py_path=py_path))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling py.
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
@@ -186,11 +186,11 @@
     import os
     os.environ['zc.buildout'] = 'foo bar baz shazam'
 
-    >>> print system(join(sample_buildout, 'bin', 'py') + ' -c ' +
-    ...              '''"import os; print os.environ['zc.recipe.egg']"'''),
+    >>> print(system(join(sample_buildout, 'bin', 'py') + ' -c ' +
+    ...              '''"import os; print(os.environ['zc.recipe.egg'])"'''), end=' ')
     baLOOba
-    >>> print system(join(sample_buildout, 'bin', 'py') +
-    ...              ''' -c "import os; print os.environ['zc.buildout']"'''),
+    >>> print(system(join(sample_buildout, 'bin', 'py') +
+    ...              ''' -c "import os; print(os.environ['zc.buildout'])"'''), end=' ')
     foo bar baz shazam
 
 """
@@ -216,7 +216,7 @@
     ...    ${buildout:directory}/spam
     ... ''' % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing py.
     Generated interpreter '/sample-buildout/bin/py'.
 
@@ -274,7 +274,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing eggs.
 
 You can set the value false explicitly.  This makes it possible to
@@ -296,7 +296,7 @@
     ... python = primed_python
     ... eggs = demoneeded
     ... ''' % globals())
-    >>> print system(buildout)
+    >>> print(system(buildout))
     Uninstalling eggs.
     Installing eggs.
     Couldn't find index page for 'demoneeded' (maybe misspelled?)
@@ -321,7 +321,7 @@
     ... eggs = other
     ... ''' % globals())
 
-    >>> print system(buildout)
+    >>> print(system(buildout))
     While:
       Installing.
       Getting section eggs.
@@ -363,7 +363,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print system(buildout)
+    >>> print(system(buildout))
     Installing eggs.
     <BLANKLINE>
 
@@ -389,7 +389,7 @@
     ... eggs = demoneeded
     ... ''' % globals())
 
-    >>> print system(buildout)
+    >>> print(system(buildout))
     Uninstalling eggs.
     Installing eggs.
     <BLANKLINE>
@@ -463,3 +463,4 @@
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
 
+

Modified: zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/README.txt
===================================================================
--- zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -31,7 +31,7 @@
 
 We have a link server that has a number of distributions:
 
-    >>> print get(link_server),
+    >>> print(get(link_server), end=' ')
     <html><body>
     <a href="bigdemo-0.1-py2.3.egg">bigdemo-0.1-py2.3.egg</a><br>
     <a href="demo-0.1-py2.3.egg">demo-0.1-py2.3.egg</a><br>
@@ -67,7 +67,7 @@
 Let's run the buildout:
 
     >>> import os
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing demo.
     Getting distribution for 'demo<0.3'.
     Got demo 0.2.
@@ -111,7 +111,7 @@
     ... index = %(server)s/index
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
@@ -193,7 +193,7 @@
 specification. We were able to do this because the scripts recipe is
 the default entry point for the zc.recipe.egg egg.
 
-   >>> print system(buildout),
+   >>> print(system(buildout), end=' ')
    Uninstalling demo.
    Installing demo.
    Generated script '/sample-buildout/bin/demo'.
@@ -210,7 +210,7 @@
 
 If we run the demo script, it prints out some minimal data:
 
-    >>> print system(join(sample_buildout, 'bin', 'demo')),
+    >>> print(system(join(sample_buildout, 'bin', 'demo')), end=' ')
     2 2
 
 The value it prints out happens to be some values defined in the
@@ -219,13 +219,13 @@
 We can also run the py-demo script.  Here we'll just print out
 the bits if the path added to reflect the eggs:
 
-    >>> print system(join(sample_buildout, 'bin', 'py-demo'),
+    >>> print(system(join(sample_buildout, 'bin', 'py-demo'),
     ... """import os, sys
     ... for p in sys.path:
     ...     if 'demo' in p:
-    ...         print os.path.basename(p)
-    ...
-    ... """).replace('>>> ', '').replace('... ', ''),
+    ...         print(os.path.basename(p))
+    ... 
+    ... """).replace('>>> ', '').replace('... ', ''), end=' ')
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     demo-0.2-py2.4.egg
     demoneeded-1.2c1-py2.4.egg
@@ -251,7 +251,7 @@
 
 and run the buildout in non-newest mode:
 
-    >>> print system(buildout+' -N'),
+    >>> print(system(buildout+' -N'), end=' ')
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
@@ -262,7 +262,7 @@
 
 We'll also run the buildout in off-line mode:
 
-    >>> print system(buildout+' -o'),
+    >>> print(system(buildout+' -o'), end=' ')
     Updating demo.
 
 We didn't get an update for demo:
@@ -276,7 +276,7 @@
 If we run the buildout on the default online and newest modes,
 we'll get an update for demo:
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Updating demo.
     Getting distribution for 'demo'.
     Got demo 0.4c1.
@@ -293,7 +293,7 @@
 
 The script is updated too:
 
-    >>> print system(join(sample_buildout, 'bin', 'demo')),
+    >>> print(system(join(sample_buildout, 'bin', 'demo')), end=' ')
     4 2
 
 Controlling script generation
@@ -316,7 +316,7 @@
     ... """ % dict(server=link_server))
 
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing demo.
 
@@ -337,7 +337,7 @@
     ... scripts = demo=foo
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -367,7 +367,7 @@
     ...    ${buildout:directory}/spam
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -414,7 +414,7 @@
     ...    ${buildout:directory}/spam
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -463,7 +463,7 @@
     ...    ${buildout:directory}/spam
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -516,7 +516,7 @@
     ... arguments = a, 2
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
@@ -566,7 +566,7 @@
     ... entry-points = alt=eggrecipedemo:alt other=foo.bar:a.b.c
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling demo.
     Installing demo.
     Generated script '/sample-buildout/bin/demo'.
@@ -613,7 +613,7 @@
     ... index = %(server)s/index
     ... dependent-scripts = true
     ... """ % dict(server=link_server))
-    >>> print system(buildout+' -N'),
+    >>> print(system(buildout+' -N'), end=' ')
     Uninstalling demo.
     Installing bigdemo.
     Getting distribution for 'bigdemo'.
@@ -638,8 +638,9 @@
     ... scripts = demo=foo
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Uninstalling bigdemo.
     Installing demo.
     Generated script '/sample-buildout/bin/foo'.
 
+

Modified: zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/api.txt
===================================================================
--- zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/api.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/api.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -30,14 +30,14 @@
     ...     def install(self):
     ...         extras = self.options['extras'].split()
     ...         requirements, ws = self.egg.working_set(extras)
-    ...         print 'Part:', self.name
-    ...         print 'Egg requirements:'
+    ...         print('Part: ' + self.name)
+    ...         print('Egg requirements:')
     ...         for r in requirements:
-    ...             print r
-    ...         print 'Working set:'
+    ...             print(r)
+    ...         print('Working set:')
     ...         for d in ws:
-    ...             print d
-    ...         print 'extra paths:', self.egg.extra_paths
+    ...             print(d)
+    ...         print('extra paths: ' + self.egg.extra_paths)
     ...         return ()
     ...
     ...     update = install
@@ -81,7 +81,7 @@
     >>> import os
     >>> os.chdir(sample_buildout)
     >>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
-    >>> print system(buildout + ' -q'),
+    >>> print(system(buildout + ' -q'), end=' ')
     Part: sample-part
     Egg requirements:
     demo<0.3
@@ -141,7 +141,7 @@
 Then we'll see that reflected in the extra_paths attribute in the egg
 recipe instance:
 
-    >>> print system(buildout + ' -q'),
+    >>> print(system(buildout + ' -q'), end=' ')
     Part: sample-part
     Egg requirements:
     demo<0.3
@@ -150,3 +150,4 @@
     other 1.0
     demoneeded 1.2c1
     extra paths: ['/foo/bar', '/spam/eggs']
+

Modified: zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/custom.txt
===================================================================
--- zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/custom.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/custom.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -137,7 +137,7 @@
     ...
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Installing extdemo.
     zip_safe flag not set; analyzing archive contents...
 
@@ -165,7 +165,7 @@
     ... """
     ... import extdemo
     ... def main():
-    ...     print extdemo.val
+    ...     print(extdemo.val)
     ... """)
 
     >>> write('demo', 'setup.py',
@@ -194,7 +194,7 @@
     ... entry-points = demo=demo:main
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/demo'
     Updating extdemo.
     Installing demo.
@@ -202,7 +202,7 @@
 
 When we run the script, we'll 42 printed:
 
-    >>> print system(join('bin', 'demo')),
+    >>> print(system(join('bin', 'demo')), end=' ')
     42
 
 Updating
@@ -217,12 +217,12 @@
 
 If we run the buildout in non-newest or offline modes:
 
-    >>> print system(buildout+' -N'),
+    >>> print(system(buildout+' -N'), end=' ')
     Develop: '/sample-buildout/demo'
     Updating extdemo.
     Updating demo.
 
-    >>> print system(buildout+' -o'),
+    >>> print(system(buildout+' -o'), end=' ')
     Develop: '/sample-buildout/demo'
     Updating extdemo.
     Updating demo.
@@ -239,7 +239,7 @@
 will. This time we also get the test-variable message again, because the new
 version is imported:
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/demo'
     Updating extdemo.
     zip_safe flag not set; analyzing archive contents...
@@ -278,7 +278,7 @@
     ... entry-points = demo=demo:main
     ... """ % dict(server=link_server))
 
-    >>> print system(buildout+' -D'),
+    >>> print(system(buildout+' -D'), end=' ')
     Develop: '/sample-buildout/demo'
     Uninstalling demo.
     Uninstalling extdemo.
@@ -355,7 +355,7 @@
     ... recipe = recipes:environ
     ...
     ... """ % dict(server=link_server))
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Uninstalling demo.
     Uninstalling extdemo.
@@ -375,7 +375,7 @@
 
     >>> import os
     >>> os.environ['test-variable'] = 'bar'
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Updating extdemo.
     Updating checkenv.
@@ -409,7 +409,7 @@
     ... recipe = recipes:environ
     ...
     ... """ % dict(server=link_server))
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Uninstalling extdemo.
     Installing extdemo.
@@ -438,7 +438,7 @@
     ... include-dirs = include
     ...
     ... """ % dict(server=link_server))
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/recipes'
     Uninstalling checkenv.
     Uninstalling extdemo.
@@ -545,7 +545,7 @@
 TWO to be defined.  This will cause the module-variable, 'val', to be
 set with a value of 2.
 
-    >>> print system(buildout),
+    >>> print(system(buildout), end=' ')
     Develop: '/sample-buildout/demo'
     Uninstalling extdemo.
     Installing extdemo.
@@ -575,5 +575,6 @@
 Because develop eggs take precedence over non-develop eggs, the demo
 script will use the new develop egg:
 
-    >>> print system(join('bin', 'demo')),
+    >>> print(system(join('bin', 'demo')), end=' ')
     2
+

Modified: zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
===================================================================
--- zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt	2010-11-21 15:11:30 UTC (rev 118517)
+++ zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt	2010-11-21 17:16:47 UTC (rev 118518)
@@ -9,7 +9,7 @@
 
 We have a link server:
 
-    >>> print get(link_server),
+    >>> print(get(link_server))
     <html><body>
     <a href="bigdemo-0.1-py2.4.egg">bigdemo-0.1-py2.4.egg</a><br>
     <a href="demo-0.1-py2.4.egg">demo-0.1-py2.4.egg</a><br>
@@ -50,7 +50,7 @@
    >>> import os
    >>> os.chdir(sample_buildout)
    >>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
-   >>> print system(buildout),
+   >>> print(system(buildout))
    Installing demo.
    Getting distribution for 'demo<0.3'.
    Got demo 0.2.
@@ -80,7 +80,7 @@
     ...     shebang = '#!'+shebang[3:-1]
     >>> shebang == '#!' + other_executable
     True
-    >>> print f.read(), # doctest: +NORMALIZE_WHITESPACE
+    >>> print(f.read()) # doctest: +NORMALIZE_WHITESPACE
     <BLANKLINE>
     import sys
     sys.path[0:0] = [
@@ -103,7 +103,7 @@
     ...     shebang = '#!'+shebang[3:-1]
     >>> shebang == '#!' + other_executable
     True
-    >>> print f.read(), # doctest: +NORMALIZE_WHITESPACE
+    >>> print(f.read()) # doctest: +NORMALIZE_WHITESPACE
     <BLANKLINE>
     import sys
     <BLANKLINE>



More information about the checkins mailing list