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.

classification
Title: robotparser: Automatically call modified function in read()
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, mlorant, orsenthil
Priority: normal Keywords: patch

Created on 2014-04-28 12:55 by mlorant, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
robotparser.diff mlorant, 2014-04-28 12:55 diff file of the adding of the method review
Messages (2)
msg217370 - (view) Author: Maxime Lorant (mlorant) * Date: 2014-04-28 12:55
For the moment, RobotFileParser (on both Python 2.x and 3.x) has a method modified, but it is never called in the class itself, hence the last_checked attribute is always at 0 if the user doesn't call modified() explicitly. 

I would suggest to add a call to modified() at the end of the read() method. It makes more sense to have a last_checked value (returns in mtime()) updated by the class itself. Especially when the doc says: "Returns the time the ``robots.txt`` file was last fetched.". Currently this sentence isn't true, since the value has to be updated by the user.
msg252519 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-10-08 08:02
This is already fixed by changeset 4ea86cd87f95 in issue 21469 (2.7 and 3.4+). Thanks for the report and for the patch.
History
Date User Action Args
2022-04-11 14:58:02adminsetgithub: 65572
2015-10-08 08:02:32berker.peksagsetstatus: open -> closed

nosy: + berker.peksag
messages: + msg252519

resolution: out of date
stage: resolved
2014-04-28 12:55:25mlorantcreate