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 serhiy.storchaka
Recipients XapaJIaMnu, berker.peksag, serhiy.storchaka
Date 2017-10-02.06:14:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506924847.15.0.213398074469.issue31661@psf.upfronthosting.co.za>
In-reply-to
Content
There are issues in implementing support of request rate in robotparser.

    req_rate = collections.namedtuple('req_rate',
                                      'requests seconds')
    entry.req_rate = req_rate
    entry.req_rate.requests = int(numbers[0])
    entry.req_rate.seconds = int(numbers[1])

First, a new namedtuple type is created for every entry. This is slow even with recent namedtuple optimizations, and is much slower in 3.6. This wastes a memory, since new type is created for every entry. This is definitely wrong, since req_rate is set to a namedtuple type instead of namedtuple instance. And there is a question why a namedtuple is used here at all. Other classes in this module are not namedtuples.
History
Date User Action Args
2017-10-02 06:14:07serhiy.storchakasetrecipients: + serhiy.storchaka, berker.peksag, XapaJIaMnu
2017-10-02 06:14:07serhiy.storchakasetmessageid: <1506924847.15.0.213398074469.issue31661@psf.upfronthosting.co.za>
2017-10-02 06:14:07serhiy.storchakalinkissue31661 messages
2017-10-02 06:14:06serhiy.storchakacreate