This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author akira
Recipients akira, techtonik
Date 2012-11-05.07:13:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352099628.41.0.84766291199.issue16409@psf.upfronthosting.co.za>
In-reply-to
Content
Summary: It is a new behavior. There is no need to change either code or
         docs. Though docs could be clarified to be more explicit.
  
 
The behavior has been introduced only in 3.3 in revision 53715804dc71 
[1] from issue 10050 [2]

It knownly breaks backward-compatibility. The docstring says:

> The reporthook argument should be a callable that accepts a block
> number, a read size, and the total file size of the URL target.

The change was rejected in issue 849407 [3]

Though it is not mentioned in Misc/NEWS and 
Doc/library/urllib.request.rst doesn't mention the change from a static
block size to a read size explicitly:

> The third argument, if present, is a hook function that will be called 
> once on establishment of the network connection and once after each 
> block read thereafter.  The hook will be passed three arguments; a 
> count of blocks transferred so far, a block size in bytes, and the 
> total size of the file.

*after each block read* and *block size in bytes* do not suggest that 
the block size must be constant. This part in the docs could be more 
clear.

There is related issue 1490929 [4]

[1]: http://hg.python.org/cpython/rev/53715804dc71
[2]: http://bugs.python.org/issue10050
[3]: http://bugs.python.org/issue849407
[4]: http://bugs.python.org/issue1490929
History
Date User Action Args
2012-11-05 07:13:48akirasetrecipients: + akira, techtonik
2012-11-05 07:13:48akirasetmessageid: <1352099628.41.0.84766291199.issue16409@psf.upfronthosting.co.za>
2012-11-05 07:13:48akiralinkissue16409 messages
2012-11-05 07:13:46akiracreate