akira added the comment:

The summary assumes that issue 10050 is valid i.e., urlretrieve is
reimplemented using new urlopen and 2.x FancyURLopener is deprecated.

It might not be so [1]. In this case the summary is incorrect.

Old implementation is available as:

  opener = FancyURLopener()
  urlretrieve = opener.retrieve

btw, the new implementation doesn't prevent you to estimate the 

  def make_reporthook():
      read = 0  # number of bytes read so far
      def reporthook(blocknum, blocksize, totalsize):
          nonlocal read
          read += blocksize
          if totalsize > 0:
              percent = read * 1e2 / totalsize
              print("%5.1f%% %*d / %d" % (
                      percent, len(str(totalsize)), read, totalsize))
              print("read %d" % (read,))
      return reporthook

[1]: http://mail.python.org/pipermail/python-dev/2011-March/109450.html


Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list

Reply via email to