WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.61k stars 1.02k forks source link

pyLibravatar not detected by recent VCS checkouts #1345

Closed pmattern closed 7 years ago

pmattern commented 7 years ago

Steps to reproduce

Actual behavior

pyLibravatar is not detected both according to the "Performance Report" (./admin/performance/) as well as the output of python manage.py list_versions.

Expected behaviour

pyLibravatar should be detected.

Server configuration

 * Weblate weblate-2.11-33-gc85727227
 * Python 3.5.3
 * Django 1.10.5
 * six 1.10.0
 * social-auth-core 1.1.0
 * social-auth-app-django 1.0.1
 * django-appconf 1.0.2
 * Translate Toolkit 2.0.0
 * Whoosh 2.7.4
 * defusedxml 0.4.1
 * Git 2.11.0
 * Pillow (PIL) 1.1.7
 * dateutil 2.6.0
 * lxml 3.7.2
 * django-crispy-forms 1.6.1
 * compressor 2.1
 * djangorestframework 3.5.3
 * pytz 2016.10
 * pyuca N/A
 * python-bidi 0.4.0
 * PyYAML 3.12
 * git-review 1.25.0
 * Database backends: django.db.backends.sqlite3

Additional notes

Seen running several commits from the last days including c857272. Same findings on Arch Linux (Python 3.6) and Debian stretch/testing (Python 3.5). All dependencies installed from the PyPI. Same findings on Arch Linux when using the binary packages provided by the distribution instead. Setting ENABLE_AVATARS = True in settings.py doesn't help (for testing only, I'm aware this shouldn't be needed).

nijel commented 7 years ago

I'm not aware of any related change, also it works fine for me.

Does the libravatar module work for you? Can you try python -c 'import libravatar'?

pmattern commented 7 years ago
# python -c 'import libravatar' 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/libravatar.py", line 27, in <module>
    import DNS
ModuleNotFoundError: No module named 'DNS'

Other modules work, e. g.

# python -c 'import pyuca' 
# python -c 'import pytz'
# 

A dns dependency hadn't been pulled

# pip list --format=columns | grep -i dns
# 

All findings the same on both systems in question.

nijel commented 7 years ago

That explains why it does not work ;-). Install py3dns.

pmattern commented 7 years ago

Installing py3dns makes python -c 'import libravatar' behave as expected and fixes both findings posted in the initial comment. Btw. as for the former installing pydns has the same effect with regards to Python 2.

So on the one hand sorry for the noise.

On the other hand I was tricked into thinking Weblate is to blame because pyLibravatar apparently does not pull a crucial dependency. So isn't this a bug in pyLibravatar? Or is it due to the somewhat special situation that the implementations "pydns" of Python 3 and 2 respectively are maintained by different upstream projects? Also, wouldn't it make sense to mention py[3]dns in section Software requirements of the installation instructions?

nijel commented 7 years ago

Yes, it's bug in their packaging...

pmattern commented 7 years ago

FYI https://bugs.launchpad.net/pylibravatar/+bug/1661218.