8000 Tweaks to porting guide · r3m0t/python-future@960cd6f · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 960cd6f

Browse files
committed
Tweaks to porting guide
1 parent 20351e2 commit 960cd6f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/source/porting.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,21 @@ Instructions and notes on porting code from Python 2 to both Python 3 and 2 usin
1010
Step 0: setup
1111
-------------
1212

13-
Step 0 goal: set up and see the tests passing on Python 2.
13+
Step 0 goal: set up and see the tests passing on Python 2 and failing on Python 3.
1414

1515
a. Clone the package from github/bitbucket. Rename your repo to ``package-future``. Examples: ``reportlab-future``, ``paramiko-future``, ``mezzanine-future``.
16-
b. Create and activate a virtualenv. Install the package with ``python setup.py install`` and run its test suite on Py2.7 or Py2.6 (e.g. ``python setup.py test`` or ``py.test`` or ``nosetests``)
16+
b. Create and activate a Python 2 virtualenv. Install the package with ``python setup.py install`` and run its test suite on Py2.7 or Py2.6 (e.g. ``python setup.py test`` or ``py.test`` or ``nosetests``)
1717
c. Optionally: if there’s a ``.travis.yml`` file, add Python version 3.3 and remove any versions < 2.6.
18+
d. Install Python 3.3 with e.g. ``sudo apt-get install python3``. On other platforms, an easy way is to use Miniconda3. See `Miniconda3: http://repo.continuum.io/miniconda/index.html`_. Then e.g.::
19+
20+
conda create -n py3 python=3
1821

1922
.. _porting-step1:
2023

2124
Step 1: modern Py2 code
2225
-----------------------
2326

24-
The goal for this step is to modernize the Python 2 code without introducing any dependencies (on ``future`` or e.g. ``six`` at this stage.
27+
The goal for this step is to modernize the Python 2 code without introducing any dependencies (on ``future`` or e.g. ``six``) at this stage.
2528

2629
1a. ``pip install future`` into the virtualenv
2730
1b. Run ``futurize --stage1 -w *.py subdir1/*.py subdir2/*.py``

0 commit comments

Comments
 (0)
0