[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-02-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4206f91c974c by Serhiy Storchaka in branch '3.2':
Issue #16903: Popen.communicate() on Unix now accepts strings when
http://hg.python.org/cpython/rev/4206f91c974c

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-02-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-30 Thread Jeremy Kloth

Jeremy Kloth added the comment:

I would suggest that this be bumped to release blocker as currently passing 
bytes to communicate with universal_newlines=True on Windows causes the process 
to hang (see issue17077).

The backported test case passes on Windows without any changes to subprocess.py 
so this is a POSIX-only bug.

--
nosy: +jkloth

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-30 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Indeed, Popen.communicate() is incompatible not only between 3.2 and 3.3, but 
between Windows and POSIX too.

Documentation says the input argument should be a bytes string and 3.2 on POSIX 
works only with bytes strings. 3.2 on Windows and 3.3 on both platforms require 
an unicode string, as 3.3 documentation says. 3.2 on Windows hangs with a bytes 
string.

Patch updated with the documentation change (copied from 3.3).

--
priority: normal - critical
Added file: 
http://bugs.python.org/file28908/subprocess_communicate_string-3.2_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which adds support of strings in communicate(). It also 
contains a backported test from changeset 4af2c0687970 which tests this 
behavior.

--
assignee:  - serhiy.storchaka
keywords: +patch
nosy: +asvetlov
stage: needs patch - patch review
Added file: 
http://bugs.python.org/file28858/subprocess_communicate_string-3.2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-09 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

On 3.2 subprocess.Popen.communicate with universal_newlines=True accepts bytes 
and doesn't accept strings. 

$ ./python -c import subprocess; subprocess.Popen(['cat'], 
stdin=subprocess.PIPE, stdout=subprocess.PIPE, 
universal_newlines=True).communicate('qwerty')
Traceback (most recent call last):
  File string, line 1, in module
  File /home/serhiy/py/cpython3.2/Lib/subprocess.py, line 833, in communicate
return self._communicate(input)
  File /home/serhiy/py/cpython3.2/Lib/subprocess.py, line 1470, in 
_communicate
stdout, stderr = self._communicate_with_poll(input)
  File /home/serhiy/py/cpython3.2/Lib/subprocess.py, line 1537, in 
_communicate_with_poll
input_offset += os.write(fd, chunk)
TypeError: 'str' does not support the buffer interface

On 3.3+ it accepts strings and doesn't accept bytes.

--
components: IO, Library (Lib), Unicode
messages: 179425
nosy: ezio.melotti, serhiy.storchaka
priority: normal
severity: normal
status: open
title: subprocess.Popen.communicate with universal_newlines=True doesn't accept 
strings on 3.2
type: behavior
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As quick fix I propose add support of strings (in additional to bytes) in 3.2. 
Perhaps we must also add support of bytes with warning in 3.3.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16903] subprocess.Popen.communicate with universal_newlines=True doesn't accept strings on 3.2

2013-01-09 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com