diff options
author | Christian Heimes <christian@python.org> | 2019-04-14 11:37:35 +0200 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2019-04-14 12:19:40 +0200 |
commit | 94d3be2d43eddc016ebeb813299bcca0484ca2be (patch) | |
tree | 17512d43ce643989576de1591fb8fd153d232a12 | |
parent | 4ecaeda4d95abbec74de65728271e11b8ca3cda6 (diff) | |
download | defusedxml-git-94d3be2d43eddc016ebeb813299bcca0484ca2be.tar.gz |
Deprecate lxml
Signed-off-by: Christian Heimes <christian@python.org>
-rw-r--r-- | defusedxml/lxml.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/defusedxml/lxml.py b/defusedxml/lxml.py index 3468824..f16256f 100644 --- a/defusedxml/lxml.py +++ b/defusedxml/lxml.py @@ -10,6 +10,8 @@ The code has NO protection against decompression bombs. from __future__ import print_function, absolute_import import threading +import warnings + from lxml import etree as _etree from .common import DTDForbidden, EntitiesForbidden, NotSupportedError @@ -21,6 +23,13 @@ __origin__ = "lxml.etree" tostring = _etree.tostring +warnings.warn( + "defusedxml.lxml is no longer supported and will be removed in a " + "future release.", + category=DeprecationWarning +) + + class RestrictedElement(_etree.ElementBase): """A restricted Element class that filters out instances of some classes """ |