Page MenuHomePhabricator

weblinkchecker imports both config and config2
Closed, ResolvedPublic

Description

config2 should be preferable imported due to circular Imports but not both

Event Timeline

Xqt created this task.Oct 5 2020, 5:48 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptOct 5 2020, 5:48 AM
Xqt triaged this task as Low priority.Oct 5 2020, 5:48 AM

Hey there, I would like to tackle this task but I need some assistance for the same. So would you help me to get started with solving this?

Xqt added a comment.Sat, Oct 31, 10:20 PM

@Homeboy_445: Sure. If you have any questions, just ask.

So do I have to remove the config import from the weblinkchecker.py?

Xqt added a comment.Sun, Nov 1, 11:28 AM

So do I have to remove the config import from the weblinkchecker.py?

Yes but you have to rename their usage. I propose to Import config2 as config and rename the config2 usage to config e.g.

from pywikibot import config2 as config

the replace all occurences of config2 to config

Homeboy_445 added a comment.EditedSun, Nov 1, 11:33 AM

Okay got it! So my task is to import config2 as config and rename config2's usage to config. I'm on it and will let you know as soon as its done!

Xqt added a comment.EditedSun, Nov 1, 4:37 PM

Okay got it! So my task is to import config2 as config and rename config2's usage to config. I'm on it and will let you know as soon as its done!

Yes. Thanks in advance for your contribution.

Change 638097 had a related patch set uploaded (by Homeboy 445; owner: Homeboy 445):
[pywikibot/core@master] imported config2 as config and renamed config2 as config

https://gerrit.wikimedia.org/r/638097

Xqt assigned this task to Homeboy_445.Mon, Nov 2, 4:30 PM

Change 638097 had a related patch set uploaded (by Homeboy 445; owner: Homeboy 445):
[pywikibot/core@master] imported config2 as config and renamed config2 as config

https://gerrit.wikimedia.org/r/638097

Xqt closed this task as Resolved.Tue, Nov 10, 7:45 AM

Change 638097 merged by jenkins-bot:
[pywikibot/core@master] imported config2 as config and renamed config2 as config

https://gerrit.wikimedia.org/r/638097

@Xqt Thank you so very much for bearing with me.