summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmark/bench_etree.py2
-rw-r--r--benchmark/bench_objectify.py4
-rw-r--r--benchmark/bench_xpath.py3
-rw-r--r--benchmark/bench_xslt.py3
-rw-r--r--benchmark/benchbase.py2
-rw-r--r--buildlibxml.py4
-rw-r--r--src/lxml/ElementInclude.py1
-rw-r--r--src/lxml/html/clean.py2
-rw-r--r--src/lxml/html/formfill.py2
-rw-r--r--src/lxml/html/soupparser.py4
10 files changed, 10 insertions, 17 deletions
diff --git a/benchmark/bench_etree.py b/benchmark/bench_etree.py
index 1e4c0f77..0f66db8e 100644
--- a/benchmark/bench_etree.py
+++ b/benchmark/bench_etree.py
@@ -1,4 +1,4 @@
-import sys, copy
+import copy
from itertools import *
import benchbase
diff --git a/benchmark/bench_objectify.py b/benchmark/bench_objectify.py
index 933ced48..9b712674 100644
--- a/benchmark/bench_objectify.py
+++ b/benchmark/bench_objectify.py
@@ -1,9 +1,7 @@
-import sys, copy
from itertools import *
import benchbase
-from benchbase import (with_attributes, with_text, onlylib,
- serialized, children, nochange)
+from benchbase import (with_text, children, nochange)
############################################################
# Benchmarks
diff --git a/benchmark/bench_xpath.py b/benchmark/bench_xpath.py
index 22d4e6ac..59cdc78c 100644
--- a/benchmark/bench_xpath.py
+++ b/benchmark/bench_xpath.py
@@ -1,8 +1,7 @@
-import sys, copy
from itertools import *
import benchbase
-from benchbase import with_attributes, with_text, onlylib, serialized, children, nochange
+from benchbase import onlylib, children, nochange
############################################################
# Benchmarks
diff --git a/benchmark/bench_xslt.py b/benchmark/bench_xslt.py
index 2d8bb2e8..abfdb7c5 100644
--- a/benchmark/bench_xslt.py
+++ b/benchmark/bench_xslt.py
@@ -1,8 +1,7 @@
-import sys, copy
from itertools import *
import benchbase
-from benchbase import with_attributes, with_text, onlylib, serialized
+from benchbase import onlylib
############################################################
# Benchmarks
diff --git a/benchmark/benchbase.py b/benchmark/benchbase.py
index da0faefd..6b04cb16 100644
--- a/benchmark/benchbase.py
+++ b/benchmark/benchbase.py
@@ -2,8 +2,6 @@ import sys, re, string, time, copy, gc
from itertools import *
import time
-from io import BytesIO
-
try:
izip
except NameError:
diff --git a/buildlibxml.py b/buildlibxml.py
index bfc8b0cf..bd2aec18 100644
--- a/buildlibxml.py
+++ b/buildlibxml.py
@@ -4,10 +4,10 @@ from distutils import log, version
from contextlib import closing
try:
- from urlparse import urlsplit, urljoin, unquote
+ from urlparse import urljoin, unquote
from urllib import urlretrieve, urlopen, urlcleanup
except ImportError:
- from urllib.parse import urlsplit, urljoin, unquote
+ from urllib.parse import urljoin, unquote
from urllib.request import urlretrieve, urlopen, urlcleanup
multi_make_options = []
diff --git a/src/lxml/ElementInclude.py b/src/lxml/ElementInclude.py
index 613b96ca..dc1a3763 100644
--- a/src/lxml/ElementInclude.py
+++ b/src/lxml/ElementInclude.py
@@ -51,7 +51,6 @@ form of custom URL resolvers.
"""
from lxml import etree
-import copy
try:
from urlparse import urljoin
from urllib2 import urlopen
diff --git a/src/lxml/html/clean.py b/src/lxml/html/clean.py
index 6270b93a..adc3f450 100644
--- a/src/lxml/html/clean.py
+++ b/src/lxml/html/clean.py
@@ -13,7 +13,7 @@ except ImportError:
from urllib.parse import urlsplit
from lxml import etree
from lxml.html import defs
-from lxml.html import fromstring, tostring, XHTML_NAMESPACE
+from lxml.html import fromstring, XHTML_NAMESPACE
from lxml.html import xhtml_to_html, _transform_result
try:
diff --git a/src/lxml/html/formfill.py b/src/lxml/html/formfill.py
index 61f0f076..2499a8e5 100644
--- a/src/lxml/html/formfill.py
+++ b/src/lxml/html/formfill.py
@@ -1,5 +1,5 @@
from lxml.etree import XPath, ElementBase
-from lxml.html import fromstring, tostring, XHTML_NAMESPACE
+from lxml.html import fromstring, XHTML_NAMESPACE
from lxml.html import _forms_xpath, _options_xpath, _nons, _transform_result
from lxml.html import defs
import copy
diff --git a/src/lxml/html/soupparser.py b/src/lxml/html/soupparser.py
index ef34ef59..202d0373 100644
--- a/src/lxml/html/soupparser.py
+++ b/src/lxml/html/soupparser.py
@@ -9,12 +9,12 @@ from lxml import etree, html
try:
from bs4 import (
BeautifulSoup, Tag, Comment, ProcessingInstruction, NavigableString,
- Declaration, CData, Doctype)
+ Declaration, Doctype)
_DECLARATION_OR_DOCTYPE = (Declaration, Doctype)
except ImportError:
from BeautifulSoup import (
BeautifulSoup, Tag, Comment, ProcessingInstruction, NavigableString,
- Declaration, CData)
+ Declaration)
_DECLARATION_OR_DOCTYPE = Declaration