Bug 33854 - Ошибка при импортировании
Summary: Ошибка при импортировании
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: python3-module-html5lib (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Vitaly Lipatov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-06 17:28 MSK by obirvalger@altlinux.org
Modified: 2017-09-07 08:41 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description obirvalger@altlinux.org 2017-09-06 17:28:57 MSK
Во время импорта этого модуля происходит ошибка:
>>> import html5lib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/site-packages/html5lib/__init__.py", line 16, in <module>
    from .html5parser import HTMLParser, parse, parseFragment
  File "/usr/lib/python3/site-packages/html5lib/html5parser.py", line 12, in <module>
    from . import _tokenizer
  File "/usr/lib/python3/site-packages/html5lib/_tokenizer.py", line 3, in <module>
    from six import chr as chr
ImportError: cannot import name 'chr'
Comment 1 Vitaly Lipatov 2017-09-07 08:30:45 MSK
Что интересно:
$ grep -n chr /usr/lib/python3/site-packages/html5lib/_tokenizer.py
3:from six import chr as chr

$ grep -n chr /usr/lib/python2.7/site-packages/html5lib/_tokenizer.py
3:from six import unichr as chr

Видимо, это бага 2to3, который не глядя заменяет unichr на chr.
Comment 2 Repository Robot 2017-09-07 08:41:50 MSK
python-module-html5lib-1:0.999999999-alt2 -> sisyphus:

Thu Sep 07 2017 Vitaly Lipatov <lav@altlinux.ru> 1:0.999999999-alt2
- restore unichr after 2to3 (ALT bug 33854)