Permalink
Browse files

Merge branch 'master' into pr/2853

  • Loading branch information...
2 parents 3c5731a + 8dfa640 commit 12a11daa6a29c36488f083ec7323ad1d91f11b8b @mmerickel mmerickel committed Dec 14, 2016
Showing with 2,027 additions and 193 deletions.
  1. +17 −0 CHANGES.txt
  2. +2 −0 CONTRIBUTORS.txt
  3. +1 −0 docs/api/i18n.rst
  4. +7 −2 docs/conf.py
  5. +0 −107 docs/conventions.rst
  6. +4 −3 docs/index.rst
  7. +1 −1 docs/latexindex.rst
  8. +22 −0 docs/narr/project.rst
  9. +1,258 −0 docs/style-guide.rst
  10. +38 −3 docs/tutorials/wiki/authorization.rst
  11. +1 −0 docs/tutorials/wiki/definingviews.rst
  12. +1 −0 docs/tutorials/wiki/src/authorization/setup.py
  13. +15 −2 docs/tutorials/wiki/src/authorization/tutorial/security.py
  14. +2 −2 docs/tutorials/wiki/src/authorization/tutorial/views.py
  15. +1 −0 docs/tutorials/wiki/src/tests/setup.py
  16. +15 −2 docs/tutorials/wiki/src/tests/tutorial/security.py
  17. +11 −0 docs/tutorials/wiki/src/tests/tutorial/tests.py
  18. +2 −2 docs/tutorials/wiki/src/tests/tutorial/views.py
  19. +1 −0 docs/tutorials/wiki2/src/tests/tutorial/scripts/initializedb.py
  20. +12 −0 docs/tutorials/wiki2/src/tests/tutorial/tests/test_functional.py
  21. +20 −0 docs/tutorials/wiki2/src/tests/tutorial/tests/test_initdb.py
  22. +21 −0 docs/tutorials/wiki2/src/tests/tutorial/tests/test_security.py
  23. +67 −0 docs/tutorials/wiki2/src/tests/tutorial/tests/test_user_model.py
  24. +338 −0 docs/typographical-conventions.rst
  25. +1 −1 docs/whatsnew-1.7.rst
  26. +1 −1 pyramid/httpexceptions.py
  27. +11 −1 pyramid/i18n.py
  28. +1 −1 pyramid/scaffolds/starter/+package+/__init__.py
  29. +7 −8 pyramid/scaffolds/starter/+package+/templates/{mytemplate.pt_tmpl → layout.jinja2_tmpl}
  30. +8 −0 pyramid/scaffolds/starter/+package+/templates/mytemplate.jinja2_tmpl
  31. +1 −1 pyramid/scaffolds/starter/+package+/views.py_tmpl
  32. +1 −1 pyramid/scaffolds/starter/MANIFEST.in_tmpl
  33. +1 −1 pyramid/scaffolds/starter/setup.py_tmpl
  34. +15 −1 pyramid/scripts/pcreate.py
  35. +56 −34 pyramid/scripts/pserve.py
  36. +30 −0 pyramid/tests/test_i18n.py
  37. +5 −3 pyramid/tests/test_scripts/dummy.py
  38. +5 −5 pyramid/tests/test_scripts/test_pcreate.py
  39. +25 −8 pyramid/tests/test_scripts/test_pserve.py
  40. +1 −2 scaffoldtests.sh
  41. +1 −1 setup.py
View
@@ -122,6 +122,16 @@ Features
See https://github.com/Pylons/pyramid/pull/2805
+- A new ``[pserve]`` section is supported in your config files with a
+ ``watch_files`` key that can configure ``pserve --reload`` to monitor custom
+ file paths. See https://github.com/Pylons/pyramid/pull/2827
+
+- Allow streaming responses to be made from subclasses of
+ ``pyramid.httpexceptions.HTTPException``. Previously the response would
+ be unrolled while testing for a body, making it impossible to stream
+ a response.
+ See https://github.com/Pylons/pyramid/pull/2863
+
Bug Fixes
---------
@@ -152,11 +162,18 @@ Bug Fixes
from previous orders have executed.
See https://github.com/Pylons/pyramid/pull/2757
+- Fix bug in i18n where the default domain would always use the Germanic plural
+ style, even if a different plural function is defined in the relevant
+ messages file. See https://github.com/Pylons/pyramid/pull/2859
+
Deprecations
------------
Documentation Changes
---------------------
+- Replace Typographical Conventions with an enhanced Style Guide.
+ https://github.com/Pylons/pyramid/pull/2838
+
- Add pyramid_nacl_session to session factories.
See https://github.com/Pylons/pyramid/issues/2791
View
@@ -285,6 +285,8 @@ Contributors
- Keith Yang, 2016/07/22
+- Hannah Krager, 2016/10/22
+
- Moriyoshi Koizumi, 2016/11/20
- Mikko Ohtamaa, 2016/12/6
View
@@ -6,6 +6,7 @@
.. automodule:: pyramid.i18n
.. autoclass:: TranslationString
+ :noindex:
.. autofunction:: TranslationStringFactory
View
@@ -51,9 +51,10 @@ def nothing(*arg):
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
- 'repoze.sphinx.autointerface',
- 'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
+ 'sphinx.ext.todo',
+ 'sphinx.ext.viewcode',
+ 'repoze.sphinx.autointerface',
'sphinxcontrib.programoutput',
# enable pylons_sphinx_latesturl when this branch is no longer "latest"
# 'pylons_sphinx_latesturl',
@@ -68,6 +69,7 @@ def nothing(*arg):
'pylonswebframework': ('http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/', None),
'python': ('https://docs.python.org/3', None),
'pytest': ('http://pytest.org/latest/', None),
+ 'sphinx': ('http://www.sphinx-doc.org/en/latest', None),
'sqla': ('http://docs.sqlalchemy.org/en/latest', None),
'tm': ('http://docs.pylonsproject.org/projects/pyramid-tm/en/latest/', None),
'toolbar': ('http://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest', None),
@@ -119,6 +121,9 @@ def nothing(*arg):
# unit titles (such as .. function::).
add_module_names = False
+# Add support for todo items
+todo_include_todos = True
+
# The name of the Pygments (syntax highlighting) style to use.
#pygments_style = book and 'bw' or 'tango'
if book:
View
@@ -1,107 +0,0 @@
-Typographical Conventions
-=========================
-
-Literals, filenames, and function arguments are presented using the
-following style:
-
- ``argument1``
-
-Warnings which represent limitations and need-to-know information
-related to a topic or concept are presented in the following style:
-
- .. warning::
-
- This is a warning.
-
-Notes which represent additional information related to a topic or
-concept are presented in the following style:
-
- .. note::
-
- This is a note.
-
-We present Python method names using the following style:
-
- :meth:`pyramid.config.Configurator.add_view`
-
-We present Python class names, module names, attributes, and global
-variables using the following style:
-
- :class:`pyramid.config.Configurator.registry`
-
-References to glossary terms are presented using the following style:
-
- :term:`Pylons`
-
-URLs are presented using the following style:
-
- `Pylons <http://www.pylonsproject.org>`_
-
-References to sections and chapters are presented using the following
-style:
-
- :ref:`traversal_chapter`
-
-Code and configuration file blocks are presented in the following style:
-
- .. code-block:: python
- :linenos:
-
- def foo(abc):
- pass
-
-Example blocks representing UNIX shell commands are prefixed with a ``$``
-character, e.g.:
-
- .. code-block:: bash
-
- $ $VENV/bin/py.test -q
-
-See :term:`venv` for the meaning of ``$VENV``.
-
-Example blocks representing Windows commands are prefixed with a drive letter
-with an optional directory name, e.g.:
-
- .. code-block:: doscon
-
- c:\examples> %VENV%\Scripts\py.test -q
-
-See :term:`venv` for the meaning of ``%VENV%``.
-
-When a command that should be typed on one line is too long to fit on a page,
-the backslash ``\`` is used to indicate that the following printed line should
-be part of the command:
-
- .. code-block:: bash
-
- $VENV/bin/py.test tutorial/tests.py --cov-report term-missing \
- --cov=tutorial -q
-
-A sidebar, which presents a concept tangentially related to content discussed
-on a page, is rendered like so:
-
-.. sidebar:: This is a sidebar
-
- Sidebar information.
-
-When multiple objects are imported from the same package, the following
-convention is used:
-
- .. code-block:: python
-
- from foo import (
- bar,
- baz,
- )
-
-It may look unusual, but it has advantages:
-
-* It allows one to swap out the higher-level package ``foo`` for something else
- that provides the similar API. An example would be swapping out one database
- for another (e.g., graduating from SQLite to PostgreSQL).
-
-* Looks more neat in cases where a large number of objects get imported from
- that package.
-
-* Adding or removing imported objects from the package is quicker and results
- in simpler diffs.
View
@@ -213,13 +213,14 @@ Copyright, Trademarks, and Attributions
copyright
-Typographical Conventions
-=========================
+Typographical Conventions and Style Guide
+=========================================
.. toctree::
:maxdepth: 1
- conventions
+ typographical-conventions
+ style-guide
Index and Glossary
View
@@ -15,7 +15,7 @@ Front Matter
:maxdepth: 1
copyright
- conventions
+ style-guide
authorintro
designdefense
View
@@ -1067,3 +1067,25 @@ hard drive, you should install the
`watchdog <http://pythonhosted.org/watchdog/>` package in development.
``hupper`` will automatically use ``watchdog`` to more efficiently poll the
filesystem.
+
+Monitoring Custom Files
+~~~~~~~~~~~~~~~~~~~~~~~
+
+By default, ``pserve --reload`` will monitor all imported Python code
+(everything in ``sys.modules``) as well as the config file passed to
+``pserve`` (e.g. ``development.ini``). You can instruct ``pserve`` to watch
+other files for changes as well by defining a ``[pserve]`` section in your
+configuration file. For example, let's say your application loads the
+``favicon.ico`` file at startup and stores it in memory to efficiently
+serve it many times. When you change it you want ``pserve`` to restart:
+
+.. code-block:: ini
+
+ [pserve]
+ watch_files =
+ myapp/static/favicon.ico
+
+Paths may be absolute or relative to the configuration file. They may also
+be an :term:`asset specification`. These paths are passed to ``hupper`` which
+has some basic support for globbing. Acceptable glob patterns depend on the
+version of Python being used.
Oops, something went wrong.

0 comments on commit 12a11da

Please sign in to comment.