summaryrefslogtreecommitdiff
path: root/docs/narr/upgrading.rst
diff options
context:
space:
mode:
authorMichael Merickel <github@m.merickel.org>2018-08-21 01:44:55 -0500
committerGitHub <noreply@github.com>2018-08-21 01:44:55 -0500
commit820a752645b460ea8009b07a75c752ab09c53dec (patch)
tree14616d81a7abedfe523c057e71ed7b2aca680754 /docs/narr/upgrading.rst
parentdf8598a2658632f709a64e8076cce02ca49de8e6 (diff)
parent254710cb716dccfe536b20d077e3cb79be19c6b3 (diff)
downloadpyramid-820a752645b460ea8009b07a75c752ab09c53dec.tar.gz
pyramid-820a752645b460ea8009b07a75c752ab09c53dec.tar.bz2
pyramid-820a752645b460ea8009b07a75c752ab09c53dec.zip
Merge pull request #3330 from stevepiercy/docs-code-style
Docs code style
Diffstat (limited to 'docs/narr/upgrading.rst')
-rw-r--r--docs/narr/upgrading.rst52
1 files changed, 26 insertions, 26 deletions
diff --git a/docs/narr/upgrading.rst b/docs/narr/upgrading.rst
index 6db61a579..2ca162c46 100644
--- a/docs/narr/upgrading.rst
+++ b/docs/narr/upgrading.rst
@@ -124,7 +124,7 @@ you can see DeprecationWarnings printed to the console when the tests run.
.. code-block:: bash
- $ python -Wd setup.py test -q
+ python -Wd setup.py test -q
The ``-Wd`` argument tells Python to print deprecation warnings to the console.
See `the Python -W flag documentation
@@ -137,19 +137,19 @@ deprecation warning from being issued. For example:
.. code-block:: bash
- $ python -Wd setup.py test -q
- # .. elided ...
- running build_ext
- /home/chrism/projects/pyramid/env27/myproj/myproj/views.py:3:
- DeprecationWarning: static: The "pyramid.view.static" class is deprecated
- as of Pyramid 1.1; use the "pyramid.static.static_view" class instead with
- the "use_subpath" argument set to True.
- from pyramid.view import static
- .
- ----------------------------------------------------------------------
- Ran 1 test in 0.014s
-
- OK
+ python -Wd setup.py test -q
+ # .. elided ...
+ running build_ext
+ /home/chrism/projects/pyramid/env27/myproj/myproj/views.py:3:
+ DeprecationWarning: static: The "pyramid.view.static" class is deprecated
+ as of Pyramid 1.1; use the "pyramid.static.static_view" class instead with
+ the "use_subpath" argument set to True.
+ from pyramid.view import static
+ .
+ ----------------------------------------------------------------------
+ Ran 1 test in 0.014s
+
+ OK
In the above case, it's line #3 in the ``myproj.views`` module (``from
pyramid.view import static``) that is causing the problem:
@@ -178,14 +178,14 @@ console:
.. code-block:: bash
- $ python -Wd setup.py test -q
- # .. elided ...
- running build_ext
- .
- ----------------------------------------------------------------------
- Ran 1 test in 0.014s
-
- OK
+ python -Wd setup.py test -q
+ # .. elided ...
+ running build_ext
+ .
+ ----------------------------------------------------------------------
+ Ran 1 test in 0.014s
+
+ OK
My application doesn't have any tests or has few tests
@@ -197,18 +197,18 @@ deprecation warnings won't be executed.
In this circumstance, you can start your application interactively under a
server run with the ``PYTHONWARNINGS`` environment variable set to ``default``.
-On UNIX, you can do that via:
+On Unix, you can do that via:
.. code-block:: bash
- $ PYTHONWARNINGS=default $VENV/bin/pserve development.ini
+ PYTHONWARNINGS=default $VENV/bin/pserve development.ini
On Windows, you need to issue two commands:
.. code-block:: doscon
- c:\> set PYTHONWARNINGS=default
- c:\> Scripts\pserve development.ini
+ set PYTHONWARNINGS=default
+ Scripts\pserve development.ini
At this point, it's ensured that deprecation warnings will be printed to the
console whenever a codepath is hit that generates one. You can then click