You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Doc/whatsnew/2.2.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ implemented in C. In particular, it's not possible to subclass built-in types,
55
55
so you can't just subclass, say, lists in order to add a single useful method to
56
56
them. The :mod:`!UserList` module provides a class that supports all of the
57
57
methods of lists and that can be subclassed further, but there's lots of C code
58
-
that expects a regular Python list and won't accept a :class:`!UserList`
58
+
that expects a regular Python list and won't accept a :class:`~collections.UserList`
59
59
instance.
60
60
61
61
Python 2.2 fixes this, and in the process adds some exciting new capabilities.
@@ -69,7 +69,7 @@ A brief summary:
69
69
70
70
* It's also possible to automatically call methods on accessing or setting an
71
71
instance attribute by using a new mechanism called :dfn:`properties`. Many uses
72
-
of :meth:`!__getattr__` can be rewritten to use properties instead, making the
72
+
of :meth:`~object.__getattr__` can be rewritten to use properties instead, making the
73
73
resulting code simpler and faster. As a small side benefit, attributes can now
74
74
have docstrings, too.
75
75
@@ -933,7 +933,7 @@ anyway).
933
933
New and Improved Modules
934
934
========================
935
935
936
-
* The :mod:`!xmlrpclib` module was contributed to the standard library by Fredrik
936
+
* The :mod:`xmlrpclib <xmlrpc.client>` module was contributed to the standard library by Fredrik
937
937
Lundh, providing support for writing XML-RPC clients. XML-RPC is a simple
938
938
remote procedure call protocol built on top of HTTP and XML. For example, the
939
939
following snippet retrieves a list of RSS channels from the O'Reilly Network,
@@ -956,15 +956,15 @@ New and Improved Modules
956
956
# 'description': 'A utility which converts HTML to XSL FO.',
957
957
# 'title': 'html2fo 0.3 (Default)'}, ... ]
958
958
959
-
The :mod:`!SimpleXMLRPCServer` module makes it easy to create straightforward
959
+
The :mod:`SimpleXMLRPCServer <xmlrpc.server>` module makes it easy to create straightforward
960
960
XML-RPC servers. See http://xmlrpc.scripting.com/ for more information about XML-RPC.
961
961
962
962
* The new :mod:`hmac` module implements the HMAC algorithm described by
963
963
:rfc:`2104`. (Contributed by Gerhard Häring.)
964
964
965
965
* Several functions that originally returned lengthy tuples now return
966
966
pseudo-sequences that still behave like tuples but also have mnemonic attributes such
967
-
as :attr:`!memberst_mtime` or :attr:`!tm_year`. The enhanced functions include
967
+
as :attr:`!memberst_mtime` or :attr:`~time.struct_time.tm_year`. The enhanced functions include
968
968
:func:`~os.stat`, :func:`~os.fstat`, :func:`~os.statvfs`, and :func:`~os.fstatvfs` in the
969
969
:mod:`os` module, and :func:`~time.localtime`, :func:`~time.gmtime`, and :func:`~time.strptime` in
Copy file name to clipboardExpand all lines: Doc/whatsnew/2.6.rst
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1082,7 +1082,7 @@ the :mod:`io` module:
1082
1082
1083
1083
(In Python 2.6, :class:`io.StringIO` is implemented in
1084
1084
pure Python, so it's pretty slow. You should therefore stick with the
1085
-
existing :mod:`StringIO` module or :mod:`cStringIO` for now. At some
1085
+
existing :mod:`!StringIO` module or :mod:`!cStringIO` for now. At some
1086
1086
point Python 3.0's :mod:`io` module will be rewritten into C for speed,
1087
1087
and perhaps the C implementation will be backported to the 2.x releases.)
1088
1088
@@ -1807,7 +1807,7 @@ changes, or look through the Subversion logs for all the details.
1807
1807
Nubis; :issue:`1817`.)
1808
1808
1809
1809
The :func:`parse_qs` and :func:`parse_qsl` functions have been
1810
-
relocated from the :mod:`!cgi` module to the :mod:`urlparse` module.
1810
+
relocated from the :mod:`!cgi` module to the :mod:`urlparse <urllib.parse>` module.
1811
1811
The versions still available in the :mod:`!cgi` module will
1812
1812
trigger :exc:`PendingDeprecationWarning` messages in 2.6
1813
1813
(:issue:`600362`).
@@ -1895,8 +1895,8 @@ changes, or look through the Subversion logs for all the details.
1895
1895
1896
1896
(Contributed by Raymond Hettinger.)
1897
1897
1898
-
* The :mod:`Cookie` module's :class:`Morsel` objects now support an
1899
-
:attr:`httponly` attribute. In some browsers. cookies with this attribute
1898
+
* The :mod:`Cookie <http.cookies>` module's :class:`~http.cookies.Morsel` objects now support an
1899
+
:attr:`~http.cookies.Morsel.httponly` attribute. In some browsers. cookies with this attribute
1900
1900
set cannot be accessed or manipulated by JavaScript code.
1901
1901
(Contributed by Arvin Schnell; :issue:`1638033`.)
1902
1902
@@ -1987,8 +1987,8 @@ changes, or look through the Subversion logs for all the details.
1987
1987
(Contributed by Raymond Hettinger.)
1988
1988
1989
1989
* An optional ``timeout`` parameter, specifying a timeout measured in
1990
-
seconds, was added to the :class:`httplib.HTTPConnection` and
1991
-
:class:`HTTPSConnection` class constructors. (Added by Facundo
1990
+
seconds, was added to the :class:`httplib.HTTPConnection <http.client.HTTPConnection>` and
1991
+
:class:`HTTPSConnection <http.client.HTTPSConnection>` class constructors. (Added by Facundo
1992
1992
Batista.)
1993
1993
1994
1994
* Most of the :mod:`inspect` module's functions, such as
@@ -2371,10 +2371,10 @@ changes, or look through the Subversion logs for all the details.
2371
2371
``socket(socket.AF_INET, ...)`` may be all that's required to make
2372
2372
your code work with IPv6.
2373
2373
2374
-
* The base classes in the :mod:`SocketServer` module now support
2375
-
calling a :meth:`handle_timeout` method after a span of inactivity
2376
-
specified by the server's :attr:`timeout` attribute. (Contributed
2377
-
by Michael Pomraning.) The :meth:`serve_forever` method
2374
+
* The base classes in the :mod:`SocketServer <socketserver>` module now support
2375
+
calling a :meth:`~socketserver.BaseServer.handle_timeout` method after a span of inactivity
2376
+
specified by the server's :attr:`~socketserver.BaseServer.timeout` attribute. (Contributed
2377
+
by Michael Pomraning.) The :meth:`~socketserver.BaseServer.serve_forever` method
2378
2378
now takes an optional poll interval measured in seconds,
2379
2379
controlling how often the server will check for a shutdown request.
2380
2380
(Contributed by Pedro Werneck and Jeffrey Yasskin;
@@ -2478,9 +2478,9 @@ changes, or look through the Subversion logs for all the details.
2478
2478
``with tempfile.NamedTemporaryFile() as tmp: ...``.
2479
2479
(Contributed by Alexander Belopolsky; :issue:`2021`.)
2480
2480
2481
-
* The :mod:`test.test_support` module gained a number
2481
+
* The :mod:`test.test_support <test.support>` module gained a number
2482
2482
of context managers useful for writing tests.
2483
-
:func:`EnvironmentVarGuard` is a
2483
+
:func:`~test.support.os_helper.EnvironmentVarGuard` is a
2484
2484
context manager that temporarily changes environment variables and
2485
2485
automatically restores them to their old values.
2486
2486
@@ -2577,9 +2577,9 @@ changes, or look through the Subversion logs for all the details.
2577
2577
(:issue:`1513695`)
2578
2578
2579
2579
* An optional ``timeout`` parameter was added to the
2580
-
:func:`urllib.urlopen` function and the
2580
+
:func:`urllib.urlopen <urllib.request.urlopen>` function and the
2581
2581
:class:`urllib.ftpwrapper` class constructor, as well as the
2582
-
:func:`urllib2.urlopen` function. The parameter specifies a timeout
2582
+
:func:`urllib2.urlopen <urllib.request.urlopen>` function. The parameter specifies a timeout
2583
2583
measured in seconds. For example::
2584
2584
2585
2585
>>> u = urllib2.urlopen("http://slow.example.com",
@@ -2604,7 +2604,7 @@ changes, or look through the Subversion logs for all the details.
2604
2604
intended for testing purposes that lets you temporarily modify the
2605
2605
warning filters and then restore their original values (:issue:`3781`).
2606
2606
2607
-
* The XML-RPC :class:`SimpleXMLRPCServer` and :class:`DocXMLRPCServer`
2607
+
* The XML-RPC :class:`SimpleXMLRPCServer <xmlrpc.server>` and :class:`DocXMLRPCServer <xmlrpc.server>`
2608
2608
classes can now be prevented from immediately opening and binding to
2609
2609
their socket by passing ``False`` as the *bind_and_activate*
2610
2610
constructor parameter. This can be used to modify the instance's
@@ -2621,11 +2621,11 @@ changes, or look through the Subversion logs for all the details.
2621
2621
information. (Contributed by Alan McIntyre as part of his
2622
2622
project for Google's Summer of Code 2007.)
2623
2623
2624
-
* The :mod:`xmlrpclib` module no longer automatically converts
2624
+
* The :mod:`xmlrpclib <xmlrpc.client>` module no longer automatically converts
2625
2625
:class:`datetime.date` and :class:`datetime.time` to the
2626
-
:class:`xmlrpclib.DateTime` type; the conversion semantics were
2626
+
:class:`xmlrpclib.DateTime <xmlrpc.client.DateTime>` type; the conversion semantics were
2627
2627
not necessarily correct for all applications. Code using
2628
-
:mod:`xmlrpclib` should convert :class:`date` and :class:`~datetime.time`
2628
+
:mod:`!xmlrpclib` should convert :class:`date` and :class:`~datetime.time`
2629
2629
instances. (:issue:`1330538`) The code can also handle
2630
2630
dates before 1900 (contributed by Ralf Schmitt; :issue:`2014`)
2631
2631
and 64-bit integers represented by using ``<i8>`` in XML-RPC responses
@@ -3274,11 +3274,11 @@ that may require changes to your code:
3274
3274
:exc:`StandardError` but now it is, through :exc:`IOError`.
3275
3275
(Implemented by Gregory P. Smith; :issue:`1706815`.)
3276
3276
3277
-
* The :mod:`xmlrpclib` module no longer automatically converts
3277
+
* The :mod:`xmlrpclib <xmlrpc.client>` module no longer automatically converts
3278
3278
:class:`datetime.date` and :class:`datetime.time` to the
3279
-
:class:`xmlrpclib.DateTime` type; the conversion semantics were
3279
+
:class:`xmlrpclib.DateTime <xmlrpc.client.DateTime>` type; the conversion semantics were
3280
3280
not necessarily correct for all applications. Code using
3281
-
:mod:`xmlrpclib` should convert :class:`date` and :class:`~datetime.time`
3281
+
:mod:`!xmlrpclib` should convert :class:`date` and :class:`~datetime.time`
3282
3282
instances. (:issue:`1330538`)
3283
3283
3284
3284
* (3.0-warning mode) The :class:`Exception` class now warns
0 commit comments