summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-03-20 08:16:38 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-03-20 08:16:38 (GMT)
commit7fa767e517882f4d3503d168d3a4d4caad317752 (patch)
treecc4c73326ee706456b2c8de8530fed453e582b69 /Lib/email
parent69b1e261fc703106b44095796d78ba6aacbbdb63 (diff)
downloadcpython-7fa767e517882f4d3503d168d3a4d4caad317752.zip
cpython-7fa767e517882f4d3503d168d3a4d4caad317752.tar.gz
cpython-7fa767e517882f4d3503d168d3a4d4caad317752.tar.bz2
Issue #20976: pyflakes: Remove unused imports
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/_header_value_parser.py2
-rw-r--r--Lib/email/generator.py4
-rw-r--r--Lib/email/header.py2
-rw-r--r--Lib/email/mime/text.py1
-rw-r--r--Lib/email/parser.py2
-rw-r--r--Lib/email/quoprimime.py1
-rw-r--r--Lib/email/utils.py3
7 files changed, 1 insertions, 14 deletions
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py
index 04ab84c..3dc5502 100644
--- a/Lib/email/_header_value_parser.py
+++ b/Lib/email/_header_value_parser.py
@@ -70,7 +70,7 @@ XXX: provide complete list of token types.
import re
import urllib # For urllib.parse.unquote
from string import hexdigits
-from collections import namedtuple, OrderedDict
+from collections import OrderedDict
from email import _encoded_words as _ew
from email import errors
from email import utils
diff --git a/Lib/email/generator.py b/Lib/email/generator.py
index e4a86d4..1535210 100644
--- a/Lib/email/generator.py
+++ b/Lib/email/generator.py
@@ -10,14 +10,10 @@ import re
import sys
import time
import random
-import warnings
from copy import deepcopy
from io import StringIO, BytesIO
-from email._policybase import compat32
-from email.header import Header
from email.utils import _has_surrogates
-import email.charset as _charset
UNDERSCORE = '_'
NL = '\n' # XXX: no longer used by the code below.
diff --git a/Lib/email/header.py b/Lib/email/header.py
index 5bd0638..9c89589 100644
--- a/Lib/email/header.py
+++ b/Lib/email/header.py
@@ -100,7 +100,6 @@ def decode_header(header):
words.append((encoded, encoding, charset))
# Now loop over words and remove words that consist of whitespace
# between two encoded strings.
- import sys
droplist = []
for n, w in enumerate(words):
if n>1 and w[1] and words[n-2][1] and words[n-1][0].isspace():
@@ -362,7 +361,6 @@ class Header:
for string, charset in self._chunks:
if hasspace is not None:
hasspace = string and self._nonctext(string[0])
- import sys
if lastcs not in (None, 'us-ascii'):
if not hasspace or charset not in (None, 'us-ascii'):
formatter.add_transition()
diff --git a/Lib/email/mime/text.py b/Lib/email/mime/text.py
index 3b5b09f..ec18b85 100644
--- a/Lib/email/mime/text.py
+++ b/Lib/email/mime/text.py
@@ -6,7 +6,6 @@
__all__ = ['MIMEText']
-from email.encoders import encode_7or8bit
from email.mime.nonmultipart import MIMENonMultipart
diff --git a/Lib/email/parser.py b/Lib/email/parser.py
index ed512b1..9f5f95d 100644
--- a/Lib/email/parser.py
+++ b/Lib/email/parser.py
@@ -7,11 +7,9 @@
__all__ = ['Parser', 'HeaderParser', 'BytesParser', 'BytesHeaderParser',
'FeedParser', 'BytesFeedParser']
-import warnings
from io import StringIO, TextIOWrapper
from email.feedparser import FeedParser, BytesFeedParser
-from email.message import Message
from email._policybase import compat32
diff --git a/Lib/email/quoprimime.py b/Lib/email/quoprimime.py
index 30bf916..c1fe2b4 100644
--- a/Lib/email/quoprimime.py
+++ b/Lib/email/quoprimime.py
@@ -40,7 +40,6 @@ __all__ = [
]
import re
-import io
from string import ascii_letters, digits, hexdigits
diff --git a/Lib/email/utils.py b/Lib/email/utils.py
index 95855d8..17f01bc 100644
--- a/Lib/email/utils.py
+++ b/Lib/email/utils.py
@@ -25,13 +25,10 @@ __all__ = [
import os
import re
import time
-import base64
import random
import socket
import datetime
import urllib.parse
-import warnings
-from io import StringIO
from email._parseaddr import quote
from email._parseaddr import AddressList as _AddressList