Commit 75e3bbae by Erich Blume Committed by Sébastien Eustace

Suppress deprecation warnings in html5lib (#688)

html5lib currently issues a DeprecationWarning in python ^3.7. This
warning is fixed here:

https://github.com/html5lib/html5lib-python/commit/4f9235752cea29c5a31721440578b430823a1e69

I have spoken with the maintainers (#whatwg on freenode) and they said
that a new release of html5lib is not scheduled as the package is not
actively maintained, but it sounded like they were aware of the issue
and could release a new version. (I did not press further.)

This is a very minor change with no major intended side effects, other
than that it cleans up output while running tests (and presumably from
any clients using the legacy_repository type).
parent f1668c17
...@@ -21,7 +21,6 @@ from typing import Generator ...@@ -21,7 +21,6 @@ from typing import Generator
from typing import Optional from typing import Optional
from typing import Union from typing import Union
import html5lib
import requests import requests
from cachecontrol import CacheControl from cachecontrol import CacheControl
...@@ -47,6 +46,12 @@ from .auth import Auth ...@@ -47,6 +46,12 @@ from .auth import Auth
from .exceptions import PackageNotFound from .exceptions import PackageNotFound
from .pypi_repository import PyPiRepository from .pypi_repository import PyPiRepository
import warnings
with warnings.catch_warnings():
warnings.simplefilter("ignore")
import html5lib
class Page: class Page:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment