Remove six dependency
This commit is contained in:
parent
783632fb24
commit
24c297cfe7
5 changed files with 5 additions and 9 deletions
|
|
@ -44,20 +44,19 @@
|
||||||
# - if a <g> has only one element in it, collapse the <g> (ensure transform, etc are carried down)
|
# - if a <g> has only one element in it, collapse the <g> (ensure transform, etc are carried down)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import math
|
import math
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import urllib.parse
|
||||||
|
import urllib.request
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
from xml.dom import Node, NotFoundErr
|
from xml.dom import Node, NotFoundErr
|
||||||
from collections import namedtuple, defaultdict
|
from collections import namedtuple, defaultdict
|
||||||
from decimal import Context, Decimal, InvalidOperation, getcontext
|
from decimal import Context, Decimal, InvalidOperation, getcontext
|
||||||
|
|
||||||
import six
|
|
||||||
from six.moves import urllib
|
|
||||||
|
|
||||||
from scour.stats import ScourStats
|
from scour.stats import ScourStats
|
||||||
from scour.svg_regex import svg_parser
|
from scour.svg_regex import svg_parser
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,6 @@ from decimal import Decimal
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Sentinel.
|
# Sentinel.
|
||||||
class _EOF:
|
class _EOF:
|
||||||
|
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -64,7 +64,7 @@ setup(
|
||||||
author_email='codedread@gmail.com',
|
author_email='codedread@gmail.com',
|
||||||
url='https://github.com/scour-project/scour',
|
url='https://github.com/scour-project/scour',
|
||||||
platforms=('Any'),
|
platforms=('Any'),
|
||||||
install_requires=['six>=1.9.0'],
|
install_requires=[],
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
zip_safe=True,
|
zip_safe=True,
|
||||||
entry_points={
|
entry_points={
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,11 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
import io
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
from scour.scour import (make_well_formed, parse_args, scourString, scourXmlFile, start, run,
|
from scour.scour import (make_well_formed, parse_args, scourString, scourXmlFile, start, run,
|
||||||
XML_ENTS_ESCAPE_APOS, XML_ENTS_ESCAPE_QUOT)
|
XML_ENTS_ESCAPE_APOS, XML_ENTS_ESCAPE_QUOT)
|
||||||
from scour.svg_regex import svg_parser
|
from scour.svg_regex import svg_parser
|
||||||
|
|
@ -2577,7 +2576,7 @@ class CommandLineUsage(unittest.TestCase):
|
||||||
# TODO: can we create file objects that behave *exactly* like the original?
|
# TODO: can we create file objects that behave *exactly* like the original?
|
||||||
# this is a mess since we have to ensure compatibility across Python 2 and 3 and it seems impossible
|
# this is a mess since we have to ensure compatibility across Python 2 and 3 and it seems impossible
|
||||||
# to replicate all the details of 'stdin', 'stdout' and 'stderr'
|
# to replicate all the details of 'stdin', 'stdout' and 'stderr'
|
||||||
class InOutBuffer(six.StringIO):
|
class InOutBuffer(io.StringIO):
|
||||||
def write(self, string):
|
def write(self, string):
|
||||||
try:
|
try:
|
||||||
return super().write(string)
|
return super().write(string)
|
||||||
|
|
|
||||||
1
tox.ini
1
tox.ini
|
|
@ -15,7 +15,6 @@ envlist =
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
six
|
|
||||||
coverage
|
coverage
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue