[Checkins] SVN: zc.buildout/branches/regebro-python3/ Got way more tests passing
Lennart Regebro
regebro at gmail.com
Fri Jul 23 19:21:29 EDT 2010
Log message for revision 114972:
Got way more tests passing
Changed:
U zc.buildout/branches/regebro-python3/bootstrap/newbootstrap.py
U zc.buildout/branches/regebro-python3/buildout.cfg
U zc.buildout/branches/regebro-python3/setup.py
U zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.py
U zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt
U zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py
U zc.buildout/branches/regebro-python3/src/zc/buildout/testing_bugfix.txt
U zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py
U zc.buildout/branches/regebro-python3/src/zc/buildout/testselectingpython.py
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/tests.py
-=-
Modified: zc.buildout/branches/regebro-python3/bootstrap/newbootstrap.py
===================================================================
--- zc.buildout/branches/regebro-python3/bootstrap/newbootstrap.py 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/bootstrap/newbootstrap.py 2010-07-23 23:21:28 UTC (rev 114972)
@@ -187,9 +187,9 @@
if exitcode != 0:
sys.stdout.flush()
sys.stderr.flush()
- print ("An error occurred when trying to install zc.buildout. "
- "Look above this message for any errors that "
- "were output by easy_install.")
+ print("An error occurred when trying to install zc.buildout. "
+ "Look above this message for any errors that "
+ "were output by easy_install.")
sys.exit(exitcode)
ws.add_entry(eggs_dir)
Modified: zc.buildout/branches/regebro-python3/buildout.cfg
===================================================================
--- zc.buildout/branches/regebro-python3/buildout.cfg 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/buildout.cfg 2010-07-23 23:21:28 UTC (rev 114972)
@@ -14,6 +14,7 @@
zc.buildout
zc.recipe.egg
z3c.recipe.scripts
+ zope.testing
# Tests that can be run wo a network
[oltest]
Modified: zc.buildout/branches/regebro-python3/setup.py
===================================================================
--- zc.buildout/branches/regebro-python3/setup.py 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/setup.py 2010-07-23 23:21:28 UTC (rev 114972)
@@ -80,7 +80,7 @@
packages = ['zc', 'zc.buildout'],
package_dir = {'': 'src'},
namespace_packages = ['zc'],
- install_requires = 'setuptools',
+ install_requires = ['setuptools'],
include_package_data = True,
entry_points = entry_points,
zip_safe=False,
@@ -90,4 +90,5 @@
'Topic :: Software Development :: Build Tools',
'Topic :: Software Development :: Libraries :: Python Modules',
],
+ #dependency_links = ['.'], # Needed until zope.testing 4.0 is released.
)
Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.py 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.py 2010-07-23 23:21:28 UTC (rev 114972)
@@ -84,11 +84,11 @@
sections = data.keys()
sections.sort()
- print()
+ print('')
print("Annotated sections")
print("="*len("Annotated sections"))
for section in sections:
- print()
+ print('')
print('[%s]' % section)
keys = data[section].keys()
keys.sort()
@@ -103,7 +103,7 @@
elif note == '[-]':
line = '-= '
else:
- print(line, note)
+ print(line + ' ' + note)
line = ' '
print
@@ -473,11 +473,11 @@
if self._log_level < logging.DEBUG:
sections = list(self)
sections.sort()
- print()
+ print('')
print('Configuration data:')
for section in self._data:
_save_options(section, self[section], sys.stdout)
- print()
+ print('')
# compute new part recipe signatures
@@ -1276,6 +1276,9 @@
def __iter__(self):
for each in self._raw:
yield each
+ for each in self._data:
+ if each not in self._raw:
+ yield each
def __len__(self):
return len(self._raw)
@@ -1468,7 +1471,10 @@
location = dist.location
if dist.precedence == pkg_resources.DEVELOP_DIST:
# py3 hack: b64encode (and therefore _dir_hash) returns binary
- result.append(dist.project_name + '-' + _dir_hash(location).decode())
+ dhash = _dir_hash(location)
+ if not isinstance(dhash, str):
+ dhash = dhash.decode()
+ result.append(dist.project_name + '-' + dhash)
else:
result.append(os.path.basename(location))
return result
Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/buildout.txt 2010-07-23 23:21:28 UTC (rev 114972)
@@ -289,10 +289,11 @@
>>> import os
>>> os.chdir(sample_buildout)
>>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
- >>> print system(buildout),
+ >>> print(system(buildout))
Develop: '/sample-buildout/recipes'
Installing data-dir.
data-dir: Creating directory mystuff
+ <BLANKLINE>
We see that the recipe created the directory, as expected:
@@ -314,6 +315,7 @@
installed_develop_eggs = /sample-buildout/develop-eggs/recipes.egg-link
parts = data-dir
<BLANKLINE>
+ <BLANKLINE>
[data-dir]
__buildout_installed__ = /sample-buildout/mystuff
__buildout_signature__ = recipes-c7vHV6ekIDUPy/7fjAaYjg==
Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/testing.py 2010-07-23 23:21:28 UTC (rev 114972)
@@ -50,7 +50,8 @@
and os.path.exists(path+'-script.py')
):
path = path+'-script.py'
- print open(path).read(),
+ out = open(path).read().strip()
+ print(out)
def ls(dir, *subs):
if subs:
Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/testing_bugfix.txt
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/testing_bugfix.txt 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/testing_bugfix.txt 2010-07-23 23:21:28 UTC (rev 114972)
@@ -15,7 +15,7 @@
>>> len(logging.getLogger().handlers)
1
>>> logging.getLogger().handlers # doctest: +ELLIPSIS
- [<zope.testing.testrunner.logsupport.NullHandler instance at ...>]
+ [<zope.testrunner.logsupport.NullHandler instance at ...>]
After calling it, a ``logging.StreamHandler`` was added:
@@ -27,7 +27,7 @@
>>> len(logging.getLogger().handlers)
2
>>> logging.getLogger().handlers # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
- [<zope.testing.testrunner.logsupport.NullHandler instance at ...>,
+ [<zope.testrunner.logsupport.NullHandler instance at ...>,
<logging.StreamHandler instance at ...>]
But tear down removes the new logging handler:
@@ -36,4 +36,4 @@
>>> len(logging.getLogger().handlers)
1
>>> logging.getLogger().handlers # doctest: +ELLIPSIS
- [<zope.testing.testrunner.logsupport.NullHandler instance at ...>]
+ [<zope.testrunner.logsupport.NullHandler instance at ...>]
Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/tests.py 2010-07-23 23:21:28 UTC (rev 114972)
@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-from zope.testing import doctest
+import doctest
from zope.testing import renormalizing
import os
import pkg_resources
Modified: zc.buildout/branches/regebro-python3/src/zc/buildout/testselectingpython.py
===================================================================
--- zc.buildout/branches/regebro-python3/src/zc/buildout/testselectingpython.py 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/src/zc/buildout/testselectingpython.py 2010-07-23 23:21:28 UTC (rev 114972)
@@ -11,8 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-import os, re, subprocess, sys, textwrap, unittest
-from zope.testing import doctest, renormalizing
+import os, re, subprocess, sys, textwrap, unittest, doctest
+from zope.testing import renormalizing
import zc.buildout.tests
import zc.buildout.testing
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-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py 2010-07-23 23:21:28 UTC (rev 114972)
@@ -17,8 +17,8 @@
import zc.buildout.testselectingpython
import zc.buildout.testing
-import unittest
-from zope.testing import doctest, renormalizing
+import unittest, doctest
+from zope.testing import renormalizing
# We do not explicitly test the recipe support for the ``eggs``,
# ``find-links``, and ``index`` options because they are used for most or
Modified: zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/tests.py
===================================================================
--- zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/tests.py 2010-07-23 23:09:18 UTC (rev 114971)
+++ zc.buildout/branches/regebro-python3/zc.recipe.egg_/src/zc/recipe/egg/tests.py 2010-07-23 23:21:28 UTC (rev 114972)
@@ -17,8 +17,8 @@
import zc.buildout.testselectingpython
import zc.buildout.testing
-import unittest
-from zope.testing import doctest, renormalizing
+import unittest, doctest
+from zope.testing import renormalizing
os_path_sep = os.path.sep
if os_path_sep == '\\':
More information about the checkins
mailing list