Daviskr created this task. Daviskr added a subscriber: Daviskr. Daviskr added a project: pywikibot-core. Daviskr changed Security from none to none.
TASK DESCRIPTION The naming of [[https://git.wikimedia.org/blob/pywikibot%2Fcore/75b49209d56457097c7234baf2d0... | LogEntry.title()]] implies that it would return a string, however it returns a Page. At this point in time, I don't see a way to get the page of a LogEntry without using this method. Should it be renamed to page() and have a real title() that returns data["title"]?
TASK DETAIL https://phabricator.wikimedia.org/T78125
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: Daviskr Cc: Aklapper, Daviskr, jayvdb, pywikipedia-bugs
XZise added a subscriber: XZise. XZise added a comment.
The problem is that script outside of our control could use `title()` and relies on the fact that it actually returns a `Page` object. But apart from that you could call `event.title().title()` to get its title in string form.
TASK DETAIL https://phabricator.wikimedia.org/T78125
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: Aklapper, Daviskr, XZise, jayvdb, pywikipedia-bugs
XZise added a comment.
One long term solution would be to deprecate the `title()` usage and add a `page()` method. Then with pywikibot 3 (currently we are working towards pywikibot 2) repurpose the `title()` method returning a string. To aid scripts in transition we could add a parameter like `title(_no_parse=False)` which must be explicitly set to True and it then already returns a string. In this case emit no deprecation warning yet but as soon as `title()` returns a string nevertheless.
TASK DETAIL https://phabricator.wikimedia.org/T78125
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: Aklapper, Daviskr, XZise, jayvdb, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org