[Checkins] SVN: zc.buildout/branches/gary-betafix/ tests pass on Py 2.7

Gary Poster gary.poster at canonical.com
Fri Jul 23 20:56:57 EDT 2010


Log message for revision 114974:
  tests pass on Py 2.7

Changed:
  U   zc.buildout/branches/gary-betafix/CHANGES.txt
  U   zc.buildout/branches/gary-betafix/src/zc/buildout/allowhosts.txt
  U   zc.buildout/branches/gary-betafix/src/zc/buildout/bootstrap.txt
  U   zc.buildout/branches/gary-betafix/src/zc/buildout/dependencylinks.txt
  U   zc.buildout/branches/gary-betafix/src/zc/buildout/tests.py
  U   zc.buildout/branches/gary-betafix/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
  U   zc.buildout/branches/gary-betafix/zc.recipe.egg_/src/zc/recipe/egg/tests.py

-=-
Modified: zc.buildout/branches/gary-betafix/CHANGES.txt
===================================================================
--- zc.buildout/branches/gary-betafix/CHANGES.txt	2010-07-24 00:48:37 UTC (rev 114973)
+++ zc.buildout/branches/gary-betafix/CHANGES.txt	2010-07-24 00:56:57 UTC (rev 114974)
@@ -6,6 +6,8 @@
 
 New Features:
 
+- zc.buildout supports Python 2.7.
+
 - Added buildout:socket-timout option so that socket timeout can be configured
   both from command line and from config files. (gotcha)
 
@@ -45,8 +47,8 @@
 - You can develop zc.buildout using Distribute instead of Setuptools.  Use
   the --distribute option on the dev.py script.  (Releases should be tested
   with both Distribute and Setuptools.)  The tests for zc.buildout pass
-  with Setuptools and Python 2.4, 2.5, and 2.6; and with Distribute and
-  Python 2.5 and 2.6.  Using zc.buildout with Distribute and Python 2.4
+  with Setuptools and Python 2.4, 2.5, 2.6, and 2.7; and with Distribute and
+  Python 2.5, 2.6, and 2.7.  Using zc.buildout with Distribute and Python 2.4
   is not recommended.
 
 - The ``distribute-version`` now works in the [buildout] section, mirroring

Modified: zc.buildout/branches/gary-betafix/src/zc/buildout/allowhosts.txt
===================================================================
--- zc.buildout/branches/gary-betafix/src/zc/buildout/allowhosts.txt	2010-07-24 00:48:37 UTC (rev 114973)
+++ zc.buildout/branches/gary-betafix/src/zc/buildout/allowhosts.txt	2010-07-24 00:56:57 UTC (rev 114974)
@@ -2,14 +2,14 @@
 -----------
 
 On some environments the links visited by `zc.buildout` can be forbidden
-by paranoiac firewalls. These URL might be on the chain of links 
+by paranoiac firewalls. These URL might be on the chain of links
 visited by `zc.buildout` whether they are defined in the `find-links` option
 or by various eggs in their `url`, `download_url` and `dependency_links` metadata.
 
-It is even harder to track that package_index works like a spider and 
+It is even harder to track that package_index works like a spider and
 might visit links and go to other location.
 
-The `allow-hosts` option provides a way to prevent this, and 
+The `allow-hosts` option provides a way to prevent this, and
 works exactly like the one provided in `easy_install`
 (see `easy_install allow-hosts option`_).
 
@@ -17,7 +17,7 @@
 
     [buildout]
     ...
-    
+
     allow-hosts =
         *.python.org
         example.com
@@ -36,7 +36,7 @@
     ...     zip_safe=True, version='1')
     ... ''')
 
-Now let's configure the buildout to use the develop egg, 
+Now let's configure the buildout to use the develop egg,
 together with some rules that disallow any website but PyPI and
 local files::
 
@@ -55,14 +55,11 @@
 
 Now we can run the buildout and make sure all attempts to dist.plone.org fails::
 
-    >>> print system(buildout)
+    >>> print system(buildout) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/allowdemo'
-    Installing eggs.
-    <BLANKLINE>
+    ...
     Link to http://dist.plone.org ***BLOCKED*** by --allow-hosts
-    <BLANKLINE>
-    Couldn't find index page for 'kss.core' (maybe misspelled?)
-    Getting distribution for 'kss.core'.
+    ...
     While:
       Installing eggs.
       Getting distribution for 'kss.core'.
@@ -91,14 +88,11 @@
 
 Now we can run the buildout and make sure all attempts to dist.plone.org fails::
 
-    >>> print system(buildout)
+    >>> print system(buildout) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/allowdemo'
-    Installing eggs.
-    <BLANKLINE>
+    ...
     Link to http://dist.plone.org ***BLOCKED*** by --allow-hosts
-    <BLANKLINE>
-    Couldn't find index page for 'kss.core' (maybe misspelled?)
-    Getting distribution for 'kss.core'.
+    ...
     While:
       Installing eggs.
       Getting distribution for 'kss.core'.
@@ -115,7 +109,7 @@
     ... [buildout]
     ... parts=python
     ... foo = ${python:interpreter}
-    ... 
+    ...
     ... [python]
     ... recipe=zc.recipe.egg
     ... eggs=zc.buildout

Modified: zc.buildout/branches/gary-betafix/src/zc/buildout/bootstrap.txt
===================================================================
--- zc.buildout/branches/gary-betafix/src/zc/buildout/bootstrap.txt	2010-07-24 00:48:37 UTC (rev 114973)
+++ zc.buildout/branches/gary-betafix/src/zc/buildout/bootstrap.txt	2010-07-24 00:56:57 UTC (rev 114974)
@@ -52,11 +52,11 @@
 
 Let's try with an unknown version::
 
-    >>> print 'X'; print system(
+    >>> print 'XX'; print system(
     ...     zc.buildout.easy_install._safe_arg(sys.executable)+' '+
     ...     'bootstrap.py --version UNKNOWN'); print 'X' # doctest: +ELLIPSIS
     ...
-    X
+    X...
     No local packages or download links found for zc.buildout==UNKNOWN...
     ...
 
@@ -128,8 +128,7 @@
     ...
     X
     ...
-    Generated script '/sample/bin/buildout'.
-    <BLANKLINE>
+    Generated script '/sample/bin/buildout'...
     X
 
 Let's make sure the generated `buildout` script uses it::
@@ -158,8 +157,7 @@
     ...
     X
     ...
-    Generated script '/sample/bin/buildout'.
-    <BLANKLINE>
+    Generated script '/sample/bin/buildout'...
     X
 
 Let's make sure the generated `buildout` script uses ``Distribute`` *and*
@@ -192,8 +190,7 @@
     ...
     X
     ...
-    Generated script '/sample/bin/buildout'.
-    <BLANKLINE>
+    Generated script '/sample/bin/buildout'...
     X
 
 You can specify a location of ez_setup.py or distribute_setup, so you

Modified: zc.buildout/branches/gary-betafix/src/zc/buildout/dependencylinks.txt
===================================================================
--- zc.buildout/branches/gary-betafix/src/zc/buildout/dependencylinks.txt	2010-07-24 00:48:37 UTC (rev 114973)
+++ zc.buildout/branches/gary-betafix/src/zc/buildout/dependencylinks.txt	2010-07-24 00:56:57 UTC (rev 114974)
@@ -20,7 +20,7 @@
 
 Turn on logging on this server so that we can see when eggs are pulled
 from it.
-    
+
     >>> get(link_server2 + 'enable_server_logging')
     GET 200 /enable_server_logging
     ''
@@ -83,10 +83,9 @@
     ...     for egg in glob(join(sample_buildout, 'eggs', 'demoneeded*.egg')):
     ...         remove(sample_buildout, 'eggs', egg)
     >>> remove_demoneeded_egg()
-    >>> print system(buildout)
+    >>> print system(buildout) # doctest: +ELLIPSIS
     Develop: '/sample-buildout/depdemo'
-    Updating eggs.
-    Couldn't find index page for 'demoneeded' (maybe misspelled?)
+    ...
     Getting distribution for 'demoneeded'.
     While:
       Updating eggs.

Modified: zc.buildout/branches/gary-betafix/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branches/gary-betafix/src/zc/buildout/tests.py	2010-07-24 00:48:37 UTC (rev 114973)
+++ zc.buildout/branches/gary-betafix/src/zc/buildout/tests.py	2010-07-24 00:56:57 UTC (rev 114974)
@@ -3718,7 +3718,18 @@
     )
 
 hide_distribute_additions = (re.compile('install_dir .+\n'), '')
-
+hide_zip_safe_message = (
+    # This comes in a different place in the output in Python 2.7.  It's not
+    # important to our tests.  Hide it.
+    re.compile(
+        '((?<=\n)\n)?zip_safe flag not set; analyzing archive contents...\n'),
+    '')
+hide_first_index_page_message = (
+    # This comes in a different place in the output in Python 2.7.  It's not
+    # important to our tests.  Hide it.
+    re.compile(
+        "Couldn't find index page for '[^']+' \(maybe misspelled\?\)\n"),
+    '')
 def test_suite():
     test_suite = [
         doctest.DocFileSuite(
@@ -3731,6 +3742,7 @@
                 zc.buildout.testing.normalize_script,
                 zc.buildout.testing.normalize_egg_py,
                 zc.buildout.tests.hide_distribute_additions,
+                hide_zip_safe_message,
                 (re.compile('__buildout_signature__ = recipes-\S+'),
                  '__buildout_signature__ = recipes-SSSSSSSSSSS'),
                 (re.compile('executable = [\S ]+python\S*', re.I),
@@ -3809,6 +3821,7 @@
                 zc.buildout.testing.normalize_script,
                 zc.buildout.testing.normalize_egg_py,
                 normalize_bang,
+                hide_first_index_page_message,
                 zc.buildout.tests.hide_distribute_additions,
                 (re.compile('extdemo[.]pyd'), 'extdemo.so'),
                 (re.compile('[-d]  (setuptools|distribute)-\S+[.]egg'),
@@ -3852,6 +3865,7 @@
                 zc.buildout.testing.normalize_script,
                 zc.buildout.testing.normalize_egg_py,
                 zc.buildout.tests.hide_distribute_additions,
+                hide_first_index_page_message,
                 (re.compile("buildout: Running \S*setup.py"),
                  'buildout: Running setup.py'),
                 (re.compile('(setuptools|distribute)-\S+-'),
@@ -3910,7 +3924,17 @@
                 ])
             ),
         doctest.DocFileSuite(
-            'testing_bugfix.txt'),
+            'testing_bugfix.txt',
+            checker=renormalizing.RENormalizing([
+                # Python 2.7
+                (re.compile(
+                    re.escape(
+                        'testrunner.logsupport.NullHandler instance at')),
+                 'testrunner.logsupport.NullHandler object at'),
+                (re.compile(re.escape('logging.StreamHandler instance at')),
+                 'logging.StreamHandler object at'),
+                ])
+            ),
     ]
 
     # adding bootstrap.txt doctest to the suite

Modified: zc.buildout/branches/gary-betafix/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
===================================================================
--- zc.buildout/branches/gary-betafix/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py	2010-07-24 00:48:37 UTC (rev 114973)
+++ zc.buildout/branches/gary-betafix/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py	2010-07-24 00:56:57 UTC (rev 114974)
@@ -422,6 +422,7 @@
                 zc.buildout.testing.normalize_egg_py,
                 zc.buildout.tests.normalize_bang,
                 zc.buildout.tests.hide_distribute_additions,
+                zc.buildout.tests.hide_first_index_page_message,
                 (re.compile(r'zc.buildout(-\S+)?[.]egg(-link)?'),
                  'zc.buildout.egg'),
                 (re.compile('[-d]  (setuptools|distribute)-[^-]+-'), 'setuptools-X-'),
@@ -444,6 +445,7 @@
                 zc.buildout.testing.normalize_endings,
                 zc.buildout.testing.normalize_egg_py,
                 zc.buildout.tests.hide_distribute_additions,
+                zc.buildout.tests.hide_first_index_page_message,
                 (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),
                 ]),
             ),

Modified: zc.buildout/branches/gary-betafix/zc.recipe.egg_/src/zc/recipe/egg/tests.py
===================================================================
--- zc.buildout/branches/gary-betafix/zc.recipe.egg_/src/zc/recipe/egg/tests.py	2010-07-24 00:48:37 UTC (rev 114973)
+++ zc.buildout/branches/gary-betafix/zc.recipe.egg_/src/zc/recipe/egg/tests.py	2010-07-24 00:56:57 UTC (rev 114974)
@@ -85,15 +85,16 @@
             'custom.txt',
             setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
             checker=renormalizing.RENormalizing([
-               zc.buildout.testing.normalize_path,
-               zc.buildout.testing.normalize_endings,
+                zc.buildout.testing.normalize_path,
+                zc.buildout.testing.normalize_endings,
                 zc.buildout.tests.hide_distribute_additions,
-               (re.compile("(d  ((ext)?demo(needed)?|other)"
-                           "-\d[.]\d-py)\d[.]\d(-\S+)?[.]egg"),
-                '\\1V.V.egg'),
-               (re.compile('extdemo.c\n.+\\extdemo.exp\n'), ''),
-               (re.compile('extdemo[.]pyd'), 'extdemo.so')
-               ]),
+                zc.buildout.tests.hide_zip_safe_message,
+                (re.compile("(d  ((ext)?demo(needed)?|other)"
+                            "-\d[.]\d-py)\d[.]\d(-\S+)?[.]egg"),
+                 '\\1V.V.egg'),
+                (re.compile('extdemo.c\n.+\\extdemo.exp\n'), ''),
+                (re.compile('extdemo[.]pyd'), 'extdemo.so')
+                ]),
             ),
 
         ))



More information about the checkins mailing list