Page MenuHomePhabricator

pywikibot.Link representation not reconstructable
Open, Needs TriagePublic


Currently a pywikibot.Link.__repr()__ returns Link(self.title,, omitting namespace, section and anchor/label.

As a result you cannot recreate the Link object from its representation.

This was one of the @TODOs from gerrit:442168


Event Timeline

The namespace pehaps should be a part of the representation, but for the others, methods like section, anchor works instead. Page also doesn't show text or access rights on the first glance.

Anyway I would suggest to have some .fromLink() method to create a new Link from the old Link easily. I even think there is such method, isn't there?

Change 511399 had a related patch set uploaded (by Lokal Profil; owner: Lokal Profil):
[pywikibot/core@master] Removing @TODOs

Change 511399 merged by jenkins-bot:
[pywikibot/core@master] Removing @TODOs