Repository: pypa/virtualenv

Issue:
1.8.3 breaks numpy install on py3 (ValueError: underlying buffer has been detached)
The error is (from travis output)

```
2320
2321 File "/home/travis/virtualenv/python3.1/build/numpy/build/py3k/numpy/distutils/ccompiler.py", line 458, in CCompiler_get_version
2322
2323 status, output = exec_command(version_cmd,use_tee=0)
2324
2325 File "/home/travis/virtualenv/python3.1/build/numpy/build/py3k/numpy/distutils/exec_command.py", line 197, in exec_command
2326
2327 if _with_python and (0 or sys.__stdout__.fileno()==-1):
2328
2329ValueError: underlying buffer has been detached
```

I've bisected this to 5e09944,
That commit is broken for me (giving a similar error to #358) but with a small fix 
from the following commit, I can consistently reproduce the problem. 
The offending line in numpy has been around since 2005, nothing new.

98b8160 works for me (and includes the 3.3 fix, FYI, @michaelklishin (Travis team)).

It looks like a lot of users of travis are affected by this , since all builds depending on numpy 
are failing with this error  (that's just my guess though).

the pasted error is from 3.1 on travis, I get the same thing on my local box with 3.2



Discussion:
reverting  5e09944 on top of git master also seems to clear the problem.

it looks like the updated `distribute_setup.py` embedded in `virtualenv.py` is the culprit.

It would of course be better to fix the distribute-setup.py.

FWIW, I've reproduced the issue on Mac OS with 3.3.0. Not sure what's causing it though.

@jezdez Lets revert 5e09944 and do a point release. To not block the OSS communities using travis/numpy

Next time we should do better at an RC/call for testing.

a quick point release would be great.

I can replicate by doing what pip is calling under the hood.

```
/Users/pnasrat/Development/virtualenv/ve/bin/python3.3 -c "
__file__ = '/Users/pnasrat/Development/virtualenv/ve/build/numpy/setup.py'
from setuptools.command import egg_info
import pkg_resources
import os
def replacement_run(self):
    self.mkpath(self.egg_info)
    installer = self.distribution.fetch_build_egg
    for ep in pkg_resources.iter_entry_points('egg_info.writers'):
        # require=False is the change we're making:
        writer = ep.load(require=False)
        if writer:
            writer(self, ep.name, os.path.join(self.egg_info,ep.name))
    self.find_sources()
egg_info.egg_info.run = replacement_run
exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))
" egg_info --egg-base pip-egg-info 
```

Testing with 0.6.28 distribute in virtualenv

```
./ve/bin/pip install --no-install numpy
cd ve/build/numpy
```

Use script above or https://gist.github.com/4136264 and added a `pdb.set_trace()` in numpy build

```
(Pdb)  sys.__stdout__.fileno()
*** ValueError: underlying buffer has been detached
(Pdb) sys.__stdout__
*** ValueError: underlying buffer has been detached
```

OK so looking at `distribute/setuptools/dist.py` I see 

```
sys.stdout = io.TextIOWrapper(
                sys.stdout.detach(), encoding, errors, newline, line_buffering)
```

https://bitbucket.org/tarek/distribute/changeset/7c543c05cd042c48bfa3926baa4a1a5543398305

Renaming `handle_display_options` to `xhandle_display_options` to disable works around.

strange. 0.6.28 was released in july, that commit is from october, how can you reproduce with .28?

@stefanholek fyi https://bitbucket.org/tarek/distribute/changeset/7c543c05cd042c48bfa3926baa4a1a5543398305 breaks virtualenv + pip install numpy

Argh ignore the 0.6.28 comment - I couldn't reproduce with that, the later tests were with 0.6.30 and changing that. sorry for the confusing comments

Filed distribute bug https://bitbucket.org/tarek/distribute/issue/334/fix-for-311-breaks-packages-that-use

@jezdez clearly distribute bug lets do a point release with head of develop (that has another fix in) with 5e09944 rolled back.

For summary so far, see [comment](https://github.com/numpy/numpy/issues/2761#issuecomment-10672029)  in https://github.com/numpy/numpy/issues/2761

Good summary. I'll point out that the distribute io tweak is only on Python 3 so far (it was motivated by a recent PEP), and that using `sys.__stdout__` without a fallback should be discouraged (the documentation mentions some problem cases).

I've sent a pull request for distribute to leave `sys.stdout` alone on utf-8 platforms, and one for numpy to leave `sys.__stdout__` alone because it was accessed for a frivolous reason.
Our options are to revert virtualenv's distribute update (meh, older distribute has other wrinkles), patch the distribute tarball virtualenv bundles (meh, but okay for virtualenv users), or get team distribute to publish a patch release (my preferred option, fixes the problem for everyone not just virtualenv users).

Travis team says it'll take release+2 days (max) for builds to start passing again. it's been two days
of :red_circle:  so far.


Resolving patch:
diff --git a/bin/refresh-support-files.py b/bin/refresh-support-files.py
--- a/bin/refresh-support-files.py
+++ b/bin/refresh-support-files.py
@@ -23,7 +23,7 @@
     ('http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg', 'setuptools-0.6c11-py2.6.egg'),
     ('http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg', 'setuptools-0.6c11-py2.5.egg'),
     ('http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg', 'setuptools-0.6c11-py2.4.egg'),
-    ('http://pypi.python.org/packages/source/d/distribute/distribute-0.6.30.tar.gz', 'distribute-0.6.30.tar.gz'),
+    ('http://pypi.python.org/packages/source/d/distribute/distribute-0.6.31.tar.gz', 'distribute-0.6.31.tar.gz'),
     ('http://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz', 'pip-1.2.1.tar.gz'),
 ]
 
diff --git a/virtualenv.py b/virtualenv.py
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -2121,93 +2121,93 @@ def convert(s):
 
 ##file distribute_setup.py
 DISTRIBUTE_SETUP_PY = convert("""
-eJztPGtz28iR3/kr5qhSAfSRsOTd7F2pjlvlXcsbVRzbZdnJB1tFDYEhhRVeOwBEM78+3T1PPEjJ
-t5sPqYqSlUhMT09Pv7tn4JP/qvbNXVlMptPpT2XZ1I3kFUtS+Juu20awtKgbnmW8SQFocrVh+7Jl
-O140rClZWwtWi6atmrLMaoDFUckqHt/zrQhqNRhV+zn7ta0bAIizNhGsuUvrySbNED18ASQ8F7Cq
-FHFTyj3bpc0dS5s540XCeJLQBFwQYZuyYuVGrWTwX1xMJgx+NrLMPepXNM7SvCplg9SuHLUE330U
-zgY7lOK3FshinNWViNNNGrMHIWtgBtLgps7xM0Al5a7ISp5M8lTKUs5ZKYlLvGA8a4QsOPDUALkd
-z2nRGKCSktUlW+9Z3VZVtk+L7QQ3zatKlpVMcXpZoTCIH7e3/R3c3kaTyUdkF/E3poURo2Cyhc81
-biWWaUXb09IlKqut5IkvzwiVYqKZV9bmU33XNmlmv+3tQJPmwnzeFDlv4js7JPI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/J0A++4rXBw1lVMr8ewZLX01V/+fkq0z+RWhj
+v95TzzCGLxmf8kbgsVK6Doi12oragasV8mG10i+8dxkwcQcm/A9nRa43
 """)
 
 ##file activate.sh
diff --git a/virtualenv_embedded/distribute_setup.py b/virtualenv_embedded/distribute_setup.py
--- a/virtualenv_embedded/distribute_setup.py
+++ b/virtualenv_embedded/distribute_setup.py
@@ -49,7 +49,7 @@ def quote(arg):
             args = [quote(arg) for arg in args]
         return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 
-DEFAULT_VERSION = "0.6.30"
+DEFAULT_VERSION = "0.6.31"
 DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
 SETUPTOOLS_FAKED_VERSION = "0.6c11"
 


Test patch: