Skip to content

Commit 3bd6001

Browse files
committed
removing six, since we're py3k-only now.
1 parent b60cc0e commit 3bd6001

6 files changed

Lines changed: 5 additions & 14 deletions

File tree

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def get_version():
5656
],
5757
keywords='textile,text,html markup',
5858
install_requires=[
59-
'six',
6059
'html5lib>=0.999999999',
6160
],
6261
extras_require={

tests/test_cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import six
21
import subprocess
32
import sys
43

textile/core.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
"""
2020

2121
import uuid
22-
import six
23-
from six.moves.urllib_parse import (urlparse, urlsplit, urlunsplit, quote,
24-
unquote)
22+
from urllib.parse import urlparse, urlsplit, urlunsplit, quote, unquote
2523

2624
from textile.tools import sanitizer, imagesize
2725
from textile.regex_strings import (align_re_s, cls_re_s, pnct_re_s,
@@ -1120,14 +1118,14 @@ def fImage(self, match):
11201118
atts.update(align=alignments[align])
11211119
atts.update(alt=title)
11221120
if size:
1123-
atts.update(height=six.text_type(size[1]))
1121+
atts.update(height="{0}".format(size[1]))
11241122
atts.update(src=url)
11251123
if attributes:
11261124
atts.update(parse_attributes(attributes, restricted=self.restricted))
11271125
if title:
11281126
atts.update(title=title)
11291127
if size:
1130-
atts.update(width=six.text_type(size[0]))
1128+
atts.update(width="{0}".format(size[0]))
11311129
img = generate_tag('img', ' /', atts)
11321130
if href:
11331131
a_atts = OrderedDict(href=href)

textile/objects/table.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
import six
54
from xml.etree import ElementTree
65

76
from textile.regex_strings import (align_re_s, cls_re_s, regex_snippets,

textile/regex_strings.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
import six
5-
64
try:
75
# Use regex module for matching uppercase characters if installed,
86
# otherwise fall back to finding all the uppercase chars in a loop.
@@ -21,8 +19,8 @@
2119
except ImportError:
2220
from sys import maxunicode
2321
upper_re_s = "".join(
24-
[six.unichr(c) for c in six.moves.range(maxunicode) if six.unichr(
25-
c).isupper()])
22+
[unichr(c) for c in range(maxunicode) if unichr(c).isupper()]
23+
)
2624
regex_snippets = {
2725
'acr': r'{0}0-9'.format(upper_re_s),
2826
'abr': r'{0}'.format(upper_re_s),

textile/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from __future__ import unicode_literals
2-
import six
32

43
try:
54
import regex as re
@@ -44,7 +43,6 @@ def generate_tag(tag, content, attributes=None):
4443
"""Generate a complete html tag using the ElementTree module. tag and
4544
content are strings, the attributes argument is a dictionary. As
4645
a convenience, if the content is ' /', a self-closing tag is generated."""
47-
content = six.text_type(content)
4846
enc = 'unicode'
4947
if not tag:
5048
return content

0 commit comments

Comments
 (0)