Temporarily disable use of pty in py3k since it triggers an unresolved
authorZac Medico <zmedico@gentoo.org>
Mon, 21 Sep 2009 19:56:26 +0000 (19:56 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 21 Sep 2009 19:56:26 +0000 (19:56 -0000)
issue, http://bugs.python.org/issue5380. With this workaround,
portage.tests.ebuild.test_spawn.SpawnTestCase.testLogfile() does
not raise IOError.

svn path=/main/trunk/; revision=14362

pym/portage/__init__.py

index e2fd1fbaa6e9cff6c244b7860064f7cccb5e02e2..dcd38bb89ebcee389ca46719b5ef75dfbd3e3e18 100644 (file)
@@ -3741,6 +3741,10 @@ class config(object):
 # stop trying to use it after the first failure.
 _disable_openpty = False
 
+if sys.hexversion >= 0x3000000:
+       # This is a temporary workaround for http://bugs.python.org/issue5380.
+       _disable_openpty = True
+
 def _create_pty_or_pipe(copy_term_size=None):
        """
        Try to create a pty and if then fails then create a normal