summaryrefslogtreecommitdiff
path: root/repoze
AgeCommit message (Collapse)Author
2009-01-22- ``repoze.bfg.traversal.split_path`` now also handles decodingChris McDonough
path segments to unicode (for speed, because its results are LRU cached). - ``repoze.bfg.traversal.step`` was made a method of the ModelGraphTraverser.
2009-01-22- The ``unicode_path_segments`` configuration variable and theChris McDonough
``BFG_UNICODE_PATH_SEGMENTS`` configuration variable have been removed. Path segments are now always passed to model ``__getitem__`` methods as unicode. "True" has been the default for this setting since 0.5.4, but changing this configuration setting to false allowed you to go back to passing raw path element strings to model ``__getitem__`` methods. This services a speed goal (we get about +80 req/s by removing the check), and it's clearer just to always expect unicode path segments in model ``__getitem__`` methods.
2009-01-22Coverage.Chris McDonough
2009-01-22Coverage.Chris McDonough
2009-01-22Make traversal's ``split_path`` use an LRU decorator for speed; otherChris McDonough
minor speed tweaks.
2009-01-22- ``repoze.bfg.lru`` implements an LRU cache class and a decorator forChris McDonough
internal use.
2009-01-22- The Allowed and Denied classes in ``repoze.bfg.security`` now areChris McDonough
lazier about constructing the representation of a reason message for speed; ``repoze.bfg.view_execution_permitted`` takes advantage of this. - The ``is_response`` check was sped up by about half at the expense of making its code slightly uglier.
2009-01-22 If no subscribers are registered via ``registerHandler`` orChris McDonough
``registerSubscriptionAdapter``, ``notify`` is a noop for speed.
2009-01-20- Tease out an extra 4% performance boost by changing the Router;Chris McDonough
instead of using imported ZCA APIs, use the same APIs directly against the registry that is an attribute of the Router. As a result, the registry used by BFG is now a subclass of ``zope.component.registry.Components`` (defined as ``repoze.bfg.registry.Registry``); it has a ``notify`` method.
2009-01-20Warn against using in user code.Chris McDonough
2009-01-20# We use 'precooked' Request subclasses that correspond to HTTPChris McDonough
# request methods within ``router.py`` when constructing a request # object rather than using ``alsoProvides`` to attach the proper # interface to an unsubclassed webob.Request. This pattern is purely # an optimization (e.g. preventing calls to ``alsoProvides`` means the # difference between 590 r/s and 690 r/s on a MacBook 2GHz).
2009-01-20Make tests pass on laguna.Chris McDonough
2009-01-19view_name attr.Chris McDonough
2009-01-18context_factory -> factoryChris McDonough
context_interfaces -> provides
2009-01-18Merge "routesmapper branch" to trunk.Chris McDonough
2009-01-18grok -> scan to prevent confusion.Chris McDonough
2009-01-17Security policy documentation.Chris McDonough
2009-01-17- The ``bfg_starter`` and ``bfg_zodb`` "paster create" templates nowChris McDonough
contain images and CSS which are displayed when the default page is displayed after initial project generation.
2009-01-17- Allow the ``repoze.bfg.view.static`` helper to be passed a relativeChris McDonough
``root_path`` name; it will be considered relative to the file in which it was called.
2009-01-16- Add a section on "Using BFG Security With URL Dispatch" into theChris McDonough
urldispatch chapter of the documentation. Clean up "BFG" vernacular (replace with repoze.bfg).
2009-01-16Do alsoProvides instead of directlyProvides in case the request factoryChris McDonough
uses directlyProvides.
2009-01-16Remove now-useless class-level defaults.Chris McDonough
2009-01-16- The ``repoze.bfg.view.static`` helper now usesChris McDonough
``webob.Request.get_response`` to do its work rather than relying on howgrown WSGI code.
2009-01-16FeaturesChris McDonough
-------- - The functionality of ``repoze.bfg.convention`` has been merged into the core. Applications which make use of ``repoze.bfg.convention`` will continue to work indefinitely, but it is recommended that apps stop depending upon it. To do so, substitute imports of ``repoze.bfg.convention.bfg_view`` with imports of ``repoze.bfg.view.bfg_view``, and change the stanza in ZCML from ``<convention package=".">`` to ``<grok package=".">``. As a result of the merge, bfg has grown a new dependency: ``martian``. - View functions which use the pushpage decorator are now pickleable (meaning their use won't prevent a ``configure.zcml.cache`` file from being written to disk). Implementation Changes ---------------------- - The ``wsgiapp`` decorator now uses ``webob.Request.get_response`` to do its work rather than relying on howgrown WSGI code.
2009-01-15Add dead chickens to suppress spurious coverage output.Chris McDonough
2009-01-15Get rid of PlacelessSetup.Chris McDonough
2009-01-15Get rid of _getFUT.Chris McDonough
2009-01-15Get rid of _getFUT.Chris McDonough
2009-01-15Get rid of _getFUT.Chris McDonough
2009-01-15Get rid of _getFUT.Chris McDonough
2009-01-15Remove more unused stuff.Chris McDonough
2009-01-15Clean up unused stuff.Chris McDonough
2009-01-15Unfix interfaces (thanks Tres).Chris McDonough
2009-01-15Fix interfaces.Chris McDonough
2009-01-15Test coverage.Chris McDonough
2009-01-15- Instead of invariably using ``webob.Request`` as the "requestChris McDonough
factory" (e.g. in the ``Router`` class) and ``webob.Response`` and the "response factory" (e.g. in ``render_template_to_response``), allow both to be overridden via a ZCML utility hook. See the "Using ZCML Hooks" chapter of the documentation for more information.
2009-01-12- An interface specific to the HTTP verb (GET/PUT/POST/DELETE/HEAD) isChris McDonough
attached to each request object on ingress. The HTTP-verb-related interfaces are defined in ``repoze.bfg.interfaces`` and are ``IGETRequest``, ``IPOSTRequest``, ``IPUTRequest``, ``IDELETERequest`` and ``IHEADRequest``. These interfaces can be specified as the ``request_type`` attribute of a bfg view declaration. A view naming a specific HTTP-verb-matching interface will be found only if the view is defined with a request_type that matches the HTTP verb in the incoming request. The more general ``IRequest`` interface can be used as the request_type to catch all requests (and this is indeed the default). All requests implement ``IRequest``. The HTTP-verb-matching idea was pioneered by `repoze.bfg.restrequest <http://pypi.python.org/pypi/repoze.bfg.restrequest/1.0.1>`_ . That package is no longer required, but still functions fine.
2009-01-12Only pop the registry stack if we've pushed on to it in makeRegistry.Chris McDonough
2009-01-12- Make the (internal) thread local registry manager maintain a stackChris McDonough
of registries in order to make it possible to call one BFG application from inside another.
2009-01-11Better docstrings.Chris McDonough
2009-01-11Unused import.Chris McDonough
2009-01-11Better coverage.Chris McDonough
2009-01-11- Improve test coverage.Chris McDonough
- Remove old cold which attempts to recover from trying to unpickle a ``z3c.pt`` template; Chameleon has been the templating engine for a good long time now. Running repoze.bfg against a sandbox that has pickled ``z3c.pt`` templates it will now just fail with an unpickling error, but can be fixed by deleting the template cache files.
2009-01-11Make clearer what ``name`` means within the __call__ method.Chris McDonough
2009-01-11Fix docs and templates to account for deprecation of get_options.Chris McDonough
2009-01-11Merge router-simplify branch. Changelog below.Chris McDonough
Bug Fixes --------- - Fix a bug where the Paste configuration's ``unicode_path_segments`` (and os.environ's ``BFG_UNICODE_PATH_SEGMENTS``) may have been defaulting to false in some circumstances. It now always defaults to true, matching the documentation and intent. - The ``repoze.bfg.traversal.find_model`` API did not work properly when passed a ``path`` argument which was unicode and contained high-order bytes when the ``unicode_path_segments`` or ``BFG_UNICODE_PATH_SEGMENTS`` configuration variables were "true". - A new module was added: ``repoze.bfg.settings``. This contains deployment-settings-related code. Behavior Changes ---------------- - The ``make_app`` callable within ``repoze.bfg.router`` now registers the ``root_policy`` argument as a utility (unnamed, using the new ``repoze.bfg.interfaces.IRootFactory`` as a provides interface) rather than passing it as the first argument to the ``repoze.bfg.router.Router`` class. As a result the ``repoze.bfg.router.Router`` router class only accepts a single argument: ``registry``. The ``repoze.bfg.router.Router`` class retrieves the root policy via a utility lookup now. The ``repoze.bfg.router.make_app`` API also now performs some important application registrations that were previously handled inside ``repoze.bfg.registry.makeRegistry``. - The ``repoze.bfg.settings.Settings`` class (an instance of which is registered as a utility providing ``repoze.bfg.interfaces.ISettings`` when any application is started) now automatically calls ``repoze.bfg.settings.get_options`` on the options passed to its constructor. This means that usage of ``get_options`` within an application's ``make_app`` function is no longer required (the "raw" ``options`` dict or None may be passed). Deprecations ------------ - Moved the ``repoze.bfg.registry.Settings`` class. This has been moved to ``repoze.bfg.settings.Settings``. A deprecation warning is issued when it is imported from the older location. - Moved the ``repoze.bfg.registry.get_options`` function This has been moved to ``repoze.bfg.settings.get_options``. A deprecation warning is issued when it is imported from the older location. - The ``repoze.bfg.interfaces.IRootPolicy`` interface was renamed within the interfaces package. It has been renamed to ``IRootFactory``. A deprecation warning is issued when it is imported from the older location.
2009-01-09Unused imports.Chris McDonough
2009-01-08Fixed typo. Patch contributed by Peter Koppatz.Malthe Borch
2009-01-07Add a 'post' argument to the DummyRequest ctor.Tres Seaver
2009-01-07Add better testing for DummyRequest; fix a bug in cookie init.Tres Seaver