Skip to content

Commit ecdbfae

Browse files
authored
Merge pull request #72 from hugovk/update-versions
Update supported versions
2 parents 75b0d0f + 2c647da commit ecdbfae

File tree

6 files changed

+24
-36
lines changed

6 files changed

+24
-36
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ on:
1212
jobs:
1313
test:
1414
name: "Python ${{ matrix.python-version }} ${{ matrix.name-suffix }}"
15-
runs-on: ubuntu-18.04
15+
runs-on: ubuntu-20.04
1616

1717
strategy:
1818
matrix:
19-
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"]
19+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10-dev"]
2020

2121
steps:
2222
- uses: actions/checkout@v2

appveyor.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# AppVeyor.com is a Continuous Integration service to build and run tests under
22
# Windows
33

4+
image: Visual Studio 2019
5+
46
environment:
57
matrix:
6-
- PYTHON: "C:\\Python27"
7-
- PYTHON: "C:\\Python27-x64"
8-
- PYTHON: "C:\\Python34"
9-
- PYTHON: "C:\\Python34-x64"
10-
- PYTHON: "C:\\Python35"
11-
- PYTHON: "C:\\Python35-x64"
128
- PYTHON: "C:\\Python36"
139
- PYTHON: "C:\\Python36-x64"
10+
- PYTHON: "C:\\Python37"
11+
- PYTHON: "C:\\Python37-x64"
12+
- PYTHON: "C:\\Python38"
13+
- PYTHON: "C:\\Python38-x64"
14+
- PYTHON: "C:\\Python39"
15+
- PYTHON: "C:\\Python39-x64"
1416

1517
install:
1618
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

cycler.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,11 @@
4040
{'color': 'b', 'linestyle': '-.'}
4141
"""
4242

43-
from __future__ import (absolute_import, division, print_function,
44-
unicode_literals)
4543

4644
import copy
4745
from functools import reduce
4846
from itertools import product, cycle
4947
from operator import mul, add
50-
import sys
51-
52-
if sys.version_info < (3,):
53-
from itertools import izip as zip
5448

5549
__version__ = '0.10.0'
5650

@@ -107,7 +101,7 @@ def concat(left, right):
107101
return reduce(add, (_cycler(k, _l[k] + _r[k]) for k in left.keys))
108102

109103

110-
class Cycler(object):
104+
class Cycler:
111105
"""
112106
Composable cycles.
113107
@@ -231,7 +225,7 @@ def _from_iter(cls, label, itr):
231225
"""
232226
ret = cls(None)
233227
ret._left = list({label: v} for v in itr)
234-
ret._keys = set([label])
228+
ret._keys = {label}
235229
return ret
236230

237231
def __getitem__(self, key):
@@ -263,7 +257,7 @@ def __add__(self, other):
263257
"""
264258
if len(self) != len(other):
265259
raise ValueError("Can only add equal length cycles, "
266-
"not {0} and {1}".format(len(self), len(other)))
260+
f"not {len(self)} and {len(other)}")
267261
return Cycler(self, other, zip)
268262

269263
def __mul__(self, other):
@@ -347,7 +341,7 @@ def __repr__(self):
347341
if self._right is None:
348342
lab = self.keys.pop()
349343
itr = list(v[lab] for v in self)
350-
return "cycler({lab!r}, {itr!r})".format(lab=lab, itr=itr)
344+
return f"cycler({lab!r}, {itr!r})"
351345
else:
352346
op = op_map.get(self._op, '?')
353347
msg = "({left!r} {op} {right!r})"
@@ -358,11 +352,11 @@ def _repr_html_(self):
358352
output = "<table>"
359353
sorted_keys = sorted(self.keys, key=repr)
360354
for key in sorted_keys:
361-
output += "<th>{key!r}</th>".format(key=key)
355+
output += f"<th>{key!r}</th>"
362356
for d in iter(self):
363357
output += "<tr>"
364358
for k in sorted_keys:
365-
output += "<td>{val!r}</td>".format(val=d[k])
359+
output += f"<td>{d[k]!r}</td>"
366360
output += "</tr>"
367361
output += "</table>"
368362
return output

doc/source/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python3
2-
# -*- coding: utf-8 -*-
32
#
43
# cycler documentation build configuration file, created by
54
# sphinx-quickstart on Wed Jul 1 13:32:53 2015.
@@ -273,7 +272,7 @@
273272
# If true, do not generate a @detailmenu in the "Top" node's menu.
274273
# texinfo_no_detailmenu = False
275274

276-
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),
275+
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
277276
'matplotlb': ('https://matplotlib.org', None)}
278277

279278
# ################ numpydoc config ####################

setup.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
py_modules=['cycler'],
88
description='Composable style cycles',
99
url='https://github.com/matplotlib/cycler',
10-
platforms='Cross platform (Linux, Mac OSX, Windows)',
10+
platforms='Cross platform (Linux, macOS, Windows)',
1111
license="BSD",
12-
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
12+
python_requires='>=3.6',
1313
classifiers=['License :: OSI Approved :: BSD License',
1414
'Development Status :: 4 - Beta',
15-
'Programming Language :: Python :: 2',
16-
'Programming Language :: Python :: 2.7',
1715
'Programming Language :: Python :: 3',
18-
'Programming Language :: Python :: 3.4',
19-
'Programming Language :: Python :: 3.5',
2016
'Programming Language :: Python :: 3.6',
17+
'Programming Language :: Python :: 3.7',
18+
'Programming Language :: Python :: 3.8',
19+
'Programming Language :: Python :: 3.9',
20+
'Programming Language :: Python :: 3.10',
21+
'Programming Language :: Python :: 3 :: Only',
2122
],
2223
keywords='cycle kwargs',
2324
)

test_cycler.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
from __future__ import (absolute_import, division, print_function)
2-
31
from collections import defaultdict
42
from operator import add, iadd, mul, imul
53
from itertools import product, cycle, chain
6-
import sys
74

85
import pytest
96

107
from cycler import cycler, Cycler, concat
118

12-
if sys.version_info < (3,):
13-
from itertools import izip as zip
14-
range = xrange # noqa
15-
str = unicode # noqa
16-
179

1810
def _cycler_helper(c, length, keys, values):
1911
assert len(c) == length

0 commit comments

Comments
 (0)