New submission from anatoly techtonik: 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) ---------- components: Library (Lib) files: test.py messages: 174836 nosy: techtonik priority: normal severity: normal status: open title: urlretrieve regression: first call returns block size as 0 versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27886/test.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16409> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com