[Checkins] SVN: zc.buildout/branches/python-3-2/ checkpoint
Jim Fulton
jim at zope.com
Sat Mar 19 15:27:56 EDT 2011
Log message for revision 121047:
checkpoint
Changed:
U zc.buildout/branches/python-3-2/bootstrap/bootstrap.py
U zc.buildout/branches/python-3-2/src/zc/buildout/rmtree.py
U zc.buildout/branches/python-3-2/src/zc/buildout/tests.py
U zc.buildout/branches/python-3-2/src/zc/buildout/virtualenv.txt
U zc.buildout/branches/python-3-2/src/zc/buildout/windows.txt
-=-
Modified: zc.buildout/branches/python-3-2/bootstrap/bootstrap.py
===================================================================
--- zc.buildout/branches/python-3-2/bootstrap/bootstrap.py 2011-03-19 18:28:55 UTC (rev 121046)
+++ zc.buildout/branches/python-3-2/bootstrap/bootstrap.py 2011-03-19 19:27:55 UTC (rev 121047)
@@ -175,6 +175,9 @@
setup_args['no_fake'] = True
ez['use_setuptools'](**setup_args)
if 'pkg_resources' in sys.modules:
+ if sys.version_info[0] > 3:
+ from imp import reload
+
reload(sys.modules['pkg_resources'])
import pkg_resources
# This does not (always?) update the default working set. We will
Modified: zc.buildout/branches/python-3-2/src/zc/buildout/rmtree.py
===================================================================
--- zc.buildout/branches/python-3-2/src/zc/buildout/rmtree.py 2011-03-19 18:28:55 UTC (rev 121046)
+++ zc.buildout/branches/python-3-2/src/zc/buildout/rmtree.py 2011-03-19 19:27:55 UTC (rev 121047)
@@ -38,7 +38,7 @@
Now create a file ...
>>> foo = os.path.join (d, 'foo')
- >>> write(foo, 'hulu')
+ >>> f = open(foo); _ = f.write('hulu'); f.close()
and make it unwriteable
Modified: zc.buildout/branches/python-3-2/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branches/python-3-2/src/zc/buildout/tests.py 2011-03-19 18:28:55 UTC (rev 121046)
+++ zc.buildout/branches/python-3-2/src/zc/buildout/tests.py 2011-03-19 19:27:55 UTC (rev 121047)
@@ -2089,12 +2089,10 @@
>>> zc.buildout.easy_install.clear_index_cache()
>>> rmdir(example_dest)
>>> example_dest = tmpdir('site-packages-example-install')
- >>> workingset = zc.buildout.easy_install.install(
+ >>> print(raises('MissingDistribution', zc.buildout.easy_install.install,
... ['demoneeded'], example_dest, links=[], executable=py_path,
- ... index=None, include_site_packages=False)
- Traceback (most recent call last):
- ...
- MissingDistribution: Couldn't find a distribution for 'demoneeded'.
+ ... index=None, include_site_packages=False))
+ Couldn't find a distribution for 'demoneeded'.
That's a failure, as expected.
@@ -2130,14 +2128,12 @@
>>> mkdir(example_dest, 'develop-eggs')
>>> write(example_dest, 'develop-eggs', 'demoneeded.egg-link',
... site_packages_path)
- >>> workingset = zc.buildout.easy_install.install(
+ >>> print(raises('MissingDistribution', zc.buildout.easy_install.install,
... ['demoneeded'], example_dest, links=[],
... path=[join(example_dest, 'develop-eggs')],
... executable=py_path,
- ... index=None, include_site_packages=False)
- Traceback (most recent call last):
- ...
- MissingDistribution: Couldn't find a distribution for 'demoneeded'.
+ ... index=None, include_site_packages=False))
+ Couldn't find a distribution for 'demoneeded'.
The MissingDistribution error shows that buildout correctly excluded the
"site-packages" source even though it was indirectly included in the path
@@ -2584,7 +2580,7 @@
... p = subprocess.Popen(s, stdin=subprocess.PIPE,
... stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
... p.stdin.close()
- ... print(p.stdout.read())
+ ... print(p.stdout.read().decode())
... print('Exit: %s' % bool(p.wait()))
>>> call(buildout)
@@ -2832,8 +2828,13 @@
>>> src = tmpdir('src')
>>> write(src, 'wacky_handler.py',
... '''
+ ... try: from urllib2 import HTTPHandler, install_opener
+ ... except ImportError:
+ ... from urllib.request import HTTPHandler, install_opener
+ ... class Wacky(HTTPHandler):
+ ... wacky_open = urllib2.HTTPHandler.http_open
... def install(buildout=None):
- ... print("I'm so wacky,")
+ ... install_opener(urllib2.build_opener(Wacky))
... ''')
>>> write(src, 'setup.py',
... '''
@@ -4118,7 +4119,7 @@
(re.compile('distribute'), 'setuptools'),
# Distribute unzips eggs by default.
(re.compile('\- demoneeded'), 'd demoneeded'),
- (re.compile(r'^.*\.py[co]\n'), ''),
+ (re.compile(r'\n.*\.py[co]'), ''),
]),
),
zc.buildout.rmtree.test_suite(),
Modified: zc.buildout/branches/python-3-2/src/zc/buildout/virtualenv.txt
===================================================================
--- zc.buildout/branches/python-3-2/src/zc/buildout/virtualenv.txt 2011-03-19 18:28:55 UTC (rev 121046)
+++ zc.buildout/branches/python-3-2/src/zc/buildout/virtualenv.txt 2011-03-19 19:27:55 UTC (rev 121047)
@@ -115,15 +115,15 @@
>>> print_(call_py(
... _safe_arg(py_path),
- ... "import ConfigParser"))
+ ... "import pickle"))
>>> print('X'); print(call_py(
... _safe_arg(py_path),
- ... "import ConfigParser",
+ ... "import pickle",
... '-S')) # doctest: +ELLIPSIS
X...Traceback (most recent call last):
...
- ImportError: No module named ConfigParser
+ ImportError: No module named pickle
<BLANKLINE>
>>> from zc.buildout.easy_install import _has_broken_dash_S
>>> _has_broken_dash_S(py_path)
Modified: zc.buildout/branches/python-3-2/src/zc/buildout/windows.txt
===================================================================
--- zc.buildout/branches/python-3-2/src/zc/buildout/windows.txt 2011-03-19 18:28:55 UTC (rev 121046)
+++ zc.buildout/branches/python-3-2/src/zc/buildout/windows.txt 2011-03-19 19:27:55 UTC (rev 121047)
@@ -27,7 +27,7 @@
...
... name = os.path.join (self.location, 'readonly.txt')
... open (name, 'w').write ('this is a read only file')
- ... os.chmod (name, 0400)
+ ... os.chmod (name, int('0400', 8))
... return ()
...
... update = install
More information about the checkins
mailing list