What's New in Pyramid 1.7

This article explains the new features in Pyramid version 1.7 as compared to its predecessor, Pyramid 1.6. It also documents backwards incompatibilities between the two versions and deprecations added to Pyramid 1.7, as well as software dependency changes and notable documentation additions.

Backwards Incompatibilities

Feature Additions

Deprecations

Scaffolding Enhancements

Documentation Enhancements

A massive overhaul of the packaging and tools used in the documentation was completed in https://github.com/Pylons/pyramid/pull/2468. A summary follows:

  • All docs now recommend using pip instead of easy_install.

  • The installation docs now expect the user to be using Python 3.4 or greater with access to the python3 -m venv tool to create virtual environments.

  • Tutorials now use py.test and pytest-cov instead of nose and coverage.

  • Further updates to the scaffolds as well as tutorials and their src files.

Along with the overhaul of the alchemy scaffold came a total overhaul of the SQLAlchemy + URL dispatch wiki tutorial tutorial to introduce more modern features into the usage of SQLAlchemy with Pyramid and provide a better starting point for new projects. See https://github.com/Pylons/pyramid/pull/2024 for more. Highlights were:

  • New SQLAlchemy session management without any global DBSession. Replaced by a per-request request.dbsession property.

  • A new authentication chapter demonstrating how to get simple authentication bootstrapped quickly in an application.

  • Authorization was overhauled to show the use of per-route context factories which demonstrate object-level authorization on top of simple group-level authorization. Did you want to restrict page edits to only the owner but couldn't figure it out before? Here you go!

  • The users and groups are stored in the database now instead of within tutorial-specific global variables.

  • User passwords are stored using bcrypt.