Pyramid

Latest version: v2.0.2

Safety actively analyzes 629532 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 17 of 30

1.0b2

Not secure
==================

- ``remoteuserauthenticationpolicy`` ZCML directive didn't work
without an ``environ_key`` directive (didn't match docs).

- Fix ``configure_zcml`` filespec check on Windows. Previously if an
absolute filesystem path including a drive letter was passed as
``filename`` (or as ``configure_zcml`` in the options dict) to
``repoze.bfg.router.make_app``, it would be treated as a
package:resource_name specification.

- Fix inaccuracies and import errors in bfgwiki (traversal+ZODB) and
bfgwiki2 (urldispatch+SA) tutorials.

- Use bfgsite index for all tutorial setup.cfg files.

- Full documentation grammar/style/spelling audit.

1.0b1

Not secure
==================

Features
--------

- Allow a Paste config file (``configure_zcml``) value or an
environment variable (``BFG_CONFIGURE_ZCML``) to name a ZCML file
(optionally package-relative) that will be used to bootstrap the
application. Previously, the integrator could not influence which
ZCML file was used to do the boostrapping (only the original
application developer could do so).

Documentation
-------------

- Added a "Resources" chapter to the narrative documentation which
explains how to override resources within one package from another
package.

- Added an "Extending" chapter to the narrative documentation which
explains how to extend or modify an existing BFG application using
another Python package and ZCML.

1.0a10

Not secure
===================

Bug Fixes
---------

- URL dispatch now properly handles a ``.*`` or ``*`` appearing in a regex
match when used inside brackets. Resolves issue 90.

Backwards Incompatibilities
---------------------------

- The ``add_handler`` method of a Configurator has been removed from the
Pyramid core. Handlers are now a feature of the ``pyramid_handlers``
package, which can be downloaded from PyPI. Documentation for the package
should be available via
https://docs.pylonsproject.org/projects/pyramid_handlers/en/latest/,
which describes how
to add a configuration statement to your ``main`` block to reobtain this
method. You will also need to add an ``install_requires`` dependency upon
``pyramid_handlers`` to your ``setup.py`` file.

- The ``load_zcml`` method of a Configurator has been removed from the
Pyramid core. Loading ZCML is now a feature of the ``pyramid_zcml``
package, which can be downloaded from PyPI. Documentation for the package
should be available via
https://docs.pylonsproject.org/projects/pyramid_zcml/en/latest/,
which describes how
to add a configuration statement to your ``main`` block to reobtain this
method. You will also need to add an ``install_requires`` dependency upon
``pyramid_zcml`` to your ``setup.py`` file.

- The ``pyramid.includes`` subpackage has been removed. ZCML files which use
include the package ``pyramid.includes`` (e.g. ``<include
package="pyramid.includes"/>``) now must include the ``pyramid_zcml``
package instead (e.g. ``<include package="pyramid_zcml"/>``).

- The ``pyramid.view.action`` decorator has been removed from the Pyramid
core. Handlers are now a feature of the ``pyramid_handlers`` package. It
should now be imported from ``pyramid_handlers`` e.g. ``from
pyramid_handlers import action``.

- The ``handler`` ZCML directive has been removed. It is now a feature of
the ``pyramid_handlers`` package.

- The ``pylons_minimal``, ``pylons_basic`` and ``pylons_sqla`` paster
templates were removed. Use ``pyramid_sqla`` (available from PyPI) as a
generic replacement for Pylons-esque development.

- The ``make_app`` function has been removed from the ``pyramid.router``
module. It continues life within the ``pyramid_zcml`` package. This
leaves the ``pyramid.router`` module without any API functions.

- The ``configure_zcml`` setting within the deployment settings (within
``**settings`` passed to a Pyramid ``main`` function) has ceased to have any
meaning.

Features
--------

- ``pyramid.testing.setUp`` and ``pyramid.testing.tearDown`` have been
undeprecated. They are now the canonical setup and teardown APIs for test
configuration, replacing "direct" creation of a Configurator. This is a
change designed to provide a facade that will protect against any future
Configurator deprecations.

- Add ``charset`` attribute to ``pyramid.testing.DummyRequest``
(unconditionally ``UTF-8``).

- Add ``add_directive`` method to configurator, which allows framework
extenders to add methods to the configurator (ala ZCML directives).

- When ``Configurator.include`` is passed a *module* as an argument, it
defaults to attempting to find and use a callable named ``includeme``
within that module. This makes it possible to use
``config.include('some.module')`` rather than
``config.include('some.module.somefunc')`` as long as the include function
within ``some.module`` is named ``includeme``.

- The ``bfg2pyramid`` script now converts ZCML include tags that have
``repoze.bfg.includes`` as a package attribute to the value
``pyramid_zcml``. For example, ``<include package="repoze.bfg.includes">``
will be converted to ``<include package="pyramid_zcml">``.

Paster Templates
----------------

- All paster templates now use ``pyramid.testing.setUp`` and
``pyramid.testing.tearDown`` rather than creating a Configurator "by hand"
within their ``tests.py`` module, as per decision in features above.

- The ``starter_zcml`` paster template has been moved to the ``pyramid_zcml``
package.

Documentation
-------------

- The wiki and wiki2 tutorials now use ``pyramid.testing.setUp`` and
``pyramid.testing.tearDown`` rather than creating a Configurator "by hand",
as per decision in features above.

- The "Testing" narrative chapter now explains ``pyramid.testing.setUp`` and
``pyramid.testing.tearDown`` instead of Configurator creation and
``Configurator.begin()`` and ``Configurator.end()``.

- Document the ``request.override_renderer`` attribute within the narrative
"Renderers" chapter in a section named "Overriding A Renderer at Runtime".

- The "Declarative Configuration" narrative chapter has been removed (it was
moved to the ``pyramid_zcml`` package).

- Most references to ZCML in narrative chapters have been removed or
redirected to ``pyramid_zcml`` locations.

Deprecations
------------

- Deprecation warnings related to import of the following API functions were
added: ``pyramid.traversal.find_model``, ``pyramid.traversal.model_path``,
``pyramid.traversal.model_path_tuple``, ``pyramid.url.model_url``. The
instructions emitted by the deprecation warnings instruct the developer to
change these method spellings to their ``resource`` equivalents. This is a
consequence of the mass concept rename of "model" to "resource" performed
in 1.0a7.

1.0a9

Not secure
==================

Features
--------

- Make it possible to pass strings in the form
"package_name:relative/path" to APIs like ``render_template``,
``render_template_to_response``, and ``get_template``. Sometimes
the package in which a caller lives is a direct namespace package,
so the module which is returned is semi-useless for navigating from.
In this way, the caller can control the horizontal and vertical of
where things get looked up from.

1.0a8

Not secure
==================

Deprecations
------------

- Deprecate the ``authentication_policy`` and ``authorization_policy``
arguments to ``repoze.bfg.router.make_app``. Instead, developers
should use the various authentication policy ZCML directives
(``repozewho1authenticationpolicy``,
``remoteuserauthenticationpolicy`` and
``authtktauthenticationpolicy``) and the `aclauthorizationpolicy``
authorization policy directive as described in the changes to the
"Security" narrative documentation chapter and the wiki tutorials.

Features
--------

- Add three new ZCML directives which configure authentication
policies:

- ``repozewho1authenticationpolicy``

- ``remoteuserauthenticationpolicy``

- ``authtktauthenticationpolicy``

- Add a new ZCML directive which configures an ACL authorization
policy named ``aclauthorizationpolicy``.

Bug Fixes
---------

- Bug fix: when a ``repoze.bfg.resource.PackageOverrides`` class was
instantiated, and the package it was overriding already had a
``__loader__`` attribute, it would fail at startup time, even if the
``__loader__`` attribute was another PackageOverrides instance. We
now replace any ``__loader__`` that is also a PackageOverrides
instance. Symptom: ``ConfigurationExecutionError: <type
'exceptions.TypeError'>: Package <module 'karl.views' from
'/Users/chrism/projects/osi/bfgenv/src/karl/karl/views/__init__.pyc'>
already has a __loader__ (probably a module in a zipped egg)``.

1.0a7

Not secure
==================

Features
--------

- Add a ``reload_resources`` configuration file setting (aka the
``BFG_RELOAD_RESOURCES`` environment variable). When this is set to
true, the server never needs to be restarted when moving files
between directory resource overrides (esp. for templates currently).

- Add a ``reload_all`` configuration file setting (aka the
``BFG_RELOAD_ALL`` environment variable) that implies both
``reload_resources`` and ``reload_templates``.

- The ``static`` helper view class now uses a ``PackageURLParser`` in
order to allow for the overriding of static resources (CSS / logo
files, etc) using the ``resource`` ZCML directive. The
``PackageURLParser`` class was added to a (new) ``static`` module in
BFG; it is a subclass of the ``StaticURLParser`` class in
``paste.urlparser``.

- The ``repoze.bfg.templating.renderer_from_cache`` function now
checks for the ``reload_resources`` setting; if it's true, it does
not register a template renderer (it won't use the registry as a
template renderer cache).

Documentation
-------------

- Add ``pkg_resources`` to the glossary.

- Update the "Environment" docs to note the existence of
``reload_resources`` and ``reload_all``.

- Updated the ``bfg_alchemy`` paster template to include two views:
the view on the root shows a list of links to records; the view on
a record shows the details for that object.

Internal
--------

- Use a colon instead of a tab as the separator between package name
and relpath to form the "spec" when register a ITemplateRenderer.

- Register a ``repoze.bfg.resource.OverrideProvider`` as a
pkg_resources provider only for modules which are known to have
overrides, instead of globally, when a <resource> directive is used
(performance).

Page 17 of 30

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.