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 techtonik
Recipients techtonik
Date 2012-11-04.22:27:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za>
In-reply-to
Content
Renamed urllib.urlretrieve changed behaviour in Py3k, which leads to ZeroDivisionErrors in applications that use block_size parameter for calculations. Previously, block size was constant. Now it varies making it impossible to exactly calculate value transferred so far. Test file attached.


C:\Python33\python.exe test.py
0 0 59654
1 8192 59654
2 8192 59654
3 8192 59654
4 8192 59654
5 8192 59654
6 8192 59654
7 8192 59654
8 2310 59654

C:\Python27\python.exe test.py
(0, 8192, 59654)
(1, 8192, 59654)
(2, 8192, 59654)
(3, 8192, 59654)
(4, 8192, 59654)
(5, 8192, 59654)
(6, 8192, 59654)
(7, 8192, 59654)
(8, 8192, 59654)
History
Date User Action Args
2012-11-04 22:27:05techtoniksetrecipients: + techtonik
2012-11-04 22:27:05techtoniksetmessageid: <1352068025.04.0.157597994471.issue16409@psf.upfronthosting.co.za>
2012-11-04 22:27:04techtoniklinkissue16409 messages
2012-11-04 22:27:04techtonikcreate