Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: DeprecationWarning: html5lib's sanitizer is deprecated #557

Closed
pllim opened this issue Sep 17, 2020 · 1 comment · Fixed by #558
Closed

bug: DeprecationWarning: html5lib's sanitizer is deprecated #557

pllim opened this issue Sep 17, 2020 · 1 comment · Fixed by #558

Comments

@pllim
Copy link

pllim commented Sep 17, 2020

Describe the bug

Hello. This deprecation has come up in our project's CI as such (full log):

.../astropy/utils/xml/writer.py:195: in <lambda>
    self.xml_escape_cdata = lambda x: bleach.clean(x, **clean_kwargs)
.../bleach/__init__.py:84: in clean
    return cleaner.clean(text)
.../bleach/sanitizer.py:175: in clean
    filtered = BleachSanitizerFilter(
.../bleach/sanitizer.py:273: in __init__
    return super(BleachSanitizerFilter, self).__init__(source, **kwargs)
...
E       DeprecationWarning: html5lib's sanitizer is deprecated;
see https://github.com/html5lib/html5lib-python/issues/443 and
please let us know if Bleach is unsuitable for your needs

As the traceback says, we are already using Bleach (3.2.0).

I asked over at html5lib/html5lib-python#443 (comment) and it was suggested that I open a bug report here. Thank you!

python and bleach versions (please complete the following information):

  • Python Version: 3.8.1
  • Bleach Version: 3.2.0

To Reproduce

Steps to reproduce the behavior: Is the traceback sufficient?

Expected behavior

No deprecation warning, because I am not sure if there is anything I can do about it, except ignoring the warning.

Additional context

Our CI turns deprecation warnings into failures.

@g-k
Copy link
Collaborator

g-k commented Sep 17, 2020

Hi, thanks for the report!

The traceback is sufficient. I'll add some tests that warnings aren't propagated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants