Skip to content

Commit

Permalink
Merge branch 'master' into feature/require-csrf
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerickel committed Apr 13, 2016
2 parents 769da12 + b1527e7 commit 231a531
Show file tree
Hide file tree
Showing 213 changed files with 2,864 additions and 1,994 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Expand Up @@ -4,8 +4,6 @@ sudo: false

matrix:
include:
- python: 2.6
env: TOXENV=py26
- python: 2.7
env: TOXENV=py27
- python: 3.3
Expand Down
20 changes: 20 additions & 0 deletions CHANGES.txt
@@ -1,6 +1,26 @@
unreleased
==========

- A new event and interface (BeforeTraversal) has been introduced that will
notify listeners before traversal starts in the router. See
https://github.com/Pylons/pyramid/pull/2469 and
https://github.com/Pylons/pyramid/pull/1876

- Python 2.6 is no longer supported by Pyramid. See
https://github.com/Pylons/pyramid/issues/2368

- A complete overhaul of the docs:

- Use pip instead of easy_install.
- Become opinionated by preferring Python 3.4 or greater to simplify
installation of Python and its required packaging tools.
- Use venv for the tool, and virtual environment for the thing created,
instead of virtualenv.
- Use py.test and pytest-cov instead of nose and coverage.
- Further updates to the scaffolds as well as tutorials and their src files.

See https://github.com/Pylons/pyramid/pull/2468

- A complete overhaul of the ``alchemy`` scaffold as well as the
Wiki2 SQLAlchemy + URLDispatch tutorial to introduce more modern features
into the usage of SQLAlchemy with Pyramid and provide a better starting
Expand Down
2 changes: 2 additions & 0 deletions docs/api/events.rst
Expand Up @@ -21,6 +21,8 @@ Event Types

.. autoclass:: ContextFound

.. autoclass:: BeforeTraversal

.. autoclass:: NewResponse

.. autoclass:: BeforeRender
Expand Down
3 changes: 3 additions & 0 deletions docs/api/interfaces.rst
Expand Up @@ -17,6 +17,9 @@ Event-Related Interfaces
.. autointerface:: IContextFound
:members:

.. autointerface:: IBeforeTraversal
:members:

.. autointerface:: INewResponse
:members:

Expand Down
3 changes: 1 addition & 2 deletions docs/conf.py
Expand Up @@ -66,8 +66,7 @@ def nothing(*arg):
'deform': ('http://docs.pylonsproject.org/projects/deform/en/latest', None),
'jinja2': ('http://docs.pylonsproject.org/projects/pyramid-jinja2/en/latest/', None),
'pylonswebframework': ('http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/', None),
'python': ('http://docs.python.org', None),
'python3': ('http://docs.python.org/3', None),
'python': ('https://docs.python.org/3', 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),
Expand Down
4 changes: 2 additions & 2 deletions docs/conventions.rst
Expand Up @@ -57,7 +57,7 @@ character, e.g.:
$ $VENV/bin/nosetests
(See :term:`virtualenv` for the meaning of ``$VENV``)
(See :term:`venv` for the meaning of ``$VENV``)

Example blocks representing Windows ``cmd.exe`` commands are prefixed with a
drive letter and/or a directory name, e.g.:
Expand All @@ -66,7 +66,7 @@ drive letter and/or a directory name, e.g.:
c:\examples> %VENV%\Scripts\nosetests
(See :term:`virtualenv` for the meaning of ``%VENV%``)
(See :term:`venv` for the meaning of ``%VENV%``)

Sometimes, when it's unknown which directory is current, Windows ``cmd.exe``
example block commands are prefixed only with a ``>`` character, e.g.:
Expand Down
34 changes: 29 additions & 5 deletions docs/glossary.rst
Expand Up @@ -155,9 +155,9 @@ Glossary
request before it returns a :term:`context` resource.

virtualenv
A term referring both to an isolated Python environment,
or `the leading tool <http://www.virtualenv.org>`_ that allows one to
create such environments.
The `virtualenv tool <https://virtualenv.pypa.io/en/latest/>`_ that allows
one to create virtual environments. In Python 3.3 and greater,
:term:`venv` is the preferred tool.

Note: whenever you encounter commands prefixed with ``$VENV`` (Unix)
or ``%VENV`` (Windows), know that that is the environment variable whose
Expand Down Expand Up @@ -1012,8 +1012,8 @@ Glossary

console script
A script written to the ``bin`` (on UNIX, or ``Scripts`` on Windows)
directory of a Python installation or :term:`virtualenv` as the result of
running ``setup.py install`` or ``setup.py develop``.
directory of a Python installation or :term:`virtual environment` as the
result of running ``pip install`` or ``pip install -e .``.

introspector
An object with the methods described by
Expand Down Expand Up @@ -1106,3 +1106,27 @@ Glossary
falsey string
A string represeting a value of ``False``. Acceptable values are
``f``, ``false``, ``n``, ``no``, ``off`` and ``0``.

pip
The `Python Packaging Authority's <https://www.pypa.io/>`_ recommended
tool for installing Python packages.

pyvenv
The Python Packaging Authority formerly recommended using this command
for `creating virtual environments on Python 3.4 and 3.5
<https://packaging.python.org/en/latest/installing/#creating-virtual-environments>`_,
but it is deprecated in 3.6 in favor of ``python3 -m venv`` on UNIX or
``python -m venv`` on Windows, which is backward compatible on Python
3.3 and greater.

virtual environment
An isolated Python environment that allows packages to be installed for
use by a particular application, rather than being installed system wide.

venv
The `Python Packaging Authority's <https://www.pypa.io/>`_ recommended
tool for creating virtual environments on Python 3.3 and greater.

Note: whenever you encounter commands prefixed with ``$VENV`` (Unix)
or ``%VENV`` (Windows), know that that is the environment variable whose
value is the root of the virtual environment in question.
11 changes: 11 additions & 0 deletions docs/narr/MyProject/README.txt
@@ -1 +1,12 @@
MyProject README
==================

Getting Started
---------------

- cd <directory containing this file>

- $VENV/bin/pip install -e .

- $VENV/bin/pserve development.ini

4 changes: 2 additions & 2 deletions docs/narr/MyProject/development.ini
@@ -1,6 +1,6 @@
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html
###

[app:main]
Expand Down Expand Up @@ -29,7 +29,7 @@ port = 6543

###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html
###

[loggers]
Expand Down
1 change: 0 additions & 1 deletion docs/narr/MyProject/myproject/static/theme.min.css

This file was deleted.

6 changes: 3 additions & 3 deletions docs/narr/MyProject/myproject/templates/mytemplate.pt
Expand Up @@ -34,15 +34,15 @@
<div class="col-md-10">
<div class="content">
<h1><span class="font-semi-bold">Pyramid</span> <span class="smaller">Starter scaffold</span></h1>
<p class="lead">Welcome to <span class="font-normal">${project}</span>, an&nbsp;application generated&nbsp;by<br>the <span class="font-normal">Pyramid Web Framework 1.6b2</span>.</p>
<p class="lead">Welcome to <span class="font-normal">${project}</span>, an&nbsp;application generated&nbsp;by<br>the <span class="font-normal">Pyramid Web Framework 1.7</span>.</p>
</div>
</div>
</div>
<div class="row">
<div class="links">
<ul>
<li class="current-version">Generated by v1.6b2</li>
<li><i class="glyphicon glyphicon-bookmark icon-muted"></i><a href="http://docs.pylonsproject.org/projects/pyramid/en/1.6-branch/">Docs</a></li>
<li class="current-version">Generated by v1.7</li>
<li><i class="glyphicon glyphicon-bookmark icon-muted"></i><a href="http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/">Docs</a></li>
<li><i class="glyphicon glyphicon-cog icon-muted"></i><a href="https://github.com/Pylons/pyramid">Github Project</a></li>
<li><i class="glyphicon glyphicon-globe icon-muted"></i><a href="irc://irc.freenode.net#pyramid">IRC Channel</a></li>
<li><i class="glyphicon glyphicon-home icon-muted"></i><a href="http://pylonsproject.org">Pylons Project</a></li>
Expand Down
2 changes: 1 addition & 1 deletion docs/narr/MyProject/myproject/tests.py
Expand Up @@ -26,4 +26,4 @@ def setUp(self):

def test_root(self):
res = self.testapp.get('/', status=200)
self.assertTrue('Pyramid' in res.body)
self.assertTrue(b'Pyramid' in res.body)
4 changes: 2 additions & 2 deletions docs/narr/MyProject/production.ini
@@ -1,6 +1,6 @@
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html
###

[app:main]
Expand All @@ -23,7 +23,7 @@ port = 6543

###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html
###

[loggers]
Expand Down
21 changes: 14 additions & 7 deletions docs/narr/MyProject/setup.py
Expand Up @@ -15,26 +15,33 @@
'waitress',
]

tests_require = [
'WebTest >= 1.3.1', # py3 compat
'pytest', # includes virtualenv
'pytest-cov',
]

setup(name='MyProject',
version='0.0',
description='MyProject',
long_description=README + '\n\n' + CHANGES,
classifiers=[
"Programming Language :: Python",
"Framework :: Pyramid",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
"Programming Language :: Python",
"Framework :: Pyramid",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
author='',
author_email='',
url='',
keywords='web pyramid pylons',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
extras_require={
'testing': tests_require,
},
install_requires=requires,
tests_require=requires,
test_suite="myproject",
entry_points="""\
[paste.app_factory]
main = myproject:main
Expand Down

0 comments on commit 231a531

Please sign in to comment.