[Python-checkins] r81283 - python/branches/py3k/Doc/library/urllib.request.rst

senthil.kumaran python-checkins at python.org
Tue May 18 05:58:36 CEST 2010


Author: senthil.kumaran
Date: Tue May 18 05:58:36 2010
New Revision: 81283

Log:
Removing the reference in the docs for overriding _urlopener global value. See Issue8619 for details.



Modified:
   python/branches/py3k/Doc/library/urllib.request.rst

Modified: python/branches/py3k/Doc/library/urllib.request.rst
==============================================================================
--- python/branches/py3k/Doc/library/urllib.request.rst	(original)
+++ python/branches/py3k/Doc/library/urllib.request.rst	Tue May 18 05:58:36 2010
@@ -126,26 +126,6 @@
    of the data it has downloaded, and just returns it.  In this case you just have
    to assume that the download was successful.
 
-
-.. data:: _urlopener
-
-   The public functions :func:`urlopen` and :func:`urlretrieve` create an instance
-   of the :class:`FancyURLopener` class and use it to perform their requested
-   actions.  To override this functionality, programmers can create a subclass of
-   :class:`URLopener` or :class:`FancyURLopener`, then assign an instance of that
-   class to the ``urllib.request._urlopener`` variable before calling the
-   desired function.  For example, applications may want to specify a different
-   :mailheader:`User-Agent` header than :class:`URLopener` defines.
-   This can be accomplished with the following code::
-
-      import urllib.request
-
-      class AppURLopener(urllib.request.FancyURLopener):
-          version = "App/1.7"
-
-      urllib.request._urlopener = AppURLopener()
-
-
 .. function:: urlcleanup()
 
    Clear the cache that may have been built up by previous calls to


More information about the Python-checkins mailing list