File python-leather-no-python2.patch of Package python-leather
Index: leather-0.3.4/.travis.yml
===================================================================
--- leather-0.3.4.orig/.travis.yml
+++ /dev/null
@@ -1,61 +0,0 @@
-language: python
-os: linux
-python:
- - "3.8"
- - "3.7"
- - "3.6"
- - "3.5"
- - "2.7"
- - "pypy3"
- - "pypy3.5-6.0"
- - "pypy3.5-7.0"
- - "pypy3.6-7.0.0"
- - "pypy"
- - "pypy2.7-6.0"
- - "pypy2.7-7.0.0"
-jobs:
- include:
- - os: osx
- python: "3.7"
- osx_image: xcode11.2 # Python 3.7.4 running on macOS 10.14.4
- language: shell # 'language: python' is an error on Travis CI macOS
- before_install:
- - python3 -m pip install --upgrade pip
- - python3 -m pip install --upgrade virtualenv
- - virtualenv -p python3 --system-site-packages "$HOME/venv"
- - source "$HOME/venv/bin/activate"
- - CFLAGS="-O0" STATIC_DEPS=true python3 -m pip install lxml
- - python3 --version
- - python --version
- env:
- - HOMEBREW_NO_INSTALL_CLEANUP=1
- - HOMEBREW_NO_ANALYTICS=1
- before_cache:
- - rm -f "$HOME/Library/Caches/pip/log/debug.log"
- cache:
- directories:
- - "$HOME/Library/Caches/pip"
- - os: windows # Windows 10.0.17134 N/A Build 17134
- python: "3.8"
- language: shell # 'language: python' is an error on Travis CI Windows
- before_install:
- - choco install python --version 3.8.0
- - choco install sqlite
- - python -m pip install --upgrade pip
- - python --version
- env: PATH=/c/Python38:/c/Python38/Scripts:$PATH
- # allow failure on OSes other than Linux
- allow_failures:
- - os: osx
- - os: windows
- fast_finish: true
-# command to install dependencies
-install:
- - >
- if [[ "$TRAVIS_PYTHON_VERSION" == "2"* ]] || [[ "$TRAVIS_PYTHON_VERSION" == "pypy"* ]] && [[ "$TRAVIS_PYTHON_VERSION" != "pypy3"* ]]; then
- pip install -r requirements-py2.txt;
- else
- pip3 install -r requirements-py3.txt;
- fi
-# command to run tests
-script: nosetests tests
Index: leather-0.3.4/docs/conf.py
===================================================================
--- leather-0.3.4.orig/docs/conf.py
+++ leather-0.3.4/docs/conf.py
@@ -25,8 +25,8 @@ templates_path = ['_templates']
master_doc = 'index'
# Metadata
-project = u'leather'
-copyright = u'2016, Christopher Groskopf'
+project = 'leather'
+copyright = '2016, Christopher Groskopf'
version = '0.3.4'
release = '0.3.4'
Index: leather-0.3.4/docs/install.rst
===================================================================
--- leather-0.3.4.orig/docs/install.rst
+++ leather-0.3.4/docs/install.rst
@@ -18,12 +18,8 @@ If you are a developer that also wants t
cd leather
mkvirtualenv leather
- # If running Python 3 (strongly recommended for development)
pip install -r requirements-py3.txt
- # If running Python 2
- pip install -r requirements-py2.txt
-
python setup.py develop
tox
@@ -31,7 +27,7 @@ If you are a developer that also wants t
To run the leather tests with coverage::
- nosetests --with-coverage tests
+ pytest --cov leather
Supported platforms
-------------------
Index: leather-0.3.4/docs/release_process.rst
===================================================================
--- leather-0.3.4.orig/docs/release_process.rst
+++ leather-0.3.4/docs/release_process.rst
@@ -5,7 +5,7 @@ Release process
This is the release process for leather:
1. Verify all unit tests pass with fresh environments: ``tox -r``.
-2. Check test coverage: ``nosetests --with-coverage tests``.
+2. Check test coverage: ``pytest --cov leather``.
3. Ensure any new modules have been added to setup.py's ``packages`` list.
#. Ensure any new public interfaces have been added to the documentation.
#. Make sure the example scripts still work: ``./examples.sh``.
Index: leather-0.3.4/examples/colorized_dots.py
===================================================================
--- leather-0.3.4.orig/examples/colorized_dots.py
+++ leather-0.3.4/examples/colorized_dots.py
@@ -2,7 +2,6 @@ import random
import leather
-
dot_data = [(random.randint(0, 250), random.randint(0, 250)) for i in range(100)]
def colorizer(d):
Index: leather-0.3.4/leather/__init__.py
===================================================================
--- leather-0.3.4.orig/leather/__init__.py
+++ leather-0.3.4/leather/__init__.py
@@ -1,12 +1,12 @@
#!/usr/bin/env python
+from leather import theme
from leather.axis import Axis
-from leather.data_types import Number, Text
from leather.chart import Chart
+from leather.data_types import Number, Text
from leather.grid import Grid
from leather.lattice import Lattice
-from leather.scales import Scale, Linear, Ordinal, Temporal
-from leather.series import Series, CategorySeries, key_function
-from leather.shapes import Shape, Bars, Columns, Dots, Line, style_function
+from leather.scales import Linear, Ordinal, Scale, Temporal
+from leather.series import CategorySeries, Series, key_function
+from leather.shapes import Bars, Columns, Dots, Line, Shape, style_function
from leather.testcase import LeatherTestCase
-from leather import theme
Index: leather-0.3.4/leather/axis.py
===================================================================
--- leather-0.3.4.orig/leather/axis.py
+++ leather-0.3.4/leather/axis.py
@@ -2,13 +2,10 @@
import xml.etree.ElementTree as ET
-import six
+from leather import svg, theme
-from leather import svg
-from leather import theme
-
-class Axis(object):
+class Axis:
"""
A horizontal or vertical chart axis.
@@ -22,7 +19,7 @@ class Axis(object):
def __init__(self, ticks=None, tick_formatter=None, name=None):
self._ticks = ticks
self._tick_formatter = tick_formatter
- self._name = six.text_type(name) if name is not None else None
+ self._name = str(name) if name is not None else None
def _estimate_left_tick_width(self, scale):
"""
@@ -75,8 +72,8 @@ class Axis(object):
transform = ''
title = ET.Element('text',
- x=six.text_type(title_x),
- y=six.text_type(title_y),
+ x=str(title_x),
+ y=str(title_y),
dy=dy,
fill=theme.axis_title_color,
transform=transform
@@ -134,13 +131,13 @@ class Axis(object):
x2 = projected_value
tick = ET.Element('line',
- x1=six.text_type(x1),
- y1=six.text_type(y1),
- x2=six.text_type(x2),
- y2=six.text_type(y2),
+ x1=str(x1),
+ y1=str(y1),
+ x2=str(x2),
+ y2=str(y2),
stroke=tick_color
)
- tick.set('stroke-width', six.text_type(theme.tick_width))
+ tick.set('stroke-width', str(theme.tick_width))
tick_group.append(tick)
@@ -157,8 +154,8 @@ class Axis(object):
text_anchor = 'middle'
label = ET.Element('text',
- x=six.text_type(x),
- y=six.text_type(y),
+ x=str(x),
+ y=str(y),
dy=dy,
fill=theme.label_color
)
@@ -166,7 +163,7 @@ class Axis(object):
label.set('font-family', theme.tick_font_family)
value = tick_formatter(value, i, tick_count)
- label.text = six.text_type(value)
+ label.text = str(value)
tick_group.append(label)
@@ -190,4 +187,4 @@ def tick_format_function(value, index, t
:returns:
A stringified tick value for display.
"""
- return six.text_type(value)
+ return str(value)
Index: leather-0.3.4/leather/chart.py
===================================================================
--- leather-0.3.4.orig/leather/chart.py
+++ leather-0.3.4/leather/chart.py
@@ -1,22 +1,20 @@
#!/usr/bin/env python
-from copy import copy
import os
import xml.etree.ElementTree as ET
+from copy import copy
-import six
-
+import leather.svg as svg
+from leather import theme
from leather.axis import Axis
from leather.data_types import Date, DateTime
-from leather.scales import Scale, Linear, Temporal
-from leather.series import Series, CategorySeries
+from leather.scales import Linear, Scale, Temporal
+from leather.series import CategorySeries, Series
from leather.shapes import Bars, Columns, Dots, Line
-import leather.svg as svg
-from leather import theme
-from leather.utils import X, Y, DIMENSION_NAMES, Box, IPythonSVG, warn
+from leather.utils import DIMENSION_NAMES, Box, IPythonSVG, X, Y, warn
-class Chart(object):
+class Chart:
"""
Container for all chart types.
@@ -233,10 +231,10 @@ class Chart(object):
root_group = ET.Element('g')
root_group.append(ET.Element('rect',
- x=six.text_type(0),
- y=six.text_type(0),
- width=six.text_type(width),
- height=six.text_type(height),
+ x=str(0),
+ y=str(0),
+ width=str(width),
+ height=str(height),
fill=theme.background_color
))
@@ -256,13 +254,13 @@ class Chart(object):
if self._title:
label = ET.Element('text',
- x=six.text_type(0),
- y=six.text_type(0),
+ x=str(0),
+ y=str(0),
fill=theme.title_color
)
label.set('font-family', theme.title_font_family)
- label.set('font-size', six.text_type(theme.title_font_size))
- label.text = six.text_type(self._title)
+ label.set('font-size', str(theme.title_font_size))
+ label.text = str(self._title)
header_group.append(label)
header_margin += theme.title_font_char_height + theme.title_gap
@@ -360,8 +358,8 @@ class Chart(object):
height = height or theme.default_chart_height
root = ET.Element('svg',
- width=six.text_type(width),
- height=six.text_type(height),
+ width=str(width),
+ height=str(height),
version='1.1',
xmlns='http://www.w3.org/2000/svg'
)
Index: leather-0.3.4/leather/data_types.py
===================================================================
--- leather-0.3.4.orig/leather/data_types.py
+++ leather-0.3.4/leather/data_types.py
@@ -3,10 +3,8 @@
from datetime import date, datetime
from decimal import Decimal
-import six
-
-class DataType(object):
+class DataType:
"""
Base class for :class:`.Series` data types.
"""
@@ -44,4 +42,4 @@ class Text(DataType):
"""
Data representing text/strings.
"""
- types = six.string_types
+ types = (str,)
Index: leather-0.3.4/leather/grid.py
===================================================================
--- leather-0.3.4.orig/leather/grid.py
+++ leather-0.3.4/leather/grid.py
@@ -4,14 +4,12 @@ import math
import os
import xml.etree.ElementTree as ET
-import six
-
import leather.svg as svg
from leather import theme
from leather.utils import IPythonSVG
-class Grid(object):
+class Grid:
"""
A container for a set of :class:`.Chart` instances that are rendered in a
grid layout.
@@ -51,8 +49,8 @@ class Grid(object):
height = rows * theme.default_chart_height
root = ET.Element('svg',
- width=six.text_type(width),
- height=six.text_type(height),
+ width=str(width),
+ height=str(height),
version='1.1',
xmlns='http://www.w3.org/2000/svg'
)
@@ -61,10 +59,10 @@ class Grid(object):
root_group = ET.Element('g')
root_group.append(ET.Element('rect',
- x=six.text_type(0),
- y=six.text_type(0),
- width=six.text_type(width),
- height=six.text_type(height),
+ x=str(0),
+ y=str(0),
+ width=str(width),
+ height=str(height),
fill=theme.background_color
))
Index: leather-0.3.4/leather/lattice.py
===================================================================
--- leather-0.3.4.orig/leather/lattice.py
+++ leather-0.3.4/leather/lattice.py
@@ -1,17 +1,17 @@
#!/usr/bin/env python
+from leather import theme
from leather.axis import Axis
from leather.chart import Chart
from leather.data_types import Date, DateTime
from leather.grid import Grid
-from leather.scales import Scale, Linear
+from leather.scales import Linear, Scale
from leather.series import Series
from leather.shapes import Line
-from leather import theme
from leather.utils import X, Y
-class Lattice(object):
+class Lattice:
"""
A grid of charts with synchronized shapes, scales, and axes.
Index: leather-0.3.4/leather/scales/base.py
===================================================================
--- leather-0.3.4.orig/leather/scales/base.py
+++ leather-0.3.4/leather/scales/base.py
@@ -2,13 +2,11 @@
from datetime import date, datetime
-import six
-
from leather.data_types import Date, DateTime, Number, Text
from leather.shapes import Bars, Columns
-class Scale(object):
+class Scale:
"""
Base class for various kinds of scale objects.
"""
@@ -137,4 +135,4 @@ class Scale(object):
This method is used as a default which will be ignored if the user
provides a custom tick formatter to the axis.
"""
- return six.text_type(value)
+ return str(value)
Index: leather-0.3.4/leather/scales/temporal.py
===================================================================
--- leather-0.3.4.orig/leather/scales/temporal.py
+++ leather-0.3.4/leather/scales/temporal.py
@@ -2,8 +2,6 @@
from datetime import datetime
-import six
-
from leather.scales.base import Scale
from leather.ticks.score_time import ScoreTimeTicker
@@ -37,19 +35,7 @@ class Temporal(Scale):
"""
Project a value in this scale's domain to a target range.
"""
- numerator = value - self._ticker.min
- denominator = self._ticker.max - self._ticker.min
-
- # Python 2 does not support timedelta division
- if six.PY2:
- if isinstance(self._ticker.min, datetime):
- numerator = numerator.total_seconds()
- denominator = denominator.total_seconds()
- else:
- numerator = float(numerator.days)
- denominator = float(denominator.days)
-
- pos = numerator / denominator
+ pos = (value - self._ticker.min) / (self._ticker.max - self._ticker.min)
return ((range_max - range_min) * pos) + range_min
Index: leather-0.3.4/leather/series/base.py
===================================================================
--- leather-0.3.4.orig/leather/series/base.py
+++ leather-0.3.4/leather/series/base.py
@@ -1,18 +1,13 @@
#!/usr/bin/env python
-try:
- from collections.abc import Iterable, Sequence, Mapping
-except ImportError:
- from collections import Iterable, Sequence, Mapping
+from collections.abc import Iterable, Mapping, Sequence
from functools import partial
-import six
-
from leather.data_types import DataType
-from leather.utils import DIMENSION_NAMES, X, Y, Datum
+from leather.utils import DIMENSION_NAMES, Datum, X, Y
-class Series(object):
+class Series:
"""
A series of data and its associated metadata.
@@ -64,8 +59,7 @@ class Series(object):
"""
if callable(key):
return key
- else:
- return lambda row, index: row[key]
+ return lambda row, index: row[key]
def _infer_type(self, dimension):
"""
Index: leather-0.3.4/leather/series/category.py
===================================================================
--- leather-0.3.4.orig/leather/series/category.py
+++ leather-0.3.4/leather/series/category.py
@@ -1,16 +1,11 @@
#!/usr/bin/env python
-try:
- from collections.abc import Iterable, Sequence, Mapping
-except ImportError:
- from collections import Iterable, Sequence, Mapping
+from collections.abc import Iterable, Mapping, Sequence
from functools import partial
-import six
-
from leather.data_types import DataType
from leather.series.base import Series
-from leather.utils import X, Y, Z, Datum
+from leather.utils import Datum, X, Y, Z
class CategorySeries(Series):
Index: leather-0.3.4/leather/shapes/__init__.py
===================================================================
--- leather-0.3.4.orig/leather/shapes/__init__.py
+++ leather-0.3.4/leather/shapes/__init__.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
-from leather.shapes.base import Shape, style_function
from leather.shapes.bars import Bars
+from leather.shapes.base import Shape, style_function
from leather.shapes.columns import Columns
from leather.shapes.dots import Dots
from leather.shapes.line import Line
Index: leather-0.3.4/leather/shapes/bars.py
===================================================================
--- leather-0.3.4.orig/leather/shapes/bars.py
+++ leather-0.3.4/leather/shapes/bars.py
@@ -2,12 +2,10 @@
import xml.etree.ElementTree as ET
-import six
-
+from leather import theme
from leather.data_types import Number, Text
from leather.series import CategorySeries
from leather.shapes.base import Shape
-from leather import theme
from leather.utils import X, Y
@@ -69,10 +67,10 @@ class Bars(Shape):
color = fill_color
group.append(ET.Element('rect',
- x=six.text_type(bar_x),
- y=six.text_type(y2),
- width=six.text_type(bar_width),
- height=six.text_type(y1 - y2),
+ x=str(bar_x),
+ y=str(y2),
+ width=str(bar_width),
+ height=str(y1 - y2),
fill=color
))
Index: leather-0.3.4/leather/shapes/base.py
===================================================================
--- leather-0.3.4.orig/leather/shapes/base.py
+++ leather-0.3.4/leather/shapes/base.py
@@ -1,12 +1,11 @@
#!/usr/bin/env python
-import six
import xml.etree.ElementTree as ET
from leather import theme
-class Shape(object):
+class Shape:
"""
Base class for shapes that can be used to render data :class:`.Series`.
"""
@@ -52,7 +51,7 @@ class Shape(object):
bubble_width = theme.legend_bubble_size + theme.legend_bubble_offset
- text = six.text_type(series.name) if series.name is not None else 'Unnamed series'
+ text = str(series.name) if series.name is not None else 'Unnamed series'
text_width = (len(text) + 4) * theme.legend_font_char_width
item_width = text_width + bubble_width
@@ -62,10 +61,10 @@ class Shape(object):
# Bubble
bubble = ET.Element('rect',
- x=six.text_type(0),
- y=six.text_type(-theme.legend_font_char_height + theme.legend_bubble_offset),
- width=six.text_type(theme.legend_bubble_size),
- height=six.text_type(theme.legend_bubble_size)
+ x=str(0),
+ y=str(-theme.legend_font_char_height + theme.legend_bubble_offset),
+ width=str(theme.legend_bubble_size),
+ height=str(theme.legend_bubble_size)
)
if fill_color:
@@ -77,12 +76,12 @@ class Shape(object):
# Label
label = ET.Element('text',
- x=six.text_type(bubble_width),
- y=six.text_type(0),
+ x=str(bubble_width),
+ y=str(0),
fill=theme.legend_color
)
label.set('font-family', theme.legend_font_family)
- label.set('font-size', six.text_type(theme.legend_font_size))
+ label.set('font-size', str(theme.legend_font_size))
label.text = text
item_group.append(label)
Index: leather-0.3.4/leather/shapes/columns.py
===================================================================
--- leather-0.3.4.orig/leather/shapes/columns.py
+++ leather-0.3.4/leather/shapes/columns.py
@@ -2,8 +2,6 @@
import xml.etree.ElementTree as ET
-import six
-
from leather.data_types import Number, Text
from leather.series import CategorySeries
from leather.shapes.base import Shape
@@ -68,10 +66,10 @@ class Columns(Shape):
color = fill_color
group.append(ET.Element('rect',
- x=six.text_type(x1),
- y=six.text_type(column_y),
- width=six.text_type(x2 - x1),
- height=six.text_type(column_height),
+ x=str(x1),
+ y=str(column_y),
+ width=str(x2 - x1),
+ height=str(column_height),
fill=color
))
Index: leather-0.3.4/leather/shapes/dots.py
===================================================================
--- leather-0.3.4.orig/leather/shapes/dots.py
+++ leather-0.3.4/leather/shapes/dots.py
@@ -1,14 +1,12 @@
#!/usr/bin/env python
-from collections import defaultdict
import xml.etree.ElementTree as ET
+from collections import defaultdict
-import six
-
+from leather import theme
from leather.data_types import Text
from leather.series import CategorySeries
from leather.shapes.base import Shape
-from leather import theme
from leather.utils import DummySeries, X, Y
@@ -67,9 +65,9 @@ class Dots(Shape):
radius = self._radius
group.append(ET.Element('circle',
- cx=six.text_type(proj_x),
- cy=six.text_type(proj_y),
- r=six.text_type(radius),
+ cx=str(proj_x),
+ cy=str(proj_y),
+ r=str(radius),
fill=fill_color
))
Index: leather-0.3.4/leather/shapes/line.py
===================================================================
--- leather-0.3.4.orig/leather/shapes/line.py
+++ leather-0.3.4/leather/shapes/line.py
@@ -2,12 +2,10 @@
import xml.etree.ElementTree as ET
-import six
-
+from leather import theme
from leather.data_types import Text
from leather.series import CategorySeries
from leather.shapes.base import Shape
-from leather import theme
from leather.utils import X, Y
@@ -43,7 +41,7 @@ class Line(Shape):
stroke=stroke_color,
fill='none'
)
- path.set('stroke-width', six.text_type(self._width))
+ path.set('stroke-width', str(self._width))
return path
@@ -83,8 +81,8 @@ class Line(Shape):
path_d.extend([
command,
- six.text_type(proj_x),
- six.text_type(proj_y)
+ str(proj_x),
+ str(proj_y)
])
if path_d:
Index: leather-0.3.4/leather/svg.py
===================================================================
--- leather-0.3.4.orig/leather/svg.py
+++ leather-0.3.4/leather/svg.py
@@ -6,8 +6,6 @@ Helpers for working with SVG.
import xml.etree.ElementTree as ET
-import six
-
HEADER = '<?xml version="1.0" standalone="no"?>\n' + \
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"\n' + \
'"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'
@@ -17,10 +15,7 @@ def stringify(root):
"""
Convert an SVG XML tree to a unicode string.
"""
- if six.PY3:
- return ET.tostring(root, encoding='unicode')
- else:
- return ET.tostring(root, encoding='utf-8')
+ return ET.tostring(root, encoding='unicode')
def save(f, root):
"""
Index: leather-0.3.4/leather/testcase.py
===================================================================
--- leather-0.3.4.orig/leather/testcase.py
+++ leather-0.3.4/leather/testcase.py
@@ -1,11 +1,6 @@
#!/usr/bin/env python
-try:
- import unittest2 as unittest
-except ImportError:
- import unittest
-
-import six
+import unittest
class LeatherTestCase(unittest.TestCase):
@@ -23,10 +18,7 @@ class LeatherTestCase(unittest.TestCase)
def parse_svg(self, text):
from lxml import etree
- text = text.replace(' xmlns="http://www.w3.org/2000/svg"', '')
-
- if six.PY3:
- text = text.encode('utf-8')
+ text = text.replace(' xmlns="http://www.w3.org/2000/svg"', '').encode('utf-8')
return etree.fromstring(text)
Index: leather-0.3.4/leather/ticks/base.py
===================================================================
--- leather-0.3.4.orig/leather/ticks/base.py
+++ leather-0.3.4/leather/ticks/base.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
-class Ticker(object):
+class Ticker:
"""
Base class for ticker implementations.
"""
Index: leather-0.3.4/leather/ticks/score.py
===================================================================
--- leather-0.3.4.orig/leather/ticks/score.py
+++ leather-0.3.4/leather/ticks/score.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
-from decimal import Decimal, ROUND_CEILING, ROUND_FLOOR
import math
import sys
+from decimal import ROUND_CEILING, ROUND_FLOOR, Decimal
from leather.ticks.base import Ticker
from leather.utils import isclose
Index: leather-0.3.4/leather/ticks/score_time.py
===================================================================
--- leather-0.3.4.orig/leather/ticks/score_time.py
+++ leather-0.3.4/leather/ticks/score_time.py
@@ -1,14 +1,13 @@
#!/usr/bin/env python
+import math
+import sys
from datetime import date, datetime, timedelta
from decimal import Decimal
from functools import partial
-import math
-import sys
-from leather.ticks.score import ScoreTicker
from leather import utils
-
+from leather.ticks.score import ScoreTicker
#: The default number of ticks to produce
DEFAULT_TICKS = 5
Index: leather-0.3.4/leather/utils.py
===================================================================
--- leather-0.3.4.orig/leather/utils.py
+++ leather-0.3.4/leather/utils.py
@@ -1,13 +1,11 @@
#!/usr/bin/env python
-from collections import namedtuple
-from datetime import date, datetime, timedelta
-from decimal import Decimal
import math
import sys
import warnings
-
-import six
+from collections import namedtuple
+from datetime import date, datetime, timedelta
+from decimal import Decimal
try:
__IPYTHON__
Index: leather-0.3.4/requirements-py2.txt
===================================================================
--- leather-0.3.4.orig/requirements-py2.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-six>=1.10.0
-nose>=1.3.7
-wheel>=0.24.0
-lxml>=3.6.0
-cssselect>=0.9.1
-tox>=1.3
-Sphinx>=1.2.2
-coverage>=3.7.1
-sphinx_rtd_theme>=0.1.9
-unittest2>=0.5.1
Index: leather-0.3.4/requirements-py3.txt
===================================================================
--- leather-0.3.4.orig/requirements-py3.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-six>=1.10.0
-nose>=1.3.7
-wheel>=0.24.0
-lxml>=3.6.0
-cssselect>=0.9.1
-tox>=1.3
-Sphinx>=1.2.2
-coverage>=3.7.1
-sphinx_rtd_theme>=0.1.9
Index: leather-0.3.4/setup.cfg
===================================================================
--- leather-0.3.4.orig/setup.cfg
+++ leather-0.3.4/setup.cfg
@@ -1,3 +1,16 @@
+[flake8]
+max-line-length = 119
+per-file-ignores =
+ # imported but unused
+ leather/__init__.py: F401
+ leather/scales/__init__.py: F401
+ leather/series/__init__.py: F401
+ leather/shapes/__init__.py: F401
+ leather/ticks/__init__.py: F401
+
+[isort]
+line_length = 119
+
[wheel]
universal = 1
Index: leather-0.3.4/setup.py
===================================================================
--- leather-0.3.4.orig/setup.py
+++ leather-0.3.4/setup.py
@@ -1,16 +1,14 @@
-#!/usr/bin/env python
+from setuptools import find_packages, setup
-from setuptools import setup
-
-install_requires = [
- 'six>=1.6.1'
-]
+with open('README.rst') as f:
+ long_description = f.read()
setup(
name='leather',
version='0.3.4',
description='Python charting for 80% of humans.',
- long_description=open('README.rst').read(),
+ long_description=long_description,
+ long_description_content_type='text/x-rst',
author='Christopher Groskopf',
author_email='chrisgroskopf@gmail.com',
url='http://leather.readthedocs.io/',
@@ -38,12 +36,17 @@ setup(
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Software Development :: Libraries :: Python Modules',
],
- packages=[
- 'leather',
- 'leather.scales',
- 'leather.series',
- 'leather.shapes',
- 'leather.ticks'
- ],
- install_requires=install_requires
+ packages=find_packages(exclude=['tests', 'tests.*']),
+ extras_require={
+ 'test': [
+ 'pytest',
+ 'pytest-cov',
+ 'lxml>=3.6.0',
+ 'cssselect>=0.9.1',
+ ],
+ 'docs': [
+ 'Sphinx>=1.2.2',
+ 'sphinx_rtd_theme>=0.1.6',
+ ],
+ }
)
Index: leather-0.3.4/tests/test_chart.py
===================================================================
--- leather-0.3.4.orig/tests/test_chart.py
+++ leather-0.3.4/tests/test_chart.py
@@ -6,7 +6,6 @@ import warnings
import leather
-
TEST_SVG = '.test.svg'
@@ -56,7 +55,7 @@ class TestChart(leather.LeatherTestCase)
def test_unicode(self):
chart = leather.Chart()
- chart.add_bars([(1, u'👍')])
+ chart.add_bars([(1, '👍')])
svg = self.render_chart(chart)
Index: leather-0.3.4/tests/test_grid.py
===================================================================
--- leather-0.3.4.orig/tests/test_grid.py
+++ leather-0.3.4/tests/test_grid.py
@@ -4,7 +4,6 @@ import os
import leather
-
TEST_SVG = '.test.svg'
Index: leather-0.3.4/tests/test_series.py
===================================================================
--- leather-0.3.4.orig/tests/test_series.py
+++ leather-0.3.4/tests/test_series.py
@@ -53,7 +53,7 @@ class TestSeries(leather.LeatherTestCase
self.assertSequenceEqual(series.values(Y), ['foo', 'bar', 'baz'])
def test_custom(self):
- class Obj(object):
+ class Obj:
def __init__(self, a, b, c):
self.a = a
self.b = b
Index: leather-0.3.4/tests/test_ticks.py
===================================================================
--- leather-0.3.4.orig/tests/test_ticks.py
+++ leather-0.3.4/tests/test_ticks.py
@@ -5,8 +5,8 @@ from datetime import date, datetime
from decimal import Decimal
import leather
-from leather.ticks.score_time import ScoreTicker, ScoreTimeTicker
from leather import utils
+from leather.ticks.score_time import ScoreTicker, ScoreTimeTicker
class TestScoreTicker(leather.LeatherTestCase):
Index: leather-0.3.4/tox.ini
===================================================================
--- leather-0.3.4.orig/tox.ini
+++ /dev/null
@@ -1,45 +0,0 @@
-[tox]
-envlist = py27,py35,py36,py37,py38,pypy2,pypy3
-
-[testenv]
-deps=
- nose>=1.1.2
- six>=1.6.1
- lxml>=3.6.0
- cssselect>=0.9.1
-commands=nosetests tests
-
-[testenv:py27]
-deps=
- {[testenv]deps}
-
-[testenv:py35]
-deps=
- {[testenv]deps}
-
-[testenv:py36]
-deps=
- {[testenv:py33]deps}
-
-[testenv:py37]
-deps=
- {[testenv:py33]deps}
-
-[testenv:py38]
-deps=
- {[testenv:py33]deps}
-
-[testenv:pypy2]
-deps=
- {[testenv:py27]deps}
-
-[testenv:pypy3]
-deps=
- {[testenv:py35]deps}
-
-[flake8]
-ignore=E128,E402,E501,F403
-# E128 continuation line under-indented for visual indent
-# E402 module level import not at top of file
-# E501 line too long (X > 79 characters)
-# F403 'from xyz import *' used; unable to detect undefined names