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

Deprecate the sanitizer and recommend Bleach #501

Merged
merged 3 commits into from
Jun 21, 2020

Conversation

gsnedders
Copy link
Member

See #443. cc/ @jgraham @g-k

@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2020

Codecov Report

Merging #501 into master will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #501      +/-   ##
==========================================
+ Coverage   90.97%   91.07%   +0.09%     
==========================================
  Files          49       50       +1     
  Lines        6936     7044     +108     
  Branches     1322     1341      +19     
==========================================
+ Hits         6310     6415     +105     
- Misses        468      475       +7     
+ Partials      158      154       -4     
Impacted Files Coverage Δ
html5lib/filters/sanitizer.py 93.38% <100.00%> (+0.22%) ⬆️
html5lib/tests/sanitizer.py 82.75% <100.00%> (+0.61%) ⬆️
html5lib/tests/test_sanitizer.py 94.80% <100.00%> (+0.06%) ⬆️
html5lib/_utils.py 82.95% <0.00%> (-4.55%) ⬇️
html5lib/tests/support.py 92.24% <0.00%> (-1.73%) ⬇️
html5lib/html5parser.py 98.43% <0.00%> (-0.02%) ⬇️
html5lib/_inputstream.py 91.77% <0.00%> (ø)
html5lib/tests/test_parser2.py 100.00% <0.00%> (ø)
html5lib/tests/test_tokenizer2.py 100.00% <0.00%> (ø)
html5lib/_tokenizer.py 99.59% <0.00%> (+<0.01%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d49afd3...bbebb8d. Read the comment docs.

@@ -11,6 +12,13 @@
__all__ = ["Filter"]


warnings.warn(
"html5lib's sanitizer is deprecated; see " +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this string could be a global.

Copy link

@g-k g-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

* Try to import from `collections.abc` to remove DeprecationWarning and ensure
`html5lib` keeps working in future Python versions. (#403)
* Drop optional `datrie` dependency. (#442)
* Try to import from ``collections.abc`` to remove DeprecationWarning and ensure
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@gsnedders
Copy link
Member Author

Should probably also make sure the docs reflect this.

@gsnedders gsnedders mentioned this pull request Jun 16, 2020
@gsnedders gsnedders merged commit 8df6cc9 into html5lib:master Jun 21, 2020
@gsnedders gsnedders deleted the deprecate-sanitizer branch June 21, 2020 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants