Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into wiki2-request-ide…
Browse files Browse the repository at this point in the history
…ntity
  • Loading branch information
luhn committed Dec 11, 2020
2 parents 86cb46d + 6cf061e commit 43bd1a1
Show file tree
Hide file tree
Showing 24 changed files with 425 additions and 216 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
strategy:
matrix:
py:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "pypy3"
os:
- "ubuntu-latest"
Expand Down
38 changes: 20 additions & 18 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ unreleased
Features
--------

- The ``aslist`` method now handles non-string object when flattening.
- Add support for Python 3.9.
See https://github.com/Pylons/pyramid/issues/3622

- The ``aslist`` method now handles non-string objects when flattening.
See https://github.com/Pylons/pyramid/pull/3594

- It is now possible to pass multiple values to the ``header`` predicate
Expand All @@ -17,11 +20,11 @@ Features
- New security APIs have been added to support a massive overhaul of the
authentication and authorization system. Read
"Upgrading Authentication/Authorization" in the "What's New in Pyramid 2.0"
document for information about using this new system.
chapter of the documentation for information about using this new system.

- ``pyramid.config.Configurator.set_security_policy``.
- ``pyramid.interfaces.ISecurityPolicy``
- ``pyramid.request.Request.authenticated_identity``.
- ``pyramid.request.Request.identity``.
- ``pyramid.request.Request.is_authenticated``
- ``pyramid.authentication.SessionAuthenticationHelper``
- ``pyramid.authorization.ACLHelper``
Expand All @@ -34,8 +37,8 @@ Features
``pyramid.session.SignedCookieSessionFactory`` to use
``pyramid.session.JSONSerializer`` instead of
``pyramid.session.PickleSerializer``. Read
"Changes to ISession in Pyramid 2.0" in the "Sessions" chapter of the
documentation for more information about why this change was made.
"Upgrading Session Serialization" in the "What's New in Pyramid 2.0" chapter
of the documentation for more information about why this change was made.
See https://github.com/Pylons/pyramid/pull/3413

- It is now possible to control whether a route pattern contains a trailing
Expand Down Expand Up @@ -131,9 +134,9 @@ Deprecations

- Deprecated the authentication and authorization interfaces and
principal-based support. See "Upgrading Authentication/Authorization" in
the "What's New in Pyramid 2.0" document for information on equivalent APIs
and notes on upgrading. The following APIs are deprecated as a result of
this change:
the "What's New in Pyramid 2.0" chapter of the documentation for information
on equivalent APIs and notes on upgrading. The following APIs are deprecated
as a result of this change:

- ``pyramid.config.Configurator.set_authentication_policy``
- ``pyramid.config.Configurator.set_authorization_policy``
Expand Down Expand Up @@ -171,18 +174,17 @@ Deprecations
See https://github.com/Pylons/pyramid/pull/3563

- Deprecated ``pyramid.session.PickleSerializer``.
See https://github.com/pylons/pyramid/issues/2709
and https://github.com/pylons/pyramid/pull/3353
See https://github.com/pylons/pyramid/issues/2709,
and https://github.com/pylons/pyramid/pull/3353,
and https://github.com/pylons/pyramid/pull/3413

Backward Incompatibilities
--------------------------

- Drop support for Python 2.7.
https://github.com/Pylons/pyramid/pull/3421

- Drop support for Python 3.4.
See https://github.com/Pylons/pyramid/pull/3547
- Drop support for Python 2.7, 3.4, and 3.5.
See https://github.com/Pylons/pyramid/pull/3421,
and https://github.com/Pylons/pyramid/pull/3547,
and https://github.com/Pylons/pyramid/pull/3634

- Removed the ``pyramid.compat`` module. Integrators should use the ``six``
module or vendor shims they are using into their own codebases going forward.
Expand Down Expand Up @@ -234,9 +236,9 @@ Backward Incompatibilities
- Changed the default ``serializer`` on
``pyramid.session.SignedCookieSessionFactory`` to use
``pyramid.session.JSONSerializer`` instead of
``pyramid.session.PickleSerializer``. Read
"Changes to ISession in Pyramid 2.0" in the "Sessions" chapter of the
documentation for more information about why this change was made.
``pyramid.session.PickleSerializer``. Read "Upgrading Session Serialization"
in the "What's New in Pyramid 2.0" chapter of the documentation for more
information about why this change was made.
See https://github.com/Pylons/pyramid/pull/3413

- ``pyramid.request.Request.invoke_exception_view`` will no longer be called
Expand Down
8 changes: 4 additions & 4 deletions HACKING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ In order to add a feature to Pyramid:
- The feature must be documented in both the API and narrative documentation
(in `docs/`).

- The feature must work fully on the following CPython versions: 3.5, 3.6, 3.7, and 3.8 on both UNIX and Windows.
- The feature must work fully on the following CPython versions: 3.6, 3.7, 3.8, and 3.9 on both UNIX and Windows.

- The feature must work on the latest version of PyPy3.

Expand Down Expand Up @@ -80,9 +80,9 @@ Running Tests

$ $TOX -e py

To run `tox` for Python 3.8 explicitly, you may use:
To run `tox` for Python 3.9 explicitly, you may use:

$ $TOX -e py38
$ $TOX -e py39

- To run individual tests (i.e., during development), you can use `pytest`
syntax as follows, where `$VENV` is an environment variable set to the path
Expand All @@ -103,7 +103,7 @@ Test Coverage
-------------

- The codebase *must* have 100% test statement coverage after each commit. You
can test coverage via `tox -e py38`.
can test coverage via `tox -e py39`.


Documentation Coverage and Building HTML Documentation
Expand Down
26 changes: 12 additions & 14 deletions RELEASING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,15 @@ Update previous version (final releases only)
- Configure RTD to point the "latest" alias to the new release version of the
docs.


Cookiecutters
-------------

- For each cookiecutter, clone the newly released branch to "latest" branch.


Marketing and communications
----------------------------

- Edit Pylons/trypyramid.com/src/templates/documentation.ejs for major
- Edit Pylons/trypyramid.com/layouts/page/documentation.html for major
releases, pre-releases, and once pre-releases are final.

- Edit `https://wiki.python.org/moin/WebFrameworks
Expand All @@ -142,17 +140,17 @@ Marketing and communications
- Announce to Twitter.

```
Pyramid 1.x released.
Pyramid 2.x released.

PyPI
https://pypi.org/project/pyramid/1.x/
https://pypi.org/project/pyramid/2.x/

=== One time only for new version, first pre-release ===
What's New
https://docs.pylonsproject.org/projects/pyramid/en/1.X-branch/whatsnew-1.X.html
https://docs.pylonsproject.org/projects/pyramid/en/2.X-branch/whatsnew-2.X.html
=== For all subsequent pre-releases ===
Changes
https://docs.pylonsproject.org/projects/pyramid/en/1.X-branch/changes.html#version-yyyy-mm-dd
https://docs.pylonsproject.org/projects/pyramid/en/2.X-branch/changes.html#version-yyyy-mm-dd

Issues
https://github.com/Pylons/pyramid/issues
Expand All @@ -161,21 +159,21 @@ https://github.com/Pylons/pyramid/issues
- Announce to maillist.

```
Pyramid 1.X.X has been released.
Pyramid 2.X.X has been released.

The full changelog is here:
https://docs.pylonsproject.org/projects/pyramid/en/1.X-branch/changes.html
https://docs.pylonsproject.org/projects/pyramid/en/2.X-branch/changes.html

What's New In Pyramid 1.X:
https://docs.pylonsproject.org/projects/pyramid/en/1.X-branch/whatsnew-1.X.html
What's New In Pyramid 2.X:
https://docs.pylonsproject.org/projects/pyramid/en/2.X-branch/whatsnew-2.X.html

1.X release documentation (across all alphas and betas, as well as when it gets
2.X release documentation (across all alphas and betas, as well as when it gets
to final release):
https://docs.pylonsproject.org/projects/pyramid/en/1.X-branch/
https://docs.pylonsproject.org/projects/pyramid/en/2.X-branch/

You can install it via PyPI:

pip install Pyramid==1.X
pip install Pyramid==2.X

Enjoy, and please report any issues you find to the issue tracker at
https://github.com/Pylons/pyramid/issues
Expand Down
3 changes: 0 additions & 3 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,3 @@ Probably Bad Ideas
c.add_view(..)

- _fix_registry should dictify the registry being fixed.

- Apply a prefix to the userid principal to avoid poisoning the principal
namespace. See https://github.com/Pylons/pyramid/issues/2060
2 changes: 2 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Git branches and their purpose and status at the time of this writing are listed

* [master](https://github.com/Pylons/pyramid/) - The branch on which further
development takes place. The default branch on GitHub.
* [2.0-branch](https://github.com/Pylons/pyramid/tree/2.0-branch) - The branch
classified as "alpha".
* [1.10-branch](https://github.com/Pylons/pyramid/tree/1.10-branch) - The branch
classified as "stable" or "latest".
* [1.9-branch](https://github.com/Pylons/pyramid/tree/1.9-branch) - The oldest
Expand Down
2 changes: 1 addition & 1 deletion docs/api/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Authentication Policies
~~~~~~~~~~~~~~~~~~~~~~~

Authentication policies have been deprecated by the new security system. See
:ref:`upgrading_auth` for more information.
:ref:`upgrading_auth_20` for more information.

.. autoclass:: AuthTktAuthenticationPolicy
:members:
Expand Down
4 changes: 2 additions & 2 deletions docs/api/request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@

``unauthenticated_userid`` has been deprecated in version 2.0. Use
:attr:`authenticated_userid` or :attr:`identity` instead. See
:ref:`upgrading_auth` for more information.
:ref:`upgrading_auth_20` for more information.

A property which returns a value which represents the *claimed* (not
verified) :term:`userid` of the credentials present in the
Expand All @@ -194,7 +194,7 @@
.. deprecated:: 2.0

The new security policy has removed the concept of principals. See
:ref:`upgrading_auth` for more information.
:ref:`upgrading_auth_20` for more information.

A property which returns the list of 'effective' :term:`principal`
identifiers for this request. This list typically includes the
Expand Down
37 changes: 10 additions & 27 deletions docs/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,8 @@ Glossary
builds on Python's ``distutils`` to provide easier building,
distribution, and installation of libraries and applications.

distribute
`Distribute <https://pypi.org/project/distribute/>`_ is a fork of :term:`Setuptools` which runs on both Python 2 and Python 3.
It is now in legacy state because :term:`Setuptools` now runs on both Python 2 and 3.

pkg_resources
A module which ships with :term:`Setuptools` and :term:`distribute` that
A module which ships with :term:`Setuptools` that
provides an API for addressing "asset files" within a Python
:term:`package`. Asset files are static files, template files, etc;
basically anything non-Python-source that lives in a Python package can
Expand Down Expand Up @@ -87,23 +83,19 @@ Glossary
:term:`package`.

project
(Setuptools/distutils terminology). A directory on disk which
contains a ``setup.py`` file and one or more Python packages. The
``setup.py`` file contains code that allows the package(s) to be
installed, distributed, and tested.
Setuptools / Python packaging terminology.
A directory on disk which contains a ``setup.py`` and / or ``pyproject.toml`` file and one or more Python packages.
The project files contain metadata that allow the package(s) to be installed, distributed, and tested.

distribution
(Setuptools/distutils terminology). A file representing an
Setuptools / Python packaging terminology. A file representing an
installable library or application. Distributions are usually
files that have the suffix of ``.egg``, ``.tar.gz``, or ``.zip``.
Distributions are the target of Setuptools-related commands such as
``easy_install``.
archives that have the suffix of ``.whl``, ``.tar.gz``, or ``.zip``.
Distributions are the target of packaging-related commands such as ``pip install``.

entry point
A :term:`Setuptools` indirection, defined within a Setuptools
:term:`distribution` setup.py. It is usually a name which refers
to a function somewhere in a package which is held by the
distribution.
A :term:`Setuptools` indirection, defined within a Setuptools :term:`distribution` (usually in ``setup.py`` or ``setup.cfg``).
It is usually a name which refers to a function somewhere in a package which is held by the distribution.

dotted Python name
A reference to a Python object by name using a string, in the form
Expand Down Expand Up @@ -1083,7 +1075,7 @@ Glossary
https://docs.pylonsproject.org/projects/waitress/en/latest/ for detailed
information.

Green Unicorn
gunicorn
Aka ``gunicorn``, a fast :term:`WSGI` server that runs on Unix under
Python 2.6+ or Python 3.4+. See https://gunicorn.org/ for detailed
information.
Expand Down Expand Up @@ -1128,15 +1120,6 @@ Glossary
The :term:`Python Packaging Authority`'s recommended tool for installing
Python packages.

pyvenv
The :term:`Python Packaging Authority` formerly recommended using the
``pyvenv`` command for `creating virtual environments on Python 3.4 and
3.5
<https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments>`_,
but it was 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.
Expand Down
6 changes: 3 additions & 3 deletions docs/narr/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Installing :app:`Pyramid`

.. note::

This installation guide emphasizes the use of Python 3.5 and greater for
This installation guide emphasizes the use of Python 3.6 and greater for
simplicity.


Expand All @@ -15,13 +15,13 @@ Installing :app:`Pyramid`
Before You Install Pyramid
--------------------------

Install Python version 3.5 or greater for your operating system, and satisfy
Install Python version 3.6 or greater for your operating system, and satisfy
the :ref:`requirements-for-installing-packages`, as described in
the following sections.

.. sidebar:: Python Versions

As of this writing, :app:`Pyramid` is tested against Python 3.5, 3.6, Python 3.7, Python 3.8, and PyPy3.
As of this writing, :app:`Pyramid` is tested against Python 3.6, 3.7, 3.8, and 3.9 and PyPy3.

:app:`Pyramid` is known to run on all popular Unix-like systems such as Linux,
macOS, and FreeBSD, as well as on Windows platforms. It is also known to
Expand Down
4 changes: 2 additions & 2 deletions docs/narr/project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1173,8 +1173,8 @@ One popular production alternative to the default Waitress server is
using the Apache web server rather than any "pure-Python" server like Waitress.
It is fast and featureful. See :ref:`modwsgi_tutorial` for details.

Another good production alternative is :term:`Green Unicorn` (aka
``gunicorn``). It's faster than Waitress and slightly easier to configure than
Another good production alternative is :term:`gunicorn`.
It's faster than Waitress and slightly easier to configure than
``mod_wsgi``, although it depends, in its default configuration, on having a
buffering HTTP proxy in front of it. It does not, as of this writing, work on
Windows.
Expand Down
Loading

0 comments on commit 43bd1a1

Please sign in to comment.