Page MenuHomePhabricator

pywikibot transitive dependency on crypto
Closed, InvalidPublicBUG REPORT


Steps to Reproduce:

Try running an automatic test using pywikibot library with travis just specifying pywikibot pywikibot>=3.0.20200508 in requirements.txt should work.

Actual Results:
ERROR: tests.test_pywikibot (unittest.loader._FailedTest)

ImportError: Failed to import test module: tests.test_pywikibot

Traceback (most recent call last):

File "/opt/python/3.8.1/lib/python3.8/unittest/", line 436, in _find_test_path

  module = self._get_module_from_name(name)

File "/opt/python/3.8.1/lib/python3.8/unittest/", line 377, in _get_module_from_name


File "/home/travis/build/WolfgangFahl/XSDToSMW/tests/", line 2, in <module>

  from wikibot.wikibot import WikiBot

File "/home/travis/virtualenv/python3.8.1/lib/python3.8/site-packages/wikibot/", line 12, in <module>

  from wikibot.crypt import Crypt

File "/home/travis/virtualenv/python3.8.1/lib/python3.8/site-packages/wikibot/", line 6, in <module>

  from Crypto.Hash import MD5

ModuleNotFoundError: No module named 'Crypto'

Expected Results:

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptFri, May 22, 9:51 AM
Aklapper closed this task as Invalid.Fri, May 22, 10:15 AM
Aklapper added a project: Pywikibot.

@Seppl2013: Assuming this task is about the Pywikibot code project, hence adding that project tag so other people can find this task. Please set appropriate project tags when possible. Thanks!

The line from wikibot.crypt import Crypt seems to come from and is not included in Pywikibot itself.

Regarding Pywikibot, see T203435 and related

Restricted Application edited subscribers, added: pywikibot-bugs-list; removed: Liuxinyu970226. · View Herald TranscriptFri, May 22, 10:15 AM

Looks like this is a general pip problem with transitive dependencies. The pycrypto library is also explcitly mentioned in the requirements.txt file for py-3rdparty-mediawiki. I'll try to release that library on pypi to see if that fixes the issue.