Issue #18 open

spelling: DeprecationWarning for get_tokenizer

Daniele Tricoli
created an issue

Hello, running tests give this DeprecationWarning: {{{ sphinxcontrib/spelling.py:181: DeprecationWarning: passing 'filters' as a non-keyword argument to get_tokenizer() is deprecated self.tokenizer = get_tokenizer(lang, filters) }}}

Kind regards,

Daniele Tricoli

Comments (5)

  1. Daniele Tricoli reporter

    Hello Doug, I'm using enchant/PyEnchant version 1.6.5 but to see the warning you need to get a version of pyenchant where https://github.com/rfk/pyenchant/issues/12 is fixed. The warning you should get with unfixed pyenchant is:

    /usr/lib/python2.6/dist-packages/enchant/tokenize/__init__.py:173: DeprecationWarning: passing 'filters' as a non-keyword argument to get_tokenizer() is deprecated
      warnings.warn(msg,category=DeprecationWarning)
    

    Contrary to what the "traceback" suggest, this is actually a warning about sphinxcontrib.spelling code.

    Cheers,

    Daniele Tricoli

  2. Doug Hellmann

    I don't understand. Are you using the 1.6.5 public release of PyEnchant, or are you using a development version with a specific bug fix included? I have 1.6.5 and do not see the error when I run "nosetests test" to run the tests (nor do I see it when I run tox).

  3. Daniele Tricoli reporter

    Hello Doug, thanks for your reply.

    I'm using the public 1.6.5 release of PyEnchant. I will explain better how I get the warning.

    In Python 2.7 DeprecationWarnings are ignored by default so to get the warning I'm using this:

    export PYTHONWARNINGS=d; nosetests
    

    In this way you should get this output:

    $ export PYTHONWARNINGS=d; nosetests
    /usr/lib/pymodules/python2.7/nose/util.py:14: DeprecationWarning: The compiler package is deprecated and removed in Python 3.x.
      from compiler.consts import CO_GENERATOR
    /usr/lib/python2.7/dist-packages/enchant/tokenize/__init__.py:173: DeprecationWarning: passing 'filters' as a non-keyword argument to get_tokenizer() is deprecated
      warnings.warn(msg,category=DeprecationWarning)
    

    The first DeprecationWarning is not urgent right now because it targets Python3, but the second one is about the issue we have talked about.

    Using Python2.6 you should get the warning because DeprecationWarning are not ignored:

    $ python2.6 /usr/bin/nosetests
    /usr/lib/python2.6/dist-packages/enchant/tokenize/__init__.py:173: DeprecationWarning: passing 'filters' as a non-keyword argument to get_tokenizer() is deprecated
      warnings.warn(msg,category=DeprecationWarning)
    

    Kind regards,

    Daniele Tricoli

  4. Log in to comment