Skip to content

Commit 7aae883

Browse files
committed
Update docs and improve their HTML layout
1 parent 423dd96 commit 7aae883

16 files changed

+994
-216
lines changed

README.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Overview: Easy, clean, reliable Python 2/3 compatibility
77
Python 3. It allows you to use a single, clean Python 3.x-compatible
88
codebase to support both Python 2 and Python 3 with minimal overhead.
99

10-
It provides ``future`` and ``past`` packages with backports and forward ports of
11-
features from Python 3 and 2. It also comes with ``futurize`` and
12-
``pasteurize``, customized 2to3-based scripts that helps you to convert either
13-
Py2 or Py3 code easily to support both Python 2 and 3 in a single clean
14-
Py3-style codebase, module by module.
10+
It provides ``future`` and ``past`` packages with backports and forward
11+
ports of features from Python 3 and 2. It also comes with ``futurize`` and
12+
``pasteurize``, customized 2to3-based scripts that helps you to convert
13+
either Py2 or Py3 code easily to support both Python 2 and 3 in a single
14+
clean Py3-style codebase, module by module.
1515

1616
Notable projects that use ``python-future`` for Python 3/2 compatibility
1717
are `Mezzanine <http://mezzanine.jupo.org/>`_ and `ObsPy
@@ -29,14 +29,18 @@ Features
2929
backports and remappings for 20 builtins with different semantics on Py3
3030
versus Py2
3131

32-
- ``future.standard_library``, in conjunction with ``future.moves``, provides
33-
support for importing standard library modules under their Python 3 names
32+
- support for directly importing 30 standard library modules under
33+
their Python 3 names on Py2
34+
35+
- support for importing the other 14 refactored standard library modules
36+
under their Py3 names relatively cleanly via
37+
``future.standard_library`` and ``future.moves``
3438

3539
- ``past.builtins`` package provides forward-ports of 19 Python 2 types and
3640
builtin functions. These can aid with per-module code migrations.
3741

3842
- ``past.translation`` package supports transparent translation of Python 2
39-
modules to Python 3 upon import. [This feature is currently in alpha.]
43+
modules to Python 3 upon import. [This feature is currently in alpha.]
4044

4145
- 920+ unit tests, including many from the Py3.3 source tree.
4246

@@ -153,7 +157,7 @@ interface works like this:
153157
Automatic conversion to Py2/3-compatible code
154158
---------------------------------------------
155159

156-
``future`` comes with two scripts called ``futurize`` and
160+
``python-future`` comes with two scripts called ``futurize`` and
157161
``pasteurize`` to aid in making Python 2 code or Python 3 code compatible with
158162
both platforms (Py2&3). It is based on 2to3 and uses fixers from ``lib2to3``,
159163
``lib3to2``, and ``python-modernize``, as well as custom fixers.
@@ -250,6 +254,7 @@ properly to a Python 2/3 compatible codebase using a tool like
250254
Note: the translation feature is still in alpha and needs more testing and
251255
development.
252256

257+
For more info, see :ref:`translation`.
253258

254259
Licensing
255260
---------
@@ -269,7 +274,7 @@ Licensing
269274
Next steps
270275
----------
271276

272-
If you are new to ``python-future``, check out the `Quickstart Guide
277+
If you are new to Python-Future, check out the `Quickstart Guide
273278
<http://python-future.org/quickstart.html>`_.
274279

275280
For an update on changes in the latest version, see the `What's New
3.19 KB
Binary file not shown.
3.19 KB
Binary file not shown.
31.9 KB
Loading

docs/_templates/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<span class="icon-bar"></span>
1313
</button>
1414

15-
<!--<a class="logo"> <img height="32" width="32" src="_static/python-future-logo.png" /></a>-->
15+
<a class="logo"> <img height="32" width="32" src="_static/python-future-logo-textless-transparent.png" /></a>
1616
<a class="navbar-brand" href="{{ pathto(master_doc) }}">{% if theme_navbar_title -%}{{ theme_navbar_title|e }}{%- else -%}{{ project|e }}{%- endif -%}</a>
1717
<span class="navbar-text navbar-version pull-left"><b>{{ version|e }}</b></span>
1818
</div>

docs/_templates/sidebarintro.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!--<h3>Python-Future</h3>
22
<p>-->
33
<h4>Easy, clean, reliable Python 2/3 compatibility</h4>
4+
<a href="http://python-future.org">Table of Contents</a>
45
<!--
56
</p>
67
<h3>Other Formats</h3>
@@ -12,8 +13,9 @@ <h3>Other Formats</h3>
1213
<li><a href="http://jinja.pocoo.org/docs/jinja-docs.zip">as zipped HTML</a>
1314
</ul>
1415
-->
15-
<!--<h3>Useful Links</h3>-->
16+
<!--<h3>Useful Links</h3>
1617
<ul>
1718
<li><a href="http://pypi.python.org/pypi/future">on PyPI</a></li>
1819
<li><a href="https://github.com/PythonCharmers/python-future">on GitHub</a></li>
1920
</ul>
21+
-->

docs/changelog.rst

Lines changed: 68 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
Changes in previous versions
44
****************************
55

6+
Changes in the most recent two versions are here: :ref:`whats-new`.
7+
68
.. _whats-new-0.12.4:
79

8-
What's new in version 0.12.4
9-
============================
10+
Changes in version 0.12.4
11+
=========================
1012

1113
- Fix upcasting behaviour of newint (issue #76).
1214

1315

1416
.. _whats-new-0.12.3:
1517

16-
What's new in version 0.12.3
17-
============================
18+
Changes in version 0.12.3
19+
=========================
1820

1921
- Add "official Python 3.4 support": Py3.4 is now listed among the PyPI Trove
2022
classifiers and the tests now run successfully on Py3.4 (issue #67).
@@ -44,8 +46,8 @@ What's new in version 0.12.3
4446

4547
.. _whats-new-0.12.2:
4648

47-
What's new in version 0.12.2
48-
============================
49+
Changes in version 0.12.2
50+
=========================
4951

5052
- Add ``bytes.maketrans()`` method (issue #51).
5153
- Add support for Python versions between 2.7.0 and 2.7.3 (inclusive)
@@ -55,8 +57,8 @@ What's new in version 0.12.2
5557

5658
.. _whats-new-0.12.1:
5759

58-
What's new in version 0.12.1
59-
============================
60+
Changes in version 0.12.1
61+
=========================
6062

6163
- Python 2.6 support: ``future.standard_library`` now isolates the ``importlib``
6264
dependency to one function (``import_``) so the ``importlib`` backport may
@@ -67,8 +69,8 @@ What's new in version 0.12.1
6769

6870
.. _whats-new-0.12:
6971

70-
What's new in version 0.12.0
71-
============================
72+
Changes in version 0.12.0
73+
=========================
7274

7375
The major new feature in this version is improvements in the support for the
7476
reorganized standard library (PEP 3108) and compatibility of the import
@@ -285,8 +287,8 @@ Many small improvements and fixes have been made across the project. Some highli
285287

286288
.. _whats-new-0.11.4:
287289

288-
What's new in version 0.11.4
289-
============================
290+
Changes in version 0.11.4
291+
=========================
290292

291293
This release contains various small improvements and fixes:
292294

@@ -312,8 +314,8 @@ This release contains various small improvements and fixes:
312314

313315
.. _whats-new-0.11.3:
314316

315-
What's new in version 0.11.3
316-
============================
317+
Changes in version 0.11.3
318+
=========================
317319

318320
This release has improvements in the standard library import hooks mechanism and
319321
its compatibility with 3rd-party modules:
@@ -380,8 +382,8 @@ The ``pasteurize`` script for converting from Py3 to Py2/3 still adds
380382

381383
.. _whats-new-0.11:
382384

383-
What's new in version 0.11
384-
==========================
385+
Changes in version 0.11
386+
=======================
385387

386388
There are several major new features in version 0.11.
387389

@@ -508,60 +510,11 @@ types but not their use.
508510

509511
.. _whats-new-0.10.2:
510512

511-
What's new in version 0.10.2
512-
============================
513-
514-
515-
.. Simpler imports
516-
.. ---------------
517-
..
518-
.. It is now possible to import builtins directly from the ``future``
519-
.. namespace as follows::
520-
..
521-
.. >>> from future import *
522-
..
523-
.. or just those you need::
524-
..
525-
.. >>> from future import open, str
526-
527-
528-
Utility functions for raising exceptions with a traceback portably
529-
------------------------------------------------------------------
530-
531-
The functions ``raise_with_traceback()`` and ``raise_`` were added to
532-
``future.utils`` to offer either the Python 3.x or Python 2.x behaviour
533-
for raising exceptions. Thanks to Joel Tratner for the contribution of
534-
these.
535-
536-
537-
.. _whats-new-0.10:
538-
539-
What's new in version 0.10
540-
==========================
541-
542-
Backported ``dict`` type
543-
------------------------
544-
545-
``future.builtins`` now provides a Python 2 ``dict`` subclass whose
546-
:func:`keys`, :func:`values`, and :func:`items` methods produce
547-
memory-efficient iterators. On Python 2.7, these also have the same set-like
548-
view behaviour as on Python 3. This can streamline code needing to iterate
549-
over large dictionaries. For example::
550-
551-
from __future__ import print_function
552-
from future.builtins import dict, range
553-
554-
squares = dict({i: i**2 for i in range(10**7)})
555-
556-
assert not isinstance(d.items(), list)
557-
# Because items() is memory-efficient, so is this:
558-
square_roots = dict((i_squared, i) for (i, i_squared) in squares.items())
559-
560-
For more information, see :ref:`dict-object`.
561-
513+
Changes in version 0.10.2
514+
=========================
562515

563-
Refactoring of standard_library hooks (v0.10.2)
564-
-----------------------------------------------
516+
New context-manager interface to standard_library hooks
517+
-------------------------------------------------------
565518

566519
There is a new context manager ``future.standard_library.hooks``. Use it like
567520
this::
@@ -595,6 +548,31 @@ still available as aliases, but are deprecated.
595548
As usual, this feature has no effect on Python 3.
596549

597550

551+
.. _whats-new-0.10:
552+
553+
Changes in version 0.10.0
554+
=========================
555+
556+
Backported ``dict`` type
557+
------------------------
558+
559+
``future.builtins`` now provides a Python 2 ``dict`` subclass whose
560+
:func:`keys`, :func:`values`, and :func:`items` methods produce
561+
memory-efficient iterators. On Python 2.7, these also have the same set-like
562+
view behaviour as on Python 3. This can streamline code needing to iterate
563+
over large dictionaries. For example::
564+
565+
from __future__ import print_function
566+
from future.builtins import dict, range
567+
568+
squares = dict({i: i**2 for i in range(10**7)})
569+
570+
assert not isinstance(d.items(), list)
571+
# Because items() is memory-efficient, so is this:
572+
square_roots = dict((i_squared, i) for (i, i_squared) in squares.items())
573+
574+
For more information, see :ref:`dict-object`.
575+
598576

599577
Utility functions ``raise_`` and ``exec_``
600578
------------------------------------------
@@ -617,12 +595,12 @@ Bugfixes
617595

618596
.. _whats-new-0.9:
619597

620-
What's new in version 0.9
621-
=========================
598+
Changes in version 0.9
599+
======================
622600

623601

624-
``isinstance`` checks supported natively with backported types
625-
--------------------------------------------------------------
602+
``isinstance`` checks are supported natively with backported types
603+
------------------------------------------------------------------
626604

627605
The ``isinstance`` function is no longer redefined in ``future.builtins``
628606
to operate with the backported ``int``, ``bytes`` and ``str``.
@@ -677,8 +655,8 @@ To work around this, ``future`` now provides a context manager called
677655

678656
.. _whats-new-0.8:
679657

680-
What's new in version 0.8
681-
=========================
658+
Changes in version 0.8.x
659+
========================
682660

683661
Python 2.6 support
684662
------------------
@@ -724,7 +702,21 @@ deprecated.
724702
.. _changelog:
725703

726704
Summary of all changes
727-
======================
705+
**********************
706+
707+
v0.14:
708+
* New top-level ``builtins`` package on Py2 for cleaner imports. Equivalent to
709+
``future.builtins``
710+
* New top-level packages on Py2 with the same names as Py3 standard modules:
711+
``configparser``, ``copyreg``, ``html``, ``http``, ``xmlrpc``, ``winreg``
712+
713+
v0.13.1:
714+
* Bug fixes
715+
716+
v0.13.0:
717+
* Cheat sheet for writing Python 2/3 compatible code
718+
* ``to_int`` and ``from_int`` methods for ``newbytes``
719+
* Bug fixes
728720

729721
v0.12.0:
730722
* Add ``newobject`` and ``newlist`` types

0 commit comments

Comments
 (0)