Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9bdcb3b

Browse files
committed
Fixing broken links in doc, part 2: howto/
1 parent 77fe77d commit 9bdcb3b

6 files changed

Lines changed: 44 additions & 51 deletions

File tree

Doc/howto/curses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ learn more about submitting patches to Python.
543543

544544
* `Writing Programs with NCURSES <http://invisible-island.net/ncurses/ncurses-intro.html>`_:
545545
a lengthy tutorial for C programmers.
546-
* `The ncurses man page <http://www.linuxmanpages.com/man3/ncurses.3x.php>`_
546+
* `The ncurses man page <http://linux.die.net/man/3/ncurses>`_
547547
* `The ncurses FAQ <http://invisible-island.net/ncurses/ncurses.faq.html>`_
548548
* `"Use curses... don't swear" <http://www.youtube.com/watch?v=eN1eZtjLEnU>`_:
549549
video of a PyCon 2013 talk on controlling terminals using curses or Urwid.

Doc/howto/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The implementation details are in :c:func:`super_getattro()` in
127127
:source:`Objects/typeobject.c`. and a pure Python equivalent can be found in
128128
`Guido's Tutorial`_.
129129

130-
.. _`Guido's Tutorial`: https://www.python.org/2.2.3/descrintro.html#cooperation
130+
.. _`Guido's Tutorial`: https://www.python.org/download/releases/2.2.3/descrintro/#cooperation
131131

132132
The details above show that the mechanism for descriptors is embedded in the
133133
:meth:`__getattribute__()` methods for :class:`object`, :class:`type`, and

Doc/howto/pyporting.rst

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ that you can make sure that you detect breakage during the transition. Tests als
8686
tend to be simpler than the code they are testing so it gives you an idea of how
8787
easy it can be to port code.
8888

89-
Drop support for older Python versions if possible. `Python 2.5`_
89+
Drop support for older Python versions if possible. Python 2.5
9090
introduced a lot of useful syntax and libraries which have become idiomatic
91-
in Python 3. `Python 2.6`_ introduced future statements which makes
91+
in Python 3. Python 2.6 introduced future statements which makes
9292
compatibility much easier if you are going from Python 2 to 3.
93-
`Python 2.7`_ continues the trend in the stdlib. Choose the newest version
93+
Python 2.7 continues the trend in the stdlib. Choose the newest version
9494
of Python which you believe can be your minimum support version
9595
and work from there.
9696

@@ -144,19 +144,19 @@ for you.
144144
Support Python 2.7
145145
//////////////////
146146

147-
As a first step, make sure that your project is compatible with `Python 2.7`_.
147+
As a first step, make sure that your project is compatible with Python 2.7.
148148
This is just good to do as Python 2.7 is the last release of Python 2 and thus
149149
will be used for a rather long time. It also allows for use of the ``-3`` flag
150150
to Python to help discover places in your code where compatibility might be an
151151
issue (the ``-3`` flag is in Python 2.6 but Python 2.7 adds more warnings).
152152

153-
Try to Support `Python 2.6`_ and Newer Only
154-
///////////////////////////////////////////
153+
Try to Support Python 2.6 and Newer Only
154+
////////////////////////////////////////
155155

156-
While not possible for all projects, if you can support `Python 2.6`_ and newer
156+
While not possible for all projects, if you can support Python 2.6 and newer
157157
**only**, your life will be much easier. Various future statements, stdlib
158158
additions, etc. exist only in Python 2.6 and later which greatly assist in
159-
supporting Python 3. But if you project must keep support for `Python 2.5`_ then
159+
supporting Python 3. But if you project must keep support for Python 2.5 then
160160
it is still possible to simultaneously support Python 3.
161161

162162
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
215215
prevent yourself from accidentally using implicit relative imports.
216216

217217

218-
Supporting `Python 2.5`_ and Newer Only
219-
///////////////////////////////////////
218+
Supporting Python 2.5 and Newer Only
219+
////////////////////////////////////
220220

221-
If you are supporting `Python 2.5`_ and newer there are still some features of
221+
If you are supporting Python 2.5 and newer there are still some features of
222222
Python that you can utilize.
223223

224224

@@ -230,11 +230,11 @@ Implicit relative imports (e.g., importing ``spam.bacon`` from within
230230
This future statement moves away from that and allows the use of explicit
231231
relative imports (e.g., ``from . import bacon``).
232232

233-
In `Python 2.5`_ you must use
233+
In Python 2.5 you must use
234234
the __future__ statement to get to use explicit relative imports and prevent
235-
implicit ones. In `Python 2.6`_ explicit relative imports are available without
235+
implicit ones. In Python 2.6 explicit relative imports are available without
236236
the statement, but you still want the __future__ statement to prevent implicit
237-
relative imports. In `Python 2.7`_ the __future__ statement is not needed. In
237+
relative imports. In Python 2.7 the __future__ statement is not needed. In
238238
other words, unless you are only supporting Python 2.7 or a version earlier
239239
than Python 2.5, use this __future__ statement.
240240

@@ -261,7 +261,7 @@ In Python 2.5 and earlier the syntax to access the current exception is::
261261
# Current exception is 'exc'.
262262
pass
263263

264-
This syntax changed in Python 3 (and backported to `Python 2.6`_ and later)
264+
This syntax changed in Python 3 (and backported to Python 2.6 and later)
265265
to::
266266

267267
try:
@@ -347,7 +347,7 @@ possibilities:
347347
Subclass ``object``
348348
'''''''''''''''''''
349349

350-
New-style classes have been around since `Python 2.2`_. You need to make sure
350+
New-style classes have been around since Python 2.2. You need to make sure
351351
you are subclassing from ``object`` to avoid odd edge cases involving method
352352
resolution order, etc. This continues to be totally valid in Python 3 (although
353353
unneeded as all classes implicitly inherit from ``object``).
@@ -610,12 +610,6 @@ please email the python-porting_ mailing list.
610610
.. _modernize: https://github.com/mitsuhiko/python-modernize
611611
.. _Porting to Python 3: http://python3porting.com/
612612
.. _PyPI: https://pypi.python.org/
613-
.. _Python 2.2: https://www.python.org/2.2.x
614-
.. _Python 2.5: https://www.python.org/2.5.x
615-
.. _Python 2.6: https://www.python.org/2.6.x
616-
.. _Python 2.7: https://www.python.org/2.7.x
617-
.. _Python 2.5: https://www.python.org/2.5.x
618-
.. _Python 3.3: https://www.python.org/3.3.x
619613
.. _Python 3 Packages: https://pypi.python.org/pypi?:action=browse&c=533&show=all
620614
.. _Python 3 Q & A: http://ncoghlan-devs-python-notes.readthedocs.org/en/latest/python3/questions_and_answers.html
621615
.. _python-porting: https://mail.python.org/mailman/listinfo/python-porting

Doc/howto/unicode.rst

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,11 @@ The documentation for the :mod:`unicodedata` module.
493493

494494
The documentation for the :mod:`codecs` module.
495495

496-
Marc-André Lemburg gave `a presentation titled "Python and Unicode" (PDF slides) <http://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf>`_ at
497-
EuroPython 2002. The slides are an excellent overview of the design
498-
of Python 2's Unicode features (where the Unicode string type is
499-
called ``unicode`` and literals start with ``u``).
496+
Marc-André Lemburg gave `a presentation titled "Python and Unicode" (PDF slides)
497+
<https://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf>`_ at
498+
EuroPython 2002. The slides are an excellent overview of the design of Python
499+
2's Unicode features (where the Unicode string type is called ``unicode`` and
500+
literals start with ``u``).
500501

501502

502503
Reading and Writing Unicode Data
@@ -696,13 +697,20 @@ encoding the data and writing it back out.
696697
References
697698
----------
698699

699-
One section of `Mastering Python 3 Input/Output <http://pyvideo.org/video/289/pycon-2010--mastering-python-3-i-o>`_, a PyCon 2010 talk by David Beazley, discusses text processing and binary data handling.
700+
One section of `Mastering Python 3 Input/Output
701+
<http://pyvideo.org/video/289/pycon-2010--mastering-python-3-i-o>`_,
702+
a PyCon 2010 talk by David Beazley, discusses text processing and binary data handling.
700703

701-
The `PDF slides for Marc-André Lemburg's presentation "Writing Unicode-aware Applications in Python" <http://downloads.egenix.com/python/LSM2005-Developing-Unicode-aware-applications-in-Python.pdf>`_
704+
The `PDF slides for Marc-André Lemburg's presentation "Writing Unicode-aware
705+
Applications in Python"
706+
<https://downloads.egenix.com/python/LSM2005-Developing-Unicode-aware-applications-in-Python.pdf>`_
702707
discuss questions of character encodings as well as how to internationalize
703708
and localize an application. These slides cover Python 2.x only.
704709

705-
`The Guts of Unicode in Python <http://pyvideo.org/video/1768/the-guts-of-unicode-in-python>`_ is a PyCon 2013 talk by Benjamin Peterson that discusses the internal Unicode representation in Python 3.3.
710+
`The Guts of Unicode in Python
711+
<http://pyvideo.org/video/1768/the-guts-of-unicode-in-python>`_
712+
is a PyCon 2013 talk by Benjamin Peterson that discusses the internal Unicode
713+
representation in Python 3.3.
706714

707715

708716
Acknowledgements

Doc/howto/urllib2.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,7 @@ Footnotes
573573
This document was reviewed and revised by John Lee.
574574

575575
.. [#] Like Google for example. The *proper* way to use google from a program
576-
is to use `PyGoogle <http://pygoogle.sourceforge.net>`_ of course. See
577-
`Voidspace Google <http://www.voidspace.org.uk/python/recipebook.shtml#google>`_
578-
for some examples of using the Google API.
576+
is to use `PyGoogle <http://pygoogle.sourceforge.net>`_ of course.
579577
.. [#] Browser sniffing is a very bad practise for website design - building
580578
sites using web standards is much more sensible. Unfortunately a lot of
581579
sites still send different versions to different browsers.
@@ -589,5 +587,5 @@ This document was reviewed and revised by John Lee.
589587
scripts with a localhost server, I have to prevent urllib from using
590588
the proxy.
591589
.. [#] urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe
592-
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456195>`_.
590+
<http://code.activestate.com/recipes/456195/>`_.
593591

Doc/howto/webservers.rst

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ server may not be needed.
146146
tutorial also describes the most common gotchas that might arise.
147147

148148
* On lighttpd you need to use the `CGI module
149-
<http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModCGI>`_\ , which can be configured
149+
<http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModCGI>`_\ , which can be configured
150150
in a straightforward way. It boils down to setting ``cgi.assign`` properly.
151151

152152

@@ -210,7 +210,7 @@ mod_python
210210
----------
211211

212212
People coming from PHP often find it hard to grasp how to use Python in the web.
213-
Their first thought is mostly `mod_python <http://www.modpython.org/>`_\ ,
213+
Their first thought is mostly `mod_python <http://modpython.org/>`_\ ,
214214
because they think that this is the equivalent to ``mod_php``. Actually, there
215215
are many differences. What ``mod_python`` does is embed the interpreter into
216216
the Apache process, thus speeding up requests by not having to start a Python
@@ -260,13 +260,6 @@ the latter.
260260
These days, FastCGI is never used directly. Just like ``mod_python``, it is only
261261
used for the deployment of WSGI applications.
262262

263-
.. seealso::
264-
265-
* `FastCGI, SCGI, and Apache: Background and Future
266-
<http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/>`_
267-
is a discussion on why the concept of FastCGI and SCGI is better than that
268-
of mod_python.
269-
270263

271264
Setting up FastCGI
272265
^^^^^^^^^^^^^^^^^^
@@ -280,8 +273,8 @@ Each web server requires a specific module.
280273
to be loaded by Apache.
281274

282275
* lighttpd ships its own `FastCGI module
283-
<http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModFastCGI>`_ as well as an
284-
`SCGI module <http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModSCGI>`_.
276+
<http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI>`_ as well as an
277+
`SCGI module <http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModSCGI>`_.
285278

286279
* `nginx <http://nginx.org/>`_ also supports `FastCGI
287280
<http://wiki.nginx.org/NginxSimplePythonFCGI>`_.
@@ -315,7 +308,7 @@ FastCGI access.
315308
.. seealso::
316309

317310
There is some documentation on `setting up Django with FastCGI
318-
<http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/>`_, most of
311+
<https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/>`_, most of
319312
which can be reused for other WSGI-compliant frameworks and libraries.
320313
Only the ``manage.py`` part has to be changed, the example used here can be
321314
used instead. Django does more or less the exact same thing.
@@ -644,7 +637,7 @@ here. Instead we will briefly touch on some of the most popular.
644637
Django
645638
^^^^^^
646639

647-
`Django <http://www.djangoproject.com/>`_ is a framework consisting of several
640+
`Django <https://www.djangoproject.com/>`_ is a framework consisting of several
648641
tightly coupled elements which were written from scratch and work together very
649642
well. It includes an ORM which is quite powerful while being simple to use,
650643
and has a great online administration interface which makes it possible to edit
@@ -657,15 +650,15 @@ which make it possible to create web sites almost without writing any Python cod
657650
It has a big, international community, the members of which have created many
658651
web sites. There are also a lot of add-on projects which extend Django's normal
659652
functionality. This is partly due to Django's well written `online
660-
documentation <http://docs.djangoproject.com/>`_ and the `Django book
653+
documentation <https://docs.djangoproject.com/>`_ and the `Django book
661654
<http://www.djangobook.com/>`_.
662655

663656

664657
.. note::
665658

666659
Although Django is an MVC-style framework, it names the elements
667660
differently, which is described in the `Django FAQ
668-
<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>`_.
661+
<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>`_.
669662

670663

671664
TurboGears
@@ -708,7 +701,7 @@ access to these components to the wider Python community. There is even a
708701
separate framework based on the Zope components: `Grok
709702
<http://grok.zope.org/>`_.
710703

711-
Zope is also the infrastructure used by the `Plone <http://plone.org/>`_ content
704+
Zope is also the infrastructure used by the `Plone <https://plone.org/>`_ content
712705
management system, one of the most powerful and popular content management
713706
systems available.
714707

0 commit comments

Comments
 (0)