diff options
author | Georg Brandl <georg@python.org> | 2014-10-29 08:37:43 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-29 08:37:43 (GMT) |
commit | 0ffb46261ce56830e3be93d002317f5f037f57f2 (patch) | |
tree | 4d2748b4c3fe4fc44c3dc7dccede28b1423982ea | |
parent | fa55a317e4b33e36b19447187e56df924d4e2eeb (diff) | |
download | cpython-0ffb46261ce56830e3be93d002317f5f037f57f2.zip cpython-0ffb46261ce56830e3be93d002317f5f037f57f2.tar.gz cpython-0ffb46261ce56830e3be93d002317f5f037f57f2.tar.bz2 |
Fixing broken links in doc, part 2: howto/
-rw-r--r-- | Doc/howto/descriptor.rst | 2 | ||||
-rw-r--r-- | Doc/howto/pyporting.rst | 38 | ||||
-rw-r--r-- | Doc/howto/unicode.rst | 4 | ||||
-rw-r--r-- | Doc/howto/urllib2.rst | 6 | ||||
-rw-r--r-- | Doc/howto/webservers.rst | 25 |
5 files changed, 30 insertions, 45 deletions
diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index abedfaa..1a26281 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -133,7 +133,7 @@ Note, in Python 2.2, ``super(B, obj).m()`` would only invoke :meth:`__get__` if invoked unless an old-style class is involved. The implementation details are in :c:func:`super_getattro()` in :source:`Objects/typeobject.c`. -.. _`Guido's Tutorial`: https://www.python.org/2.2.3/descrintro.html#cooperation +.. _`Guido's Tutorial`: https://www.python.org/download/releases/2.2.3/descrintro/#cooperation The details above show that the mechanism for descriptors is embedded in the :meth:`__getattribute__()` methods for :class:`object`, :class:`type`, and diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst index 0452733..109a37b 100644 --- a/Doc/howto/pyporting.rst +++ b/Doc/howto/pyporting.rst @@ -86,11 +86,11 @@ that you can make sure that you detect breakage during the transition. Tests als tend to be simpler than the code they are testing so it gives you an idea of how easy it can be to port code. -Drop support for older Python versions if possible. `Python 2.5`_ +Drop support for older Python versions if possible. Python 2.5 introduced a lot of useful syntax and libraries which have become idiomatic -in Python 3. `Python 2.6`_ introduced future statements which makes +in Python 3. Python 2.6 introduced future statements which makes compatibility much easier if you are going from Python 2 to 3. -`Python 2.7`_ continues the trend in the stdlib. Choose the newest version +Python 2.7 continues the trend in the stdlib. Choose the newest version of Python which you believe can be your minimum support version and work from there. @@ -144,19 +144,19 @@ for you. Support Python 2.7 ////////////////// -As a first step, make sure that your project is compatible with `Python 2.7`_. +As a first step, make sure that your project is compatible with Python 2.7. This is just good to do as Python 2.7 is the last release of Python 2 and thus will be used for a rather long time. It also allows for use of the ``-3`` flag to Python to help discover places in your code where compatibility might be an issue (the ``-3`` flag is in Python 2.6 but Python 2.7 adds more warnings). -Try to Support `Python 2.6`_ and Newer Only -/////////////////////////////////////////// +Try to Support Python 2.6 and Newer Only +//////////////////////////////////////// -While not possible for all projects, if you can support `Python 2.6`_ and newer +While not possible for all projects, if you can support Python 2.6 and newer **only**, your life will be much easier. Various future statements, stdlib additions, etc. exist only in Python 2.6 and later which greatly assist in -supporting Python 3. But if you project must keep support for `Python 2.5`_ then +supporting Python 3. But if you project must keep support for Python 2.5 then it is still possible to simultaneously support Python 3. Below are the benefits you gain if you only have to support Python 2.6 and @@ -215,10 +215,10 @@ Discussed in more detail below, but you should use this future statement to prevent yourself from accidentally using implicit relative imports. -Supporting `Python 2.5`_ and Newer Only -/////////////////////////////////////// +Supporting Python 2.5 and Newer Only +//////////////////////////////////// -If you are supporting `Python 2.5`_ and newer there are still some features of +If you are supporting Python 2.5 and newer there are still some features of Python that you can utilize. @@ -230,11 +230,11 @@ Implicit relative imports (e.g., importing ``spam.bacon`` from within This future statement moves away from that and allows the use of explicit relative imports (e.g., ``from . import bacon``). -In `Python 2.5`_ you must use +In Python 2.5 you must use the __future__ statement to get to use explicit relative imports and prevent -implicit ones. In `Python 2.6`_ explicit relative imports are available without +implicit ones. In Python 2.6 explicit relative imports are available without the statement, but you still want the __future__ statement to prevent implicit -relative imports. In `Python 2.7`_ the __future__ statement is not needed. In +relative imports. In Python 2.7 the __future__ statement is not needed. In other words, unless you are only supporting Python 2.7 or a version earlier than Python 2.5, use this __future__ statement. @@ -261,7 +261,7 @@ In Python 2.5 and earlier the syntax to access the current exception is:: # Current exception is 'exc'. pass -This syntax changed in Python 3 (and backported to `Python 2.6`_ and later) +This syntax changed in Python 3 (and backported to Python 2.6 and later) to:: try: @@ -347,7 +347,7 @@ possibilities: Subclass ``object`` ''''''''''''''''''' -New-style classes have been around since `Python 2.2`_. You need to make sure +New-style classes have been around since Python 2.2. You need to make sure you are subclassing from ``object`` to avoid odd edge cases involving method resolution order, etc. This continues to be totally valid in Python 3 (although unneeded as all classes implicitly inherit from ``object``). @@ -610,12 +610,6 @@ please email the python-porting_ mailing list. .. _modernize: https://github.com/mitsuhiko/python-modernize .. _Porting to Python 3: http://python3porting.com/ .. _PyPI: https://pypi.python.org/ -.. _Python 2.2: https://www.python.org/2.2.x -.. _Python 2.5: https://www.python.org/2.5.x -.. _Python 2.6: https://www.python.org/2.6.x -.. _Python 2.7: https://www.python.org/2.7.x -.. _Python 2.5: https://www.python.org/2.5.x -.. _Python 3.3: https://www.python.org/3.3.x .. _Python 3 Packages: https://pypi.python.org/pypi?:action=browse&c=533&show=all .. _Python 3 Q & A: http://ncoghlan-devs-python-notes.readthedocs.org/en/latest/python3/questions_and_answers.html .. _python-porting: https://mail.python.org/mailman/listinfo/python-porting diff --git a/Doc/howto/unicode.rst b/Doc/howto/unicode.rst index 437f208..407a920 100644 --- a/Doc/howto/unicode.rst +++ b/Doc/howto/unicode.rst @@ -500,7 +500,7 @@ The documentation for the :mod:`codecs` module. Marc-André Lemburg gave a presentation at EuroPython 2002 titled "Python and Unicode". A PDF version of his slides is available at -<http://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf>, and is an +<https://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf>, and is an excellent overview of the design of Python's Unicode features. @@ -687,7 +687,7 @@ References The PDF slides for Marc-André Lemburg's presentation "Writing Unicode-aware Applications in Python" are available at -<http://downloads.egenix.com/python/LSM2005-Developing-Unicode-aware-applications-in-Python.pdf> +<https://downloads.egenix.com/python/LSM2005-Developing-Unicode-aware-applications-in-Python.pdf> and discuss questions of character encodings as well as how to internationalize and localize an application. diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst index 33c08fd..0be740e 100644 --- a/Doc/howto/urllib2.rst +++ b/Doc/howto/urllib2.rst @@ -560,9 +560,7 @@ This document was reviewed and revised by John Lee. .. [#] For an introduction to the CGI protocol see `Writing Web Applications in Python <http://www.pyzine.com/Issue008/Section_Articles/article_CGIOne.html>`_. .. [#] Like Google for example. The *proper* way to use google from a program - is to use `PyGoogle <http://pygoogle.sourceforge.net>`_ of course. See - `Voidspace Google <http://www.voidspace.org.uk/python/recipebook.shtml#google>`_ - for some examples of using the Google API. + is to use `PyGoogle <http://pygoogle.sourceforge.net>`_ of course. .. [#] Browser sniffing is a very bad practise for website design - building sites using web standards is much more sensible. Unfortunately a lot of sites still send different versions to different browsers. @@ -576,5 +574,5 @@ This document was reviewed and revised by John Lee. scripts with a localhost server, I have to prevent urllib2 from using the proxy. .. [#] urllib2 opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe - <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456195>`_. + <http://code.activestate.com/recipes/456195/>`_. diff --git a/Doc/howto/webservers.rst b/Doc/howto/webservers.rst index 6cd5fc1..94a3762 100644 --- a/Doc/howto/webservers.rst +++ b/Doc/howto/webservers.rst @@ -146,7 +146,7 @@ server may not be needed. tutorial also describes the most common gotchas that might arise. * On lighttpd you need to use the `CGI module - <http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModCGI>`_\ , which can be configured + <http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModCGI>`_\ , which can be configured in a straightforward way. It boils down to setting ``cgi.assign`` properly. @@ -210,7 +210,7 @@ mod_python ---------- People coming from PHP often find it hard to grasp how to use Python in the web. -Their first thought is mostly `mod_python <http://www.modpython.org/>`_\ , +Their first thought is mostly `mod_python <http://modpython.org/>`_\ , because they think that this is the equivalent to ``mod_php``. Actually, there are many differences. What ``mod_python`` does is embed the interpreter into the Apache process, thus speeding up requests by not having to start a Python @@ -260,13 +260,6 @@ the latter. These days, FastCGI is never used directly. Just like ``mod_python``, it is only used for the deployment of WSGI applications. -.. seealso:: - - * `FastCGI, SCGI, and Apache: Background and Future - <http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/>`_ - is a discussion on why the concept of FastCGI and SCGI is better than that - of mod_python. - Setting up FastCGI ^^^^^^^^^^^^^^^^^^ @@ -280,8 +273,8 @@ Each web server requires a specific module. to be loaded by Apache. * lighttpd ships its own `FastCGI module - <http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModFastCGI>`_ as well as an - `SCGI module <http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModSCGI>`_. + <http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI>`_ as well as an + `SCGI module <http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModSCGI>`_. * `nginx <http://nginx.org/>`_ also supports `FastCGI <http://wiki.nginx.org/NginxSimplePythonFCGI>`_. @@ -314,7 +307,7 @@ FastCGI access. .. seealso:: There is some documentation on `setting up Django with FastCGI - <http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/>`_, most of + <https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/>`_, most of which can be reused for other WSGI-compliant frameworks and libraries. Only the ``manage.py`` part has to be changed, the example used here can be used instead. Django does more or less the exact same thing. @@ -648,7 +641,7 @@ here. Instead we will briefly touch on some of the most popular. Django ^^^^^^ -`Django <http://www.djangoproject.com/>`_ is a framework consisting of several +`Django <https://www.djangoproject.com/>`_ is a framework consisting of several tightly coupled elements which were written from scratch and work together very well. It includes an ORM which is quite powerful while being simple to use, and has a great online administration interface which makes it possible to edit @@ -661,7 +654,7 @@ which make it possible to create web sites almost without writing any Python cod It has a big, international community, the members of which have created many web sites. There are also a lot of add-on projects which extend Django's normal functionality. This is partly due to Django's well written `online -documentation <http://docs.djangoproject.com/>`_ and the `Django book +documentation <https://docs.djangoproject.com/>`_ and the `Django book <http://www.djangobook.com/>`_. @@ -669,7 +662,7 @@ documentation <http://docs.djangoproject.com/>`_ and the `Django book Although Django is an MVC-style framework, it names the elements differently, which is described in the `Django FAQ - <http://docs.djangoproject.com/en/dev/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names>`_. + <https://docs.djangoproject.com/en/dev/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names>`_. TurboGears @@ -712,7 +705,7 @@ access to these components to the wider Python community. There is even a separate framework based on the Zope components: `Grok <http://grok.zope.org/>`_. -Zope is also the infrastructure used by the `Plone <http://plone.org/>`_ content +Zope is also the infrastructure used by the `Plone <https://plone.org/>`_ content management system, one of the most powerful and popular content management systems available. |