Skip to content

Commit 661593b

Browse files
authored
Merge pull request #116 from hugovk/rm-eol
Add support for Python 3.7, drop EOL 3.0-3.4
2 parents b1b674a + 04c7be1 commit 661593b

File tree

17 files changed

+52
-47
lines changed

17 files changed

+52
-47
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
sudo: false
2-
31
language: python
2+
dist: xenial
43

54
python:
65
- "2.7"
7-
- "3.4"
86
- "3.5"
9-
- "pypy" # cPython 2.7
7+
- "3.6"
8+
- "3.7"
9+
- "pypy2.7-6.0" # CPython 2.7
1010

1111
env:
1212
- DJANGO="1.8"

README.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
restless
33
========
44

5-
.. image:: https://travis-ci.org/toastdriven/restless.png?branch=master
6-
:target: https://travis-ci.org/toastdriven/restless
5+
.. image:: https://travis-ci.org/toastdriven/restless.svg?branch=master
6+
:target: https://travis-ci.org/toastdriven/restless
77

88
.. image:: https://coveralls.io/repos/github/toastdriven/restless/badge.svg?branch=master
99
:target: https://coveralls.io/github/toastdriven/restless?branch=master
1010

1111

1212
A lightweight REST miniframework for Python.
1313

14-
Documentation is at http://restless.readthedocs.org/.
14+
Documentation is at https://restless.readthedocs.io/.
1515

1616
Works great with Django_, Flask_, Pyramid_, Tornado_ & Itty_, but should be useful for
1717
many other Python web frameworks. Based on the lessons learned from Tastypie_
1818
& other REST libraries.
1919

20-
.. _Django: http://djangoproject.com/
20+
.. _Django: https://www.djangoproject.com/
2121
.. _Flask: http://flask.pocoo.org/
22-
.. _Pyramid: http://www.pylonsproject.org/
23-
.. _Itty: https://pypi.python.org/pypi/itty
22+
.. _Pyramid: https://pylonsproject.org/
23+
.. _Itty: https://pypi.org/project/itty/
2424
.. _Tastypie: http://tastypieapi.org/
25-
.. _Tornado: http://www.tornadoweb.org/
25+
.. _Tornado: https://www.tornadoweb.org/
2626
.. _tox: https://tox.readthedocs.io/
2727

2828

@@ -32,7 +32,7 @@ Features
3232
* Small, fast codebase
3333
* JSON output by default, but overridable
3434
* RESTful
35-
* Python 3.4+ (with shims to make broke-ass Python 2.6+ work)
35+
* Python 3.5+ (with shims to make broke-ass Python 2.7 work)
3636
* Django 1.8+
3737
* Flexible
3838

@@ -158,9 +158,9 @@ The test suite uses tox_ for simultaneous support of multiple versions of both
158158
Python and Django. The current versions of Python supported are:
159159

160160
* CPython 2.7
161-
* CPython 3.4
162161
* CPython 3.5
163162
* CPython 3.6
163+
* CPython 3.7
164164
* PyPy (Python 2.7)
165165

166166
You just need to install the Python interpreters above and the `tox` package

examples/flask/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def is_authenticated(self):
1414
return True
1515

1616
def make_user_key(self, username):
17-
return 'user_{0}'.format(username)
17+
return 'user_{}'.format(username)
1818

1919
def list(self):
2020
usernames = self.conn.lrange('users', 0, 100)

examples/pyramid/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def is_authenticated(self):
1414
return True
1515

1616
def make_user_key(self, username):
17-
return 'user_{0}'.format(username)
17+
return 'user_{}'.format(username)
1818

1919
def list(self):
2020
usernames = self.conn.lrange('users', 0, 100)

restless/dj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def build_url_name(cls, name, name_prefix=None):
105105
:rtype: string
106106
"""
107107
if name_prefix is None:
108-
name_prefix = 'api_{0}'.format(
108+
name_prefix = 'api_{}'.format(
109109
cls.__name__.replace('Resource', '').lower()
110110
)
111111

restless/fl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def build_endpoint_name(cls, name, endpoint_prefix=None):
7474
:rtype: string
7575
"""
7676
if endpoint_prefix is None:
77-
endpoint_prefix = 'api_{0}'.format(
77+
endpoint_prefix = 'api_{}'.format(
7878
cls.__name__.replace('Resource', '').lower()
7979
)
8080

restless/pyr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def build_routename(cls, name, routename_prefix=None):
5656
:rtype: string
5757
"""
5858
if routename_prefix is None:
59-
routename_prefix = 'api_{0}'.format(
59+
routename_prefix = 'api_{}'.format(
6060
cls.__name__.replace('Resource', '').lower()
6161
)
6262

restless/resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def handle(self, endpoint, *args, **kwargs):
272272
# ``endpoint`` errors as well.
273273
if not method in self.http_methods.get(endpoint, {}):
274274
raise MethodNotImplemented(
275-
"Unsupported method '{0}' for {1} endpoint.".format(
275+
"Unsupported method '{}' for {} endpoint.".format(
276276
method,
277277
endpoint
278278
)

restless/tnd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def handle(self, endpoint, *args, **kwargs):
154154
try:
155155
if not method in self.http_methods.get(endpoint, {}):
156156
raise MethodNotImplemented(
157-
"Unsupported method '{0}' for {1} endpoint.".format(
157+
"Unsupported method '{}' for {} endpoint.".format(
158158
method,
159159
endpoint
160160
)

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
description='A lightweight REST miniframework for Python.',
1212
author='Daniel Lindsley',
1313
author_email='[email protected]',
14-
url='http://github.com/toastdriven/restless/',
14+
url='https://github.com/toastdriven/restless/',
1515
long_description=open('README.rst', 'r').read(),
1616
packages=[
1717
'restless',
@@ -26,6 +26,7 @@
2626
'mock',
2727
'tox',
2828
],
29+
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
2930
classifiers=[
3031
'Development Status :: 5 - Production/Stable',
3132
'Environment :: Web Environment',
@@ -37,7 +38,11 @@
3738
'Operating System :: OS Independent',
3839
'Programming Language :: Python',
3940
'Programming Language :: Python :: 2',
41+
'Programming Language :: Python :: 2.7',
4042
'Programming Language :: Python :: 3',
43+
'Programming Language :: Python :: 3.5',
44+
'Programming Language :: Python :: 3.6',
45+
'Programming Language :: Python :: 3.7',
4146
'Topic :: Utilities'
4247
],
4348
)

0 commit comments

Comments
 (0)