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

Test warnings for python3.7 #425

Closed
kitterma opened this issue Dec 24, 2018 · 6 comments · Fixed by #548
Closed

Test warnings for python3.7 #425

kitterma opened this issue Dec 24, 2018 · 6 comments · Fixed by #548

Comments

@kitterma
Copy link

kitterma commented Dec 24, 2018

With python3.7, I get the following warnings from the test suite:

=============================== warnings summary ===============================
/usr/lib/python3/dist-packages/html5lib/_trie/_base.py:3
  /usr/lib/python3/dist-packages/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import Mapping

bleach/sanitizer.py:428
  /tmp/buildd/python-bleach-3.0.2/.pybuild/cpython3_3.7_bleach/build/bleach/sanitizer.py:428: DeprecationWarning: invalid escape sequence \s
    "[`\000-\040\177-\240\s]+",

bleach/sanitizer.py:577
  /tmp/buildd/python-bleach-3.0.2/.pybuild/cpython3_3.7_bleach/build/bleach/sanitizer.py:577: DeprecationWarning: invalid escape sequence \s
    style = re.compile('url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style)

bleach/sanitizer.py:592
  /tmp/buildd/python-bleach-3.0.2/.pybuild/cpython3_3.7_bleach/build/bleach/sanitizer.py:592: DeprecationWarning: invalid escape sequence \s
    if not re.match("^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style):

bleach/sanitizer.py:596
  /tmp/buildd/python-bleach-3.0.2/.pybuild/cpython3_3.7_bleach/build/bleach/sanitizer.py:596: DeprecationWarning: invalid escape sequence \w
    for prop, value in re.findall('([-\w]+)\s*:\s*([^:;]*)', style):
@willkg
Copy link
Member

willkg commented Dec 28, 2018

What version of Bleach is that? Is that master tip?

@willkg
Copy link
Member

willkg commented Dec 31, 2018

I checked and all of these except the html5lib one have been fixed in master.

The warning from html5lib was fixed in html5lib/html5lib-python@4f92357 but that hasn't made it into a release, yet. Once that's released, I can update our vendored copy.

@brettcannon
Copy link

FYI the html5lib issue now raises an ImportError in CPython master (i.e. 3.9).

@fschulze
Copy link

Also see html5lib/html5lib-python#419 as the issue for a new release of html5lib. Since this is vendored anyway, could it be vendored directly without a release?

@sblondon
Copy link
Contributor

sblondon commented Sep 14, 2020

Release 1.1 from html5lib seems to fix this DeprecationWarning:
https://github.com/html5lib/html5lib-python/blob/master/CHANGES.rst#11

There is no date for the release in the .rst file but it's available on pypi.

@hugovk
Copy link
Contributor

hugovk commented Sep 14, 2020

html5lib 1.1 was released to PyPI on Jun 23, 2020:

@g-k g-k mentioned this issue Sep 15, 2020
@g-k g-k closed this as completed in #548 Sep 16, 2020
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 a pull request may close this issue.

6 participants