[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2010-01-30 Thread Martin v . Löwis

Changes by Martin v. Löwis :


--
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2010-01-30 Thread STINNER Victor

STINNER Victor  added the comment:

antoine's patch (fixing this issue) is commited. Can we close this issue?

--
nosy: +haypo

___
Python tracker 

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



[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2009-10-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Assigning back to myself to add a comment to the relevant line (i.e.
> that relying on the buffer attribute being present is a deliberate
> design choice).

The remaining question, however, is why it doesn't also rely on
stdin.buffer.

--

___
Python tracker 

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



[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2009-10-26 Thread Nick Coghlan

Nick Coghlan  added the comment:

Fine by me (I was very close to changing the test when I first triggered
the problem, but wasn't sure silencing the error was the right thing to do).

Assigning back to myself to add a comment to the relevant line (i.e.
that relying on the buffer attribute being present is a deliberate
design choice).

--
assignee: pitrou -> ncoghlan

___
Python tracker 

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



[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2009-10-26 Thread R. David Murray

R. David Murray  added the comment:

Patch applied in r75710.

--

___
Python tracker 

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



[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2009-10-26 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I agree with Antoine that CGIXML... is right in accessing
sys.stdout.buffer; this really needs binary IO.

Consequentially, his patch also looks right to me; please apply.

--
assignee:  -> pitrou
resolution:  -> accepted

___
Python tracker 

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



[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2009-10-25 Thread R. David Murray

R. David Murray  added the comment:

I think Antoine's suggestion is reasonable, and that we should apply the
patch to stop the buildbots from failing, but leave this issue open
until someone with more xmlrpc knowledge can respond to Nick and
Antoine's questions.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2009-10-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Well this is in the CGI implementation, and it's reasonable to assume
that CGI will only be used with a real stream. Besides, the encoding
used with stdout must be the xmlrpc encoding (probably utf-8), not the
default encoding of standard streams on the system, which means direct
access to the underlying binary stream must be possible.

(however, _marshaled_dispatch() is quite strange in that it accepts str
but returns bytes)

I propose to fix test_xmlrpc instead so that it uses a BytesIO wrapped
in a TextIOWrapper. Patch included.

--
keywords: +patch
nosy: +loewis, pitrou
Added file: http://bugs.python.org/file15176/test_xmlrpc.patch

___
Python tracker 

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



[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2009-10-18 Thread Nick Coghlan

New submission from Nick Coghlan :

The xmlrpc tests were changed to use a StringIO object instead of a
temporary file (this change reflects the corresponding change made on
the 2.x trunk).

The tests then started failing, since xmlrpc.server assumes sys.stdout
will provide the buffer attribute, which is not a valid assumption. From
the io.TestIOBase documentation:

buffer
The underlying binary buffer (a BufferedIOBase instance) that
TextIOBase deals with. This is not part of the TextIOBase API and may
not exist on some implementations.

Assuming this attribute exists is a bug in xmlrpc.server that should be
fixed.

--
components: Library (Lib)
messages: 94212
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: xmlrpc.server assumes sys.stdout will have a buffer attribute
type: behavior
versions: Python 3.1, Python 3.2

___
Python tracker 

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