jayvdb added a comment.

One approach to very heavily reduce this problem is to build a special 
deprecator, which detects and screams when site = None.  This can be added to 
every function that has a site argument.

This will cause a lot of warnings in the test suite, which we will need to fix.
Also, in the test suite, we could change the setup routines so that 
pywikibot.Site can only be called during setUpClass (or maybe also during 
setUp), and fails if any part of the test suite causes pywikibot.Site to be 
invoked, which means the pre-declared site object was not passed through all 
methods to whereever it is needed.


TASK DETAIL
  https://phabricator.wikimedia.org/T104653

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: jayvdb
Cc: Aklapper, jayvdb, pywikibot-bugs-list, Malyacko, P.Copp



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to