This file is indexed.

/usr/share/doc/python-werkzeug-doc/html/_sources/transition.txt is in python-werkzeug-doc 0.10.4+dfsg1-1ubuntu1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Transition to Werkzeug 1.0
==========================

Werkzeug originally had a magical import system hook that enabled
everything to be imported from one module and still loading the actual
implementations lazily as necessary.  Unfortunately this turned out to be
slow and also unreliable on alternative Python implementations and
Google's App Engine.

Starting with 0.7 we recommend against the short imports and strongly
encourage starting importing from the actual implementation module.
Werkzeug 1.0 will disable the magical import hook completely.

Because finding out where the actual functions are imported and rewriting
them by hand is a painful and boring process we wrote a tool that aids in
making this transition.

Automatically Rewriting Imports
-------------------------------

For instance, with Werkzeug < 0.7 the recommended way to use the escape function
was this::

    from werkzeug import escape

With Werkzeug 0.7, the recommended way to import this function is
directly from the utils module (and with 1.0 this will become mandatory).
To automatically rewrite all imports one can use the
`werkzeug-import-rewrite <http://bit.ly/import-rewrite>`_ script.

You can use it by executing it with Python and with a list of folders with
Werkzeug based code.  It will then spit out a hg/git compatible patch
file.  Example patch file creation::

    $ python werkzeug-import-rewrite.py . > new-imports.udiff

To apply the patch one of the following methods work:

hg:

    ::

        hg import new-imports.udiff

git:

    ::

        git apply new-imports.udiff

patch:

    ::

        patch -p1 < new-imports.udiff

Stop Using Deprecated Things
----------------------------

A few things in Werkzeug will stop being supported and for others, we're
suggesting alternatives even if they will stick around for a longer time.

Do not use:

-   `werkzeug.script`, replace it with custom scripts written with
    `argparse` or something similar.
-   `werkzeug.template`, replace with a proper template engine.
-   `werkzeug.contrib.jsrouting`, stop using URL generation for
    JavaScript, it does not scale well with many public routing.
-   `werkzeug.contrib.kickstart`, replace with hand written code, the
    Werkzeug API became better in general that this is no longer
    necessary.
-   `werkzeug.contrib.testtools`, not useful really.