skip to navigation
skip to content

pyramid 1.6.4

The Pyramid Web Framework, a Pylons project

Latest Version: 1.9.1

Pyramid

Pyramid is a small, fast, down-to-earth, open source Python web framework. It makes real-world web application development and deployment more fun, more predictable, and more productive.

Pyramid is a project of the Pylons Project.

Support and Documentation

See Pyramid Support and Development for documentation, reporting bugs, and getting support.

Developing and Contributing

See HACKING.txt and contributing.md for guidelines on running tests, adding features, coding style, and updating documentation when developing in or contributing to Pyramid.

License

Pyramid is offered under the BSD-derived Repoze Public License.

Authors

Pyramid is made available by Agendaless Consulting and a team of contributors.

1.6.4 (2016-08-17)

Bug Fixes

  • Oops, Apparently wheels do not build cleanly every time, so build artifacts from 1.7.1 creeped into the wheel for 1.6.3. Note to self: rm -rf build.

1.6.3 (2016-08-16)

Bug Fixes

  • Revert changes from #2706 released in Pyramid 1.6.2. JSON renderers will continue to return unicode data instead of UTF-8 encoded bytes. This means that WebOb responses are still expected to handle unicode data even though JSON does not have a charset. See https://github.com/Pylons/pyramid/issues/2744

1.6.2 (2016-08-16)

Bug Fixes

1.6.1 (2016-02-02)

Deprecations

  • Missed the deprecation of one more daemon/process management feature that allowed logging to a file. This deprecates --log-file which is generally only used with pserve running in daemon mode. See https://github.com/Pylons/pyramid/pull/2330

Bug Fixes

1.6 (2016-01-03)

Deprecations

1.6b3 (2015-12-17)

Backward Incompatibilities

  • Remove the cachebust option from config.add_static_view. See config.add_cache_buster for the new way to attach cache busters to static assets. See https://github.com/Pylons/pyramid/pull/2186

  • Modify the pyramid.interfaces.ICacheBuster API to be a simple callable instead of an object with match and pregenerate methods. Cache busters are now focused solely on generation. Matching has been dropped.

    Note this affects usage of pyramid.static.QueryStringCacheBuster and pyramid.static.ManifestCacheBuster.

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

Features

Bug Fixes

1.6b2 (2015-10-15)

Features

  • Allow asset specifications to be supplied to pyramid.static.ManifestCacheBuster instead of requiring a filesystem path.

1.6b1 (2015-10-15)

Backward Incompatibilities

  • IPython and BPython support have been removed from pshell in the core. To continue using them on Pyramid 1.6+ you must install the binding packages explicitly:

    $ pip install pyramid_ipython
    
    or
    
    $ pip install pyramid_bpython
    
  • Remove default cache busters introduced in 1.6a1 including PathSegmentCacheBuster, PathSegmentMd5CacheBuster, and QueryStringMd5CacheBuster. See https://github.com/Pylons/pyramid/pull/2116

Features

Bug Fixes

Deprecations

  • Deprecate pserve --monitor-restart in favor of user’s using a real process manager such as Systemd or Upstart as well as Python-based solutions like Circus and Supervisor. See https://github.com/Pylons/pyramid/pull/2120

1.6a2 (2015-06-30)

Bug Fixes

1.6a1 (2015-04-15)

Features

  • pcreate will now ask for confirmation if invoked with an argument for a project name that already exists or is importable in the current environment. See https://github.com/Pylons/pyramid/issues/1357 and https://github.com/Pylons/pyramid/pull/1837
  • Make it possible to subclass pyramid.request.Request and also use pyramid.request.Request.add_request.method. See https://github.com/Pylons/pyramid/issues/1529
  • The pyramid.config.Configurator has grown the ability to allow actions to call other actions during a commit-cycle. This enables much more logic to be placed into actions, such as the ability to invoke other actions or group them for improved conflict detection. We have also exposed and documented the config phases that Pyramid uses in order to further assist in building conforming addons. See https://github.com/Pylons/pyramid/pull/1513
  • Add pyramid.request.apply_request_extensions function which can be used in testing to apply any request extensions configured via config.add_request_method. Previously it was only possible to test the extensions by going through Pyramid’s router. See https://github.com/Pylons/pyramid/pull/1581
  • pcreate when run without a scaffold argument will now print information on the missing flag, as well as a list of available scaffolds. See https://github.com/Pylons/pyramid/pull/1566 and https://github.com/Pylons/pyramid/issues/1297
  • Added support / testing for ‘pypy3’ under Tox and Travis. See https://github.com/Pylons/pyramid/pull/1469
  • Automate code coverage metrics across py2 and py3 instead of just py2. See https://github.com/Pylons/pyramid/pull/1471
  • Cache busting for static resources has been added and is available via a new argument to pyramid.config.Configurator.add_static_view: cachebust. Core APIs are shipped for both cache busting via query strings and path segments and may be extended to fit into custom asset pipelines. See https://github.com/Pylons/pyramid/pull/1380 and https://github.com/Pylons/pyramid/pull/1583
  • Add pyramid.config.Configurator.root_package attribute and init parameter to assist with includeable packages that wish to resolve resources relative to the package in which the Configurator was created. This is especially useful for addons that need to load asset specs from settings, in which case it is may be natural for a developer to define imports or assets relative to the top-level package. See https://github.com/Pylons/pyramid/pull/1337
  • Added line numbers to the log formatters in the scaffolds to assist with debugging. See https://github.com/Pylons/pyramid/pull/1326
  • Add new HTTP exception objects for status codes 428 Precondition Required, 429 Too Many Requests and 431 Request Header Fields Too Large in pyramid.httpexceptions. See https://github.com/Pylons/pyramid/pull/1372/files
  • The pshell script will now load a PYTHONSTARTUP file if one is defined in the environment prior to launching the interpreter. See https://github.com/Pylons/pyramid/pull/1448
  • Make it simple to define notfound and forbidden views that wish to use the default exception-response view but with altered predicates and other configuration options. The view argument is now optional in config.add_notfound_view and config.add_forbidden_view.. See https://github.com/Pylons/pyramid/issues/494
  • Greatly improve the readability of the pcreate shell script output. See https://github.com/Pylons/pyramid/pull/1453
  • Improve robustness to timing attacks in the AuthTktCookieHelper and the SignedCookieSessionFactory classes by using the stdlib’s hmac.compare_digest if it is available (such as Python 2.7.7+ and 3.3+). See https://github.com/Pylons/pyramid/pull/1457
  • Assets can now be overidden by an absolute path on the filesystem when using the config.override_asset API. This makes it possible to fully support serving up static content from a mutable directory while still being able to use the request.static_url API and config.add_static_view. Previously it was not possible to use config.add_static_view with an absolute path and generate urls to the content. This change replaces the call, config.add_static_view('/abs/path', 'static'), with config.add_static_view('myapp:static', 'static') and config.override_asset(to_override='myapp:static/', override_with='/abs/path/'). The myapp:static asset spec is completely made up and does not need to exist - it is used for generating urls via request.static_url('myapp:static/foo.png'). See https://github.com/Pylons/pyramid/issues/1252
  • Added pyramid.config.Configurator.set_response_factory and the response_factory keyword argument to the Configurator for defining a factory that will return a custom Response class. See https://github.com/Pylons/pyramid/pull/1499
  • Allow an iterator to be returned from a renderer. Previously it was only possible to return bytes or unicode. See https://github.com/Pylons/pyramid/pull/1417
  • pserve can now take a -b or --browser option to open the server URL in a web browser. See https://github.com/Pylons/pyramid/pull/1533
  • Overall improvments for the proutes command. Added --format and --glob arguments to the command, introduced the method column for displaying available request methods, and improved the view output by showing the module instead of just __repr__. See https://github.com/Pylons/pyramid/pull/1488
  • Support keyword-only arguments and function annotations in views in Python 3. See https://github.com/Pylons/pyramid/pull/1556
  • request.response will no longer be mutated when using the pyramid.renderers.render_to_response() API. It is now necessary to pass in a response= argument to render_to_response if you wish to supply the renderer with a custom response object for it to use. If you do not pass one then a response object will be created using the application’s IResponseFactory. Almost all renderers mutate the request.response response object (for example, the JSON renderer sets request.response.content_type to application/json). However, when invoking render_to_response it is not expected that the response object being returned would be the same one used later in the request. The response object returned from render_to_response is now explicitly different from request.response. This does not change the API of a renderer. See https://github.com/Pylons/pyramid/pull/1563
  • The append_slash argument of `Configurator().add_notfound_view() will now accept anything that implements the IResponse interface and will use that as the response class instead of the default HTTPFound. See https://github.com/Pylons/pyramid/pull/1610

Bug Fixes

Deprecations

  • The pserve command’s daemonization features have been deprecated. This includes the [start,stop,restart,status] subcommands as well as the --daemon, --stop-server, --pid-file, and --status flags.

    Please use a real process manager in the future instead of relying on the pserve to daemonize itself. Many options exist including your Operating System’s services such as Systemd or Upstart, as well as Python-based solutions like Circus and Supervisor.

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

  • Renamed the principal argument to pyramid.security.remember() to userid in order to clarify its intended purpose. See https://github.com/Pylons/pyramid/pull/1399

Docs

Scaffolds

  • Update scaffold generating machinery to return the version of pyramid and pyramid docs for use in scaffolds. Updated starter, alchemy and zodb templates to have links to correctly versioned documentation and reflect which pyramid was used to generate the scaffold.
  • Removed non-ascii copyright symbol from templates, as this was causing the scaffolds to fail for project generation.
  • You can now run the scaffolding func tests via tox py2-scaffolds and tox py3-scaffolds.
 
File Type Py Version Uploaded on Size
pyramid-1.6.4-py2.py3-none-any.whl (md5, pgp) Python Wheel py2.py3 2016-08-17 549KB
pyramid-1.6.4.tar.gz (md5, pgp) Source 2016-08-17 2MB