Skip to content

Commit e6d72b6

Browse files
committed
Update docs for v0.15.x
1 parent 114b161 commit e6d72b6

File tree

2 files changed

+30
-16
lines changed

2 files changed

+30
-16
lines changed

docs/standard_library_imports.rst

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,22 @@ Aliased imports
8686
~~~~~~~~~~~~~~~
8787

8888
The following 14 modules were refactored or extended from Python 2.6/2.7 to 3.x
89-
but were neither renamed nor were the new APIs backported. The ``future``
90-
package makes the Python 3.x APIs available on Python 2.x as follows::
89+
but were neither renamed in Py3.x nor were the new APIs backported to Py2.x.
90+
This precludes compatibility interfaces that work out-of-the-box. Instead, the
91+
``future`` package makes the Python 3.x APIs available on Python 2.x as
92+
follows::
9193

9294
from future.standard_library import install_aliases
9395
install_aliases()
9496

9597
from collections import UserDict, UserList, UserString
9698

99+
import urllib.parse
100+
import urllib.request
101+
import urllib.response
102+
import urllib.robotparser
103+
import urllib.error
104+
97105
import dbm
98106
import dbm.dumb
99107
import dbm.gnu # requires Python dbm support
@@ -107,12 +115,10 @@ package makes the Python 3.x APIs available on Python 2.x as follows::
107115

108116
import test.support
109117

110-
import urllib.error
111-
import urllib.parse
112-
import urllib.request
113-
import urllib.response
114-
import urllib.robotparser
115118

119+
The newly exposed ``urllib`` submodules are full backports of those from Py3.x.
120+
This means, for example, that ``urllib.parse.unquote()`` now exists and takes
121+
an optional ``encoding`` argument on Py2.x as it does on Py3.x.
116122

117123
Backports also exist of the following features from Python 3.4:
118124

@@ -122,7 +128,7 @@ Backports also exist of the following features from Python 3.4:
122128
- ``collections.ChainMap`` (for all versions prior to Python 3.3)
123129
- ``itertools.count`` (for Python 2.6, with step parameter)
124130
- ``subprocess.check_output`` (for Python 2.6)
125-
- ``reprlib.recursive_repr``
131+
- ``reprlib.recursive_repr`` (for Python 2.6 and 2.7)
126132

127133
These can then be imported on Python 2.6+ as follows::
128134

docs/whatsnew.rst

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,26 @@ What's New
55

66
.. _whats-new-0.14.x:
77

8-
What's new in version 0.14.4 (2015-07-25)
8+
What's new in version 0.15.0 (2015-07-25)
99
=========================================
1010

11-
This is primarily a bug-fix release. It adds some minor new backward-compatible features and
12-
fixes several bugs.
11+
This release fixes compatibility bugs with CherryPy's Py2/3 compat layer and
12+
the latest version of the ``urllib3`` package. It also adds some additional
13+
backports for Py2.6 and Py2.7 from Py3.4's standard library.
1314

14-
Minor features:
15+
New features:
1516

17+
- ``install_aliases()`` now exposes full backports of the Py3 urllib submodules
18+
(``parse``, ``request`` etc.) from ``future.backports.urllib`` as submodules
19+
of ``urllib`` on Py2. This implies, for example, that
20+
``urllib.parse.unquote`` now takes an optional encoding argument as it does
21+
on Py3. This improves compatibility with CherryPy's Py2/3 compat layer (issue
22+
#158).
1623
- ``tkinter.ttk`` support (issue #151)
17-
- ``collections.ChainMap`` backport (issue #150)
18-
- ``itertools.count`` backport for Py2.6 (issue #152)
24+
- Backport of ``collections.ChainMap`` (issue #150)
25+
- Backport of ``itertools.count`` for Py2.6 (issue #152)
1926
- Add constants to ``http.client`` such as ``HTTP_PORT`` and ``BAD_REQUEST`` (issue #137)
20-
- ``reprlib.recursive_repr`` backport for Py2
21-
- Update backports of ``Counter`` and ``OrderedDict`` to use Py3.4 implementations. This fixes ``.copy()`` for subclasses etc.
27+
- Backport of ``reprlib.recursive_repr`` to Py2
2228

2329
Bug fixes:
2430

@@ -28,6 +34,8 @@ Bug fixes:
2834
- Fix newrange slicing for some slice/range combos (issue #132, thanks to Brad Walker)
2935
- Small doc fixes (thanks to Michael Joseph and Tim Tröndle)
3036
- Improve robustness of test suite against opening .pyc files as text on Py2
37+
- Update backports of ``Counter`` and ``OrderedDict`` to use the newer
38+
implementations from Py3.4. This fixes ``.copy()`` preserving subclasses etc.
3139

3240

3341
What's new in version 0.14.3 (2014-12-15)

0 commit comments

Comments
 (0)