Skip to content

Commit b99d01b

Browse files
committed
Use 2to3 automatically during the build process.
It doesn't make a ton of changes in truth, but it's a recommended step on the conversion path. It does handle the `urllib` path though!
1 parent 4de59b7 commit b99d01b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Or setuptools::
1818
git clone git://github.com/embedly/embedly-python.git
1919
python setup.py
2020

21+
Setup requires Setuptools 0.7+ or Distribute 0.6.2+ in order to take advantage
22+
of the ``2to3`` option. Setup will still run on earlier versions but you'll
23+
see a warning and ``2to3`` won't happen. Read more in the Setuptools
24+
`docs <http://pythonhosted.org/setuptools/python3.html>`_
2125

2226
Getting Started
2327
---------------

embedly/client.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@
44
55
The embedly object that interacts with the service
66
"""
7-
from __future__ import absolute_import
7+
from __future__ import absolute_import, unicode_literals
88
import re
99
import httplib2
1010
import json
11-
12-
try: # pragma: no cover
13-
from urllib.parse import quote, urlencode # pragma: no cover
14-
except ImportError: # Python 2 # pragma: no cover
15-
from urllib import quote, urlencode # pragma: no cover
11+
from urllib import quote, urlencode
1612

1713
from .models import Url
1814

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def get_version():
4040
packages=['embedly'],
4141
install_requires=required,
4242
tests_require=tests_require,
43+
test_suite="embedly.tests",
4344
zip_safe=True,
45+
use_2to3=True,
4446
classifiers=(
4547
'Development Status :: 5 - Production/Stable',
4648
'Intended Audience :: Developers',

0 commit comments

Comments
 (0)