Page MenuHomePhabricator

Add "Site" to the __all__ variable of pywikibot package
Closed, ResolvedPublic

Description

Reasons:

  • Currently Site does not appear in the generated documentation when we use help(pywikibot).
  • Some IDEs that have intellisense feature, including IDLE, depend on the function to be available in __all__ variable, otherwise won't suggest the related code completion.
  • Using from pywikibot import *does not import Site which seems to be an essential part of the package and should be imported as well. Although this kind of import should usually be avoided, it is okay to use it to save typing in interactive sessions.

Event Timeline

Dalba raised the priority of this task from to Needs Triage.
Dalba updated the task description. (Show Details)
Dalba added projects: Pywikibot, good first task.
Dalba added a subscriber: Dalba.

Hi I would like to work on this bug. This is my first bug. Can you give more details as to how I can fix this?

@blackops0057: Thanks for your interest! Please see https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker for general info about suggested reading (and as this task is about Pywikibot, https://www.mediawiki.org/wiki/Manual:Pywikibot has more info) and don't hesitate to ask here if you have specific questions about this task. Thank you!

I have already set up the build. Could you please give me the details of what has to be done to fix this bug? Thanks !

Could you please give me the details of what has to be done to fix this bug?

See the task description here (e.g. "should be imported as well" describes how to fix this bug). Please also see https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker#Feedback.2C_questions_and_support - thanks!

Change 262425 had a related patch set uploaded (by Ani310):
Added "Site" to the all variable of pywikibot package

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

Change 262425 merged by jenkins-bot:
Added "Site" to the all variable

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

jayvdb assigned this task to blackops0057.
jayvdb set Security to None.