Your message dated Thu, 24 Jul 2014 17:00:08 +0000 with message-id <[email protected]> and subject line Bug#720341: fixed in sphinxcontrib-spelling 2.1.1-1 has caused the Debian Bug report #720341, regarding [python-sphinxcontrib.spelling] Spellchecker is not unicode avare in PythonBuiltinsFilter class to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 720341: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720341 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: python-sphinxcontrib.spelling Version: 1.4-1 Severity: normal Tags: patch Hi, the package has a problem with unicode strings/words in in the PythonBuiltinsFilter's _skip method and when i try to check rst documents written in Slovak language i get: Exception occurred: File "/usr/lib/pymodules/python2.7/sphinx/application.py", line 204, in build self.builder.build_update() File "/usr/lib/pymodules/python2.7/sphinx/builders/__init__.py", line 191, in build_update self.build(['__all__'], to_build) File "/usr/lib/pymodules/python2.7/sphinx/builders/__init__.py", line 252, in build self.write(docnames, list(updated_docnames), method) File "/usr/lib/pymodules/python2.7/sphinx/builders/__init__.py", line 292, in write self.write_doc(docname, doctree) File "/usr/lib/pymodules/python2.7/sphinxcontrib/spelling.py", line 295, in write_doc for word, suggestions in self.checker.check(node.astext()): File "/usr/lib/pymodules/python2.7/sphinxcontrib/spelling.py", line 203, in check for word, pos in self.tokenizer(text): File "/usr/lib/python2.7/dist-packages/enchant/tokenize/__init__.py", line 389, in next (word,pos) = next(self._tokenizer) File "/usr/lib/python2.7/dist-packages/enchant/tokenize/__init__.py", line 389, in next (word,pos) = next(self._tokenizer) File "/usr/lib/python2.7/dist-packages/enchant/tokenize/__init__.py", line 390, in next while self._skip(word): File "/usr/lib/pymodules/python2.7/sphinxcontrib/spelling.py", line 150, in _skip return hasattr(__builtin__, word) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 2: ordinal not in range(128) After some inspection i found, that sphinx sends all words as unicode strings (<type 'unicode'>), not matter if they have non ASCII chars or not, but when there are non ASCII chars here is a problem, because the hasattr function gets the *str* as argument. Solution seems to be to add "encode...", to convert from unicode to the str type (at line 149): return hasattr(__builtin__, word.encode("utf-8")) I am not sure if it is workaround or solution, but seems to work for English texts too. Patch attached. regards --- System information. --- Architecture: amd64 Kernel: Linux 3.10-2-amd64 Debian Release: jessie/sid --- Package information. --- Depends (Version) | Installed ===============================-+-============ python | 2.7.5-2 python-support (>= 0.90.0) | 1.0.15 python-docutils | 0.10-3 python-enchant | 1.6.5-2 python-sphinx | 1.1.3+dfsg-8 -- Slavko http://slavino.sk--- /usr/share/pyshared/sphinxcontrib/spelling.py 2012-08-04 17:14:39.000000000 +0200 +++ /tmp/spelling.py 2013-08-20 18:47:42.000000000 +0200 @@ -146,7 +146,7 @@ """Ignore names of built-in Python symbols. """ def _skip(self, word): - return hasattr(__builtin__, word) + return hasattr(__builtin__, word.encode("utf-8")) class ImportableModuleFilter(Filter): """Ignore names of modules that we could import.
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---Source: sphinxcontrib-spelling Source-Version: 2.1.1-1 We believe that the bug you reported is fixed in the latest version of sphinxcontrib-spelling, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Daniele Tricoli <[email protected]> (supplier of updated sphinxcontrib-spelling package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Tue, 22 Jul 2014 23:55:48 +0200 Source: sphinxcontrib-spelling Binary: python-sphinxcontrib.spelling python3-sphinxcontrib.spelling python-sphinxcontrib.spelling-doc Architecture: source all Version: 2.1.1-1 Distribution: unstable Urgency: medium Maintainer: Debian Python Modules Team <[email protected]> Changed-By: Daniele Tricoli <[email protected]> Description: python-sphinxcontrib.spelling - Sphinx "spelling" extension python-sphinxcontrib.spelling-doc - Sphinx "spelling" extension (documentation) python3-sphinxcontrib.spelling - Sphinx "spelling" extension (Python 3) Closes: 720341 745382 Changes: sphinxcontrib-spelling (2.1.1-1) unstable; urgency=medium . * New upstream release - Fix unicode handling in builtins filter (Closes: #720341) * Switched to pybuild (Closes: #745382) * Added Python3 package * Added python-sphinxcontrib.spelling-doc package * debian/compat - Bumped debhelper compatibility level to 9 * debian/control - Added dh-python and python-pbr to Build-Depends - Bumped python-all to (>= 2.6.6-3) - Bumped debhelper B-D to (>= 9) - Bumped Standards-Version to 3.9.5 (no changes needed) - Added stanza for python-sphinxcontrib.spelling.doc package - Added stanza for python3-sphinxcontrib.spelling package - Added python3-{all,docutils,enchant,nose,pbr,setuptools,sphinx} to B-D - Added X-Python{,3}-Version option * debian/copyright - Updated copyright years * debian/python-sphinxcontrib.spelling.docs - Renamed from debian/docs * debian/python-sphinxcontrib.spelling-doc.doc-base - Added doc-base * debian/python-sphinxcontrib.spelling-doc.docs - Added * debian/python{,3}-sphinxcontrib.spelling.pyremove - Removed .pth since it is not needed * debian/rules - Built documentation using sphinx-build inside override_dh_auto_build - Cleaned build documentation inside override_dh_auto_clean - Switched to PYBUILD_TEST_NOSE=1 for tests - Added python3 to debhelper rule * debian/tests/control - Added stanza for Python3 testing * debian/tests/unittests{,3} - Updated tests path due to upstream change - Switched to -m nose instead of calling nosetests{2,3} * debian/tests/unittests3 - Added * debian/upstream/signing-key.asc - Added upstream key * debian/watch - Switched download URL to HTTPS - Added pgpsigurlmangle option Checksums-Sha1: 55485b8b4e315c61324633b834f4ecef20000ca0 2619 sphinxcontrib-spelling_2.1.1-1.dsc 4d6df791ec8b5b0199c6d20ba812382b6a23ef3a 35353 sphinxcontrib-spelling_2.1.1.orig.tar.gz f9b6482dc374180bdab83b859b67269a6f5d7c7b 50188 sphinxcontrib-spelling_2.1.1-1.debian.tar.xz 67f971cac916237ef8683a97e27461a997b2e0d6 27456 python-sphinxcontrib.spelling_2.1.1-1_all.deb d22a600b134cc0e534f05010e2c8e42a876d8595 27560 python3-sphinxcontrib.spelling_2.1.1-1_all.deb 41e1e8fc8a160dd2468cdc78980248331bf019a1 42826 python-sphinxcontrib.spelling-doc_2.1.1-1_all.deb Checksums-Sha256: bf67fea98341016738102a93ea95bf229c3a78c3d44d80286f2fa778cc1f4f83 2619 sphinxcontrib-spelling_2.1.1-1.dsc ad1f99232bde087622769f029e74770b462b3d010909ad00e545d59eda8eb719 35353 sphinxcontrib-spelling_2.1.1.orig.tar.gz 55ddeaa6e6145f6c466057a017918a3bd55b5d2c84c64d318e0ad0179675b4ec 50188 sphinxcontrib-spelling_2.1.1-1.debian.tar.xz a466bb3a331ba79d4dfe9200286f6771c31ffad921d49416d147c6f4d46394d1 27456 python-sphinxcontrib.spelling_2.1.1-1_all.deb 88410b19bf31135a7f98f6a880be6635bf36e2c154552f013d86b957369c1631 27560 python3-sphinxcontrib.spelling_2.1.1-1_all.deb e9cc801bd159d3421fd3ced980fa73bc91d883ecc313e5e4924264b0b9e986ce 42826 python-sphinxcontrib.spelling-doc_2.1.1-1_all.deb Files: fff742128c26b0f58d95af06e53d648d 27456 python optional python-sphinxcontrib.spelling_2.1.1-1_all.deb 15f221fa72a435e44d137198d51e9a80 27560 python optional python3-sphinxcontrib.spelling_2.1.1-1_all.deb 6d17a8f6833bf5b008d0b4159087e929 42826 doc optional python-sphinxcontrib.spelling-doc_2.1.1-1_all.deb d8c998725759b241391ba21f147086c9 2619 python optional sphinxcontrib-spelling_2.1.1-1.dsc c6758dd166486dc609a7aacb8c97cabf 35353 python optional sphinxcontrib-spelling_2.1.1.orig.tar.gz 20de7a269c94cb0a9804579d08d9c657 50188 python optional sphinxcontrib-spelling_2.1.1-1.debian.tar.xz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJT0ApSAAoJEK728aKnRXZFuwIQALuazHf4RI2BPm4v7241Gfeb EL7aPGI+nOVbqBOLBedGtnMl6fsC+ZHPxuQWxwaIC02J/5exMxZg991vZ7Hqnljf uHP1vbQgFfkartOeZBuixjSq++OHBk7TSXU5KZj5f9R2mq85X1TBPELGz7O0HYkn ln42zn6f9VvvotdIL/OvqO9tHpiuWbgkCmEncxwYyuGpCCZNctIS33O9xoT+fCVE 2GekcRqY9g4QNYNxSza1lCP0ic2DoVP/iD9ra346FP52cd1RXrSgd0x5tRm2d66t /j1kLONdxDW6ZnU+Vh1fVjoVIVMOPrSdmqxFidlR5bGOif9JZGchY7rf/WnbFchq ZaNy71rLJCLJH//SRxVp8uoCrAMbVG5jZ9HSZUxZN96o6YxITZPO/+bkxBcLkSMK yP9BfuHvPDV2+Rdvyx47PDLGY/tzFvzRMmBYkY/wVyEKkNweq+rvFebDtzTwg1yK mgEMF2QaOdeoOvyBNhn1lzihReZ9G3vJ19rTcFu34r66fVvn6XydYtBNkP6qViOk A9FUj5TTk/A3RFY+wn+Wd8C/Z8WRHae2OMI7ymSKhn43WMPbl/bCWQo5EqrbwgtE fovwiA2hfeaz0WPFBC4wn7bmujcsybEm8yw27b1n5ZvvBIy8gIozIgTT+DJm6tW6 oRopF7nUe8u2g+ff5Ocr =yaoi -----END PGP SIGNATURE-----
--- End Message ---
_______________________________________________ Python-modules-team mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

