jayvdb added a project: Upstream. jayvdb added a comment.
From the commit message, this is an https://phabricator.wikimedia.org/tag/upstream/ problem: https://github.com/nose-devs/nose/issues/946 If that is the problem (and it does appear to be it), then we should see problems if any of the following have a `setUpClass` , if the `setUpClass` also attempts to use the required package during the `setUpClass` method: $ git grep --after-context=1 '^@require_modules' tests/interwiki_graph_tests.py:@require_modules('pydot') tests/interwiki_graph_tests.py-class TestWiktionaryGraph(SiteAttributeTestCase): -- tests/oauth_tests.py:@require_modules('mwoauth') tests/oauth_tests.py-class OAuthSiteTestCase(TestCase): -- tests/patrolbot_tests.py:@require_modules('mwparserfromhell') tests/patrolbot_tests.py-class TestPatrolBot(DefaultDrySiteTestCase): -- tests/proofreadpage_tests.py:@require_modules('bs4') tests/proofreadpage_tests.py-class TestProofreadPageIndexProperty(TestCase): -- tests/proofreadpage_tests.py:@require_modules('bs4') tests/proofreadpage_tests.py-class IndexPageTestCase(TestCase): -- tests/proofreadpage_tests.py:@require_modules('bs4') tests/proofreadpage_tests.py-class TestBasePageMethodsIndexPage(BasePageMethodsTestBase): -- tests/weblinkchecker_tests.py:@require_modules('memento_client') tests/weblinkchecker_tests.py-class MementoTestCase(TestCase): Those that also have a `setUpClass`: - TestWiktionaryGraph - TestIndexPageMappings - TestIndexPageMappingsRedlinks However it looks like only TestIndexPageMappingsRedlinks creates an IndexPage during `setUpClass`, so this is the only case where the `setUpClass` depends on the required module. An alternative solution is to delay the ImportError until BeautifulSoup is needed, however we'd need to consult the design decisions in Gerrit for https://phabricator.wikimedia.org/rPWBC6db08c932dd832fb23d0076e92dc030df734a15c , as I recall we did discuss where the ImportError should be raised . TASK DETAIL https://phabricator.wikimedia.org/T129965 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: jayvdb Cc: jayvdb, gerritbot, Aklapper, pywikibot-bugs-list, AbdealiJK, Lewizho99, Krenair _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
