summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-09-29 14:43:15 +0200
committerStefan Behnel <stefan_ml@behnel.de>2018-09-29 14:43:15 +0200
commitde326abde764fd0969d59601cd103fc8eea46487 (patch)
treea777b69f97e53f6a97aa645b83e173aad5920c89 /src
parentf677d68f863c9c112f4facfdb1d15212c4464dcb (diff)
downloadpython-lxml-de326abde764fd0969d59601cd103fc8eea46487.tar.gz
Fix import warnings in Py3.6+ by switching to absolute imports.
Diffstat (limited to 'src')
-rw-r--r--src/lxml/_elementpath.py2
-rw-r--r--src/lxml/builder.py2
-rw-r--r--src/lxml/html/clean.py2
-rw-r--r--src/lxml/html/diff.py2
-rw-r--r--src/lxml/sax.py2
5 files changed, 10 insertions, 0 deletions
diff --git a/src/lxml/_elementpath.py b/src/lxml/_elementpath.py
index 9360fabf..50bc162c 100644
--- a/src/lxml/_elementpath.py
+++ b/src/lxml/_elementpath.py
@@ -53,6 +53,8 @@
# you, if needed.
##
+from __future__ import absolute_import
+
import re
xpath_tokenizer_re = re.compile(
diff --git a/src/lxml/builder.py b/src/lxml/builder.py
index 9c4431ab..832cec31 100644
--- a/src/lxml/builder.py
+++ b/src/lxml/builder.py
@@ -37,6 +37,8 @@
The ``E`` Element factory for generating XML documents.
"""
+from __future__ import absolute_import
+
import lxml.etree as ET
from functools import partial
diff --git a/src/lxml/html/clean.py b/src/lxml/html/clean.py
index 11da2958..84359b67 100644
--- a/src/lxml/html/clean.py
+++ b/src/lxml/html/clean.py
@@ -4,6 +4,8 @@ Removes unwanted tags and content. See the `Cleaner` class for
details.
"""
+from __future__ import absolute_import
+
import re
import copy
try:
diff --git a/src/lxml/html/diff.py b/src/lxml/html/diff.py
index 3126d965..57bc3148 100644
--- a/src/lxml/html/diff.py
+++ b/src/lxml/html/diff.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+
import difflib
from lxml import etree
from lxml.html import fragment_fromstring
diff --git a/src/lxml/sax.py b/src/lxml/sax.py
index cb9326d5..01147513 100644
--- a/src/lxml/sax.py
+++ b/src/lxml/sax.py
@@ -10,6 +10,8 @@ the SAX events of an ElementTree against a SAX ContentHandler.
See http://codespeak.net/lxml/sax.html
"""
+from __future__ import absolute_import
+
from xml.sax.handler import ContentHandler
from lxml import etree
from lxml.etree import ElementTree, SubElement