Skip to content

Commit af02ef6

Browse files
authored
Merge pull request #371 from jdufresne/doc-drop
Undocument support for EOL Python 2.6 and 3.3
2 parents 58c785c + 37d1d12 commit af02ef6

15 files changed

+33
-115
lines changed

TESTING.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Currently the tests are passing on OS X and Linux on Python 2.6, 2.7, 3.3 and 3.4.
1+
Currently the tests are passing on OS X and Linux on Python 2.7 and 3.4.
22

33
The test suite can be run either with:
44

docs/compatible_idioms.rst

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ video is here: http://www.youtube.com/watch?v=KOqk8j11aAI&t=10m14s.)
1616

1717
Minimum versions:
1818

19-
- Python 2: 2.6+
20-
- Python 3: 3.3+
19+
- Python 2: 2.7+
20+
- Python 3: 3.4+
2121

2222
Setup
2323
-----
@@ -1188,38 +1188,6 @@ commands / subprocess modules
11881188
standard_library.install_aliases()
11891189
11901190
from subprocess import getoutput, getstatusoutput
1191-
subprocess.check\_output()
1192-
~~~~~~~~~~~~~~~~~~~~~~~~~~
1193-
1194-
.. code:: python
1195-
1196-
# Python 2.7 and above
1197-
from subprocess import check_output
1198-
1199-
# Python 2.6 and above: alternative 1
1200-
from future.moves.subprocess import check_output
1201-
1202-
# Python 2.6 and above: alternative 2
1203-
from future import standard_library
1204-
standard_library.install_aliases()
1205-
1206-
from subprocess import check_output
1207-
collections: Counter and OrderedDict
1208-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1209-
1210-
.. code:: python
1211-
1212-
# Python 2.7 and above
1213-
from collections import Counter, OrderedDict
1214-
1215-
# Python 2.6 and above: alternative 1
1216-
from future.moves.collections import Counter, OrderedDict
1217-
1218-
# Python 2.6 and above: alternative 2
1219-
from future import standard_library
1220-
standard_library.install_aliases()
1221-
1222-
from collections import Counter, OrderedDict
12231191
StringIO module
12241192
~~~~~~~~~~~~~~~
12251193

docs/dev_notes.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Notes
22
-----
3-
This module only supports Python 2.6, Python 2.7, and Python 3.1+.
3+
This module only supports Python 2.7, and Python 3.4+.
44

55
The following renames are already supported on Python 2.7 without any
66
additional work from us::
@@ -14,8 +14,3 @@ Old things that can one day be fixed automatically by futurize.py::
1414

1515
string.uppercase -> string.ascii_uppercase # works on either Py2.7 or Py3+
1616
sys.maxint -> sys.maxsize # but this isn't identical
17-
18-
TODO: Check out these:
19-
Not available on Py2.6:
20-
unittest2 -> unittest?
21-
buffer -> memoryview?

docs/development.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The easiest way to start developing ``python-future`` is as follows:
1010
2. Run::
1111

1212
conda install -n future2 python=2.7 pip
13-
conda install -n future3 python=3.3 pip
13+
conda install -n future3 python=3.4 pip
1414

1515
git clone https://github.com/PythonCharmers/python-future
1616

docs/dict_object.rst

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ call to ``items``, ``values`` or ``keys``.
2727

2828
For improved efficiency, ``future.builtins`` (aliased to ``builtins``) provides
2929
a Python 2 ``dict`` subclass whose :func:`keys`, :func:`values`, and
30-
:func:`items` methods return iterators on all versions of Python >= 2.6. On
30+
:func:`items` methods return iterators on all versions of Python >= 2.7. On
3131
Python 2.7, these iterators also have the same set-like view behaviour as
3232
dictionaries in Python 3. This can streamline code that iterates over large
3333
dictionaries. For example::
@@ -43,10 +43,6 @@ dictionaries. For example::
4343
# Because items() is memory-efficient, so is this:
4444
d2 = dict((v, k) for (k, v) in d.items())
4545

46-
47-
On Python 2.6, these methods currently return iterators but do not support the
48-
new Py3 set-like behaviour.
49-
5046
As usual, on Python 3 ``dict`` imported from either ``builtins`` or
5147
``future.builtins`` is just the built-in ``dict`` class.
5248

@@ -90,7 +86,7 @@ The memory-efficient (and CPU-efficient) alternatives are:
9086
# Set union:
9187
both = viewvalues(d1) | viewvalues(d2)
9288

93-
For Python 2.6 compatibility, the functions ``iteritems`` etc. are also
94-
available in :mod:`future.utils`. These are equivalent to the functions of the
95-
same names in ``six``, which is equivalent to calling the ``iteritems`` etc.
96-
methods on Python 2, or to calling ``items`` etc. on Python 3.
89+
For compatibility, the functions ``iteritems`` etc. are also available in
90+
:mod:`future.utils`. These are equivalent to the functions of the same names in
91+
``six``, which is equivalent to calling the ``iteritems`` etc. methods on
92+
Python 2, or to calling ``items`` etc. on Python 3.

docs/faq.rst

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Who is this for?
55
================
66

77
1. People with existing or new Python 3 codebases who wish to provide
8-
ongoing Python 2.6 / 2.7 support easily and with little maintenance burden.
8+
ongoing Python 2.7 support easily and with little maintenance burden.
99

1010
2. People who wish to ease and accelerate migration of their Python 2 codebases
11-
to Python 3.3+, module by module, without giving up Python 2 compatibility.
11+
to Python 3.4+, module by module, without giving up Python 2 compatibility.
1212

1313

1414
Why upgrade to Python 3?
@@ -217,15 +217,15 @@ complete set of support for Python 3's features, including backports of
217217
Python 3 builtins such as the ``bytes`` object (which is very different
218218
to Python 2's ``str`` object) and several standard library modules.
219219

220-
``python-future`` supports only Python 2.6+ and Python 3.3+, whereas ``six``
220+
``python-future`` supports only Python 2.7+ and Python 3.4+, whereas ``six``
221221
supports all versions of Python from 2.4 onwards. (See
222222
:ref:`supported-versions`.) If you must support older Python versions,
223223
``six`` will be esssential for you. However, beware that maintaining
224224
single-source compatibility with older Python versions is ugly and `not
225225
fun <http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/>`_.
226226

227227
If you can drop support for older Python versions, ``python-future`` leverages
228-
some important features introduced into Python 2.6 and 2.7, such as
228+
some important features introduced into Python 2.7, such as
229229
import hooks, and a comprehensive and well-tested set of backported
230230
functionality, to allow you to write more idiomatic, maintainable code with
231231
fewer compatibility hacks.
@@ -257,19 +257,13 @@ Platform and version support
257257
Which versions of Python does ``python-future`` support?
258258
--------------------------------------------------------
259259

260-
Python 2.6, 2.7, and 3.3+ only.
260+
Python 2.7, and 3.4+ only.
261261

262-
Python 2.6 and 2.7 introduced many important forward-compatibility
262+
Python 2.7 introduced many important forward-compatibility
263263
features (such as import hooks, ``b'...'`` literals and ``__future__``
264264
definitions) that greatly reduce the maintenance burden for single-source
265265
Py2/3 compatible code. ``future`` leverages these features and aims to
266-
close the remaining gap between Python 3 and 2.6 / 2.7.
267-
268-
Python 3.2 could perhaps be supported too, although the illegal unicode
269-
literal ``u'...'`` syntax may be inconvenient to work around. The Py3.2
270-
userbase is very small, however. Please let us know via GitHub `issue #29
271-
<https://github.com/PythonCharmers/python-future/issues/29>`_ if you
272-
would like to see Py3.2 support.
266+
close the remaining gap between Python 3 and 2.7.
273267

274268

275269
Do you support Pypy?

docs/futurize.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This applies fixes that modernize Python 2 code without changing the effect of
2323
the code. With luck, this will not introduce any bugs into the code, or will at
2424
least be trivial to fix. The changes are those that bring the Python code
2525
up-to-date without breaking Py2 compatibility. The resulting code will be
26-
modern Python 2.6-compatible code plus ``__future__`` imports from the
26+
modern Python 2.7-compatible code plus ``__future__`` imports from the
2727
following set:
2828

2929
.. code-block:: python
@@ -151,7 +151,7 @@ method on exceptions.
151151
152152
lib2to3.fixes.fix_set_literal
153153
154-
This converts ``set([1, 2, 3]``) to ``{1, 2, 3}``, breaking Python 2.6 support.
154+
This converts ``set([1, 2, 3]``) to ``{1, 2, 3}``.
155155

156156
.. code-block:: python
157157

docs/futurize_cheatsheet.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Step 0: setup
1313
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. Optionally rename your repo to ``package-future``. Examples: ``reportlab-future``, ``paramiko-future``, ``mezzanine-future``.
16-
b. Create and activate a Python 2 conda environment or 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``)
16+
b. Create and activate a Python 2 conda environment or virtualenv. Install the package with ``python setup.py install`` and run its test suite on Py2.7 (e.g. ``python setup.py test`` or ``py.test``)
1717
c. Optionally: if there is a ``.travis.yml`` file, add Python version 3.6 and remove any versions < 2.6.
1818
d. Install Python 3 with e.g. ``sudo apt-get install python3``. On other platforms, an easy way is to use `Miniconda <http://repo.continuum.io/miniconda/index.html>`_. Then e.g.::
1919

docs/futurize_overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ use the ``-w`` flag.
5151

5252
For complex projects, it is probably best to divide the porting into two stages.
5353
Stage 1 is for "safe" changes that modernize the code but do not break Python
54-
2.6 compatibility or introduce a depdendency on the ``future`` package. Stage 2
54+
2.7 compatibility or introduce a depdendency on the ``future`` package. Stage 2
5555
is to complete the process.

docs/imports.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ standard feature of Python, see the following docs:
2424
- print_function: `PEP 3105: Make print a function <http://www.python.org/dev/peps/pep-3105>`_
2525
- unicode_literals: `PEP 3112: Bytes literals in Python 3000 <http://www.python.org/dev/peps/pep-3112>`_
2626

27-
These are all available in Python 2.6 and up, and enabled by default in Python 3.x.
27+
These are all available in Python 2.7 and up, and enabled by default in Python 3.x.
2828

2929

3030
.. _builtins-imports:

0 commit comments

Comments
 (0)