[issue6005] Bug in socket example

2012-02-09 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Thanks for patches. This is fixed.

--
nosy: +orsenthil
resolution:  -> fixed
stage:  -> 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



[issue6005] Bug in socket example

2012-02-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2aae44aa041a by Senthil Kumaran in branch '3.2':
Fix Issue #6005: Examples in the socket library documentation use sendall,
http://hg.python.org/cpython/rev/2aae44aa041a

New changeset e9c3df45920e by Senthil Kumaran in branch 'default':
merged from 3.2
http://hg.python.org/cpython/rev/e9c3df45920e

--

___
Python tracker 

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



[issue6005] Bug in socket example

2012-02-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset aa6415d1e160 by Senthil Kumaran in branch '2.7':
Fix Issue #6005: Examples in the socket library documentation use sendall,
http://hg.python.org/cpython/rev/aa6415d1e160

--
nosy: +python-dev

___
Python tracker 

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



[issue6005] Bug in socket example

2011-02-08 Thread Sandro Tosi

Sandro Tosi  added the comment:

Hi all,
I was looking at this issue and thought: ok the module documentation uses 
send() not correctly, so we should fix that; the fastest solution is using 
sendall().

But then searching fro some examples in the code on internet, I found that the 
python docs contain a "Socket Programming HOWTO" that uses send() the way it 
should be.

So, should we:

- replace send() with sendall() in socket module documentation (explaining it 
was done to not clutter examples) and
- add a reference to the socket programming howto to show a way to use send() 
correctly?

Cheers,
Sandro

--
nosy: +sandro.tosi

___
Python tracker 

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



[issue6005] Bug in socket example

2010-08-08 Thread Brian Brazil

Changes by Brian Brazil :


Added file: http://bugs.python.org/file18436/socket-sendall-doc-py3k.patch

___
Python tracker 

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



[issue6005] Bug in socket example

2010-08-08 Thread Brian Brazil

Brian Brazil  added the comment:

I've updated this patch to apply cleanly to 2.7, and also adapted it to for 
py3k. I added a small tweak to the example description in socket.rst.

I've tested the instructions for both 2.7 and 3k and verified they still work 
as expected.

--
nosy: +bbrazil
versions: +Python 2.7, Python 3.3 -Python 2.6
Added file: http://bugs.python.org/file18435/socket-sendall-doc-2.7.patch

___
Python tracker 

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



[issue6005] Bug in socket example

2009-09-23 Thread Thijs Triemstra

Changes by Thijs Triemstra :


--
nosy: +thijs

___
Python tracker 

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



[issue6005] Bug in socket example

2009-08-24 Thread Nicolas Dumazet

Nicolas Dumazet  added the comment:

I'm including a patch which replaces send by sendall in the examples in
both socket and socketserver.

--
keywords: +patch
nosy: +nicdumz
Added file: http://bugs.python.org/file14776/socket.patch

___
Python tracker 

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



[issue6005] Bug in socket example

2009-05-12 Thread Mads Kiilerich

New submission from Mads Kiilerich :

http://docs.python.org/library/socket.html says about socket.send:
"Applications are responsible for checking that all data has been sent;
if only some of the data was transmitted, the application needs to
attempt delivery of the remaining data."

And about socket.sendall:
"Unlike send(), this method continues to send data from string until
either all data has been sent or an error occurs."

However, the examples on the same page uses plain conn.send(data)
without checking anything. That is misleading.

A solution could be to use conn.sendall(data) instead.

--
assignee: georg.brandl
components: Documentation
messages: 87633
nosy: georg.brandl, kiilerix
severity: normal
status: open
title: Bug in socket example
type: behavior
versions: Python 2.6

___
Python tracker 

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