summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2020-05-31 13:49:19 -0700
committerGitHub <noreply@github.com>2020-05-31 13:49:19 -0700
commitee9b8f2117b626bc782c1895675c85e7f28cdf71 (patch)
tree7cf24738ee29ed8bc2fe18f60658858be3c50ec2
parent412fadefabdddda7481fba1bc86958d2f3d10631 (diff)
parent2847b9f5de5eefe316684b8cd03e70e443fb4b7f (diff)
downloadpyramid-ee9b8f2117b626bc782c1895675c85e7f28cdf71.tar.gz
pyramid-ee9b8f2117b626bc782c1895675c85e7f28cdf71.tar.bz2
pyramid-ee9b8f2117b626bc782c1895675c85e7f28cdf71.zip
Merge pull request #3589 from mirko/doc/add-note-about-venusian-scanning-limitation
Add warning to docs about venusian's limitation of only scanning for *.py files
-rw-r--r--src/pyramid/view.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/pyramid/view.py b/src/pyramid/view.py
index 3911ad375..85fe73afc 100644
--- a/src/pyramid/view.py
+++ b/src/pyramid/view.py
@@ -196,11 +196,27 @@ class view_config:
See also :ref:`mapping_views_using_a_decorator_section` for
details about using :class:`pyramid.view.view_config`.
- .. warning::
+ .. note::
- ``view_config`` will work ONLY on module top level members
- because of the limitation of ``venusian.Scanner.scan``.
+ Because of a limitation of ``venusian.Scanner.scan``, note that
+ ``view_config`` will work only for the following conditions.
+ - In Python packages that have an ``__init__.py`` file in their
+ directory.
+
+ .. seealso::
+
+ See also https://github.com/Pylons/venusian/issues/68
+
+ - On module top level members.
+ - On Python source (``.py``) files.
+ Compiled Python files (``.pyc``, ``.pyo``) without a corresponding
+ source file are ignored.
+
+ .. seealso::
+
+ See also the `Venusian documentation
+ <https://docs.pylonsproject.org/projects/venusian/en/latest/#using-venusian>`_.
"""
venusian = venusian # for testing injection