summaryrefslogtreecommitdiff
path: root/CHANGES.txt
AgeCommit message (Collapse)Author
2010-07-15FeaturesChris McDonough
-------- - New view predicate: match_val. The ``match_val`` value represents the presence of a value in the structure added to the request named ``matchdict`` during URL dispatch representing the match values from the route pattern (e.g. if the route pattern has ``:foo`` in it, and the route matches, a key will exist in the matchdict named ``foo``). Like all other view predicates, this feature is exposed via the ``bfg_view`` API, the Configurator ``add_view`` API, and the ZCML ``view`` directive. Documentation ------------- - API documentation for the ``add_view`` method of the configurator changed to include ``match_val``. - ZCML documentation for ``view`` ZCML directive changed to include ``match_val``. - The ``Views`` narrative chapter now contains a description of the ``match_val`` predicate. Bug Fixes --------- - The ``header`` predicate (when used as either a view predicate or a route predicate) had a problem when specified with a name/regex pair. When the header did not exist in the headers dictionary, the regex match could be fed ``None``, causing it to throw a ``TypeError: expected string or buffer`` exception. Now, the predicate returns False as intended. Internal -------- - Remove ``repoze.bfg.configuration.isclass`` function in favor of using ``inspect.isclass``.
2010-07-14prep for 1.3a5Chris McDonough
2010-07-14Describe bw incompatibilitiesChris McDonough
2010-07-12- New internal exception: ``repoze.bfg.exceptions.URLDecodeError``.Chris McDonough
This URL is a subclass of the built-in Python exception named ``UnicodeDecodeError``. - When decoding a URL segment to Unicode fails, the exception raised is now ``repoze.bfg.exceptions.URLDecodeError`` instead of ``UnicodeDecodeError``. This makes it possible to register an exception view invoked specifically when ``repoze.bfg`` cannot decode a URL.
2010-07-12- Fix regression inChris McDonough
``repoze.bfg.configuration.Configurator.add_static_view``. Before 1.3a4, view names that contained a slash were supported as route prefixes. 1.3a4 broke this by trying to treat them as full URLs.
2010-07-04prep for 1.3a4Chris McDonough
2010-07-02- The ``repoze.bfg.url.route_url`` API has changed. If a keywordChris McDonough
``_app_url`` is present in the arguments passed to ``route_url``, this value will be used as the protocol/hostname/port/leading path prefix of the generated URL. For example, using an ``_app_url`` of ``http://example.com:8080/foo`` would cause the URL ``http://example.com:8080/foo/fleeb/flub`` to be returned from this function if the expansion of the route pattern associated with the ``route_name`` expanded to ``/fleeb/flub``. - It is now possible to use a URL as the ``name`` argument fed to ``repoze.bfg.configuration.Configurator.add_static_view``. When the name argument is a URL, the ``repoze.bfg.url.static_url`` API will generate join this URL (as a prefix) to a path including the static file name. This makes it more possible to put static media on a separate webserver for production, while keeping static media package-internal and served by the development webserver during development.
2010-06-30more documentation fallout from allowing predicates access to route matching ↵Chris McDonough
information
2010-06-30- A section named ``Custom Predicates`` was added to the URL DispatchChris McDonough
narrative chapter.
2010-06-30changelog gardeningChris McDonough
2010-06-30pass only match and route and document route minimallyChris McDonough
2010-06-30- In earlier versions, a custom route predicate associated with a urlChris McDonough
dispatch route (each of the predicate functions fed to the ``custom_predicates`` argument of ``repoze.bfg.configuration.Configurator.add_route``) has always required a 2-positional argument signature, e.g. ``(context, request)``. Before this release, the ``context`` argument was always ``None``. As of this release, the first argument passed to a predicate is now a dictionary conventionally named ``info`` consisting of ``match``, ``route``, and ``mapper``. ``match`` is a dictionary: it represents the arguments matched in the URL by the route. ``route`` is an object representing the route that matched. ``mapper`` is the url dispatch route mapper object. This is useful when predicates need access to the route match. For example:: def any_of(segment_name, *args): def predicate(info, request): if info['match'][segment_name] in args: return True num_one_two_or_three = any_of('num, 'one', 'two', 'three') add_route('/:num', custom_predicates=(num_one_two_or_three,))
2010-06-23- Undocumented hook: make ``get_app`` and ``get_root`` of theChris McDonough
``repoze.bfg.paster.BFGShellCommand`` hookable in cases where endware may interfere with the default versions.
2010-06-23- Redirect requests for tutorial sources toChris McDonough
http://docs.repoze.org/bfgwiki-1.3 and http://docs.repoze.org/bfgwiki2-1.3/ respectively.
2010-06-23- The authorization chapter of the SQLAlchemy Wiki TutorialChris McDonough
(docs/tutorials/bfgwiki2) was changed to demonstrate authorization via a group rather than via a direct username.
2010-06-23- The authorization chapter of the ZODB Wiki TutorialChris McDonough
(docs/tutorials/bfgwiki) was changed to demonstrate authorization via a group rather than via a direct username (thanks to Alex Marandon).
2010-06-07make docs renderChris McDonough
2010-05-02Add new line.Chris McDonough
2010-05-01Prep for release.Chris McDonough
2010-05-01- A section entitled Detecting Available Languages was added to theChris McDonough
i18n narrative docs chapter.
2010-04-29Next releaseChris McDonough
============ Paster Templates ---------------- - The ``bfg_alchemy`` and ``bfg_routesalchemy`` templates no longer register a ``handle_teardown`` event listener which calls ``DBSession.remove``. This was found by Chris Withers to be unnecessary. Documentation ------------- - The "bfgwiki2" (URL dispatch wiki) tutorial code and documentation was changed to remove the ``handle_teardown`` event listener which calls ``DBSession.remove``. - Any mention of the ``handle_teardown`` event listener as used by the paster templates was removed from the URL Dispatch narrative chapter.
2010-04-28Prep for 1.3a2.Chris McDonough
2010-04-27- Expanded portion of i18n narrative chapter docs which discussChris McDonough
working with gettext files.
2010-04-27FeaturesChris McDonough
-------- - A locale negotiator no longer needs to be registered explicitly. The default locale negotiator at ``repoze.bfg.i18n.default_locale_negotiator`` is now used unconditionally as... um, the default locale negotiator. - The default locale negotiator has become more complex. * First, the negotiator looks for the ``_LOCALE_`` attribute of the request object (possibly set by an :term:`event listener`). * Then it looks for the ``request.params['_LOCALE_']`` value. * Then it looks for the ``request.cookies['_LOCALE_']`` value. Backwards Incompatibilities --------------------------- - The default locale negotiator now looks for the parameter named ``_LOCALE_`` rather than a parameter named ``locale`` in ``request.params``. Behavior Changes ---------------- - A locale negotiator may now return ``None``, signifying that the default locale should be used. Documentation ------------- - Documentation concerning locale negotiation in the Internationalizationa and Localization chapter was updated.
2010-04-26Prep for 1.3a1.Chris McDonough
2010-04-25- Add a new method of the Configurator named ``derive_view`` which canChris McDonough
be used to generate a BFG view callable from a user-supplied function, instance, or class. This useful for external framework and plugin authors wishing to wrap callables supplied by their users which follow the same calling conventions and response conventions as objects that can be supplied directly to BFG as a view callable. See the ``derive_view`` method in the ``repoze.bfg.configuration.Configurator`` docs.
2010-04-25(no commit message)Chris McDonough
2010-04-25- It is now possible to turn on Chameleon template "debugging mode"Chris McDonough
for all Chameleon BFG templates by setting a BFG-related Paster ``.ini`` file setting named ``debug_templates``. The exceptions raised by Chameleon templates when a rendering fails are sometimes less than helpful. ``debug_templates`` allows you to configure your application development environment so that exceptions generated by Chameleon during template compilation and execution will contain more helpful debugging information. This mode is on by default in all new projects.
2010-04-25Add a "what's new in 1.3" document.Chris McDonough
2010-04-25Merge i18n branch via svn merge --ignore-ancestry -r9030:9150 ↵Chris McDonough
$REPOZE_SVN/repoze.bfg/branches/i18n No foreigners were harmed in the coding of this feature.
2010-04-21Moved i18n work to a branch and revert to pre-i18n-feature state via svn ↵Chris McDonough
merge -r9054:9030 svn+ssh://repoze@svn.repoze.org/svn/repoze.bfg/trunk
2010-04-19Go with a subclass of z.i18nmid.Message with the args reordered as a compromise.Chris McDonough
Make get_translation always return something.
2010-04-19Pass along translate function to templates.Chris McDonough
2010-04-19Dip a toe in the i18n waters.Chris McDonough
2010-04-19Clean up.Chris McDonough
2010-04-18(no commit message)Chris McDonough
2010-04-18- Use "Venusian" (`http://docs.repoze.org/venusianChris McDonough
<http://docs.repoze.org/venusian>`) to perform ``bfg_view`` decorator scanning rather than relying on a BFG-internal decorator scanner. (Truth be told, Venusian is really just a generalization of the BFG-internal decorator scanner). - A new install-time dependency on the ``venusian`` distribution was added. - Remove ``repoze.bfg.compat.pkgutil_26.py`` and import alias ``repoze.bfg.compat.walk_packages``. These were only required by internal scanning machinery; Venusian replaced the internal scanning machinery, so these are no longer required.
2010-04-14Credit Andrey.Chris McDonough
2010-04-14Note removal.Chris McDonough
2010-04-14Add "exception views" work contributed primarily by Andrey Popp by merging ↵Chris McDonough
the "phash" branch.
2010-04-07- Replace the statement ``path = path.rstrip('/').lstrip('/')`` withChris McDonough
the simpler ``path = path.strip('/')`` in the ``repoze.bfg.traversal.traversal_path`` function.
2010-03-07- The ``__name__`` value assigned to the returned object in theChris McDonough
``bfg_alchemy`` application template's ``MyApp`` model was an integer. This was incorrect. It is now a string.
2010-03-03Defer conditional import of IPython to avoid breakage under mod_wsgi.Tres Seaver
o http://bugs.repoze.org/issue138
2010-02-10Prep for 1.2 final.Chris McDonough
2010-02-07Prep for 1.2b6.Chris McDonough
2010-02-06- Remove magical feature of ``repoze.bfg.url.model_url`` whichChris McDonough
prepended a fully-expanded urldispatch route URL before a the model's path if it was noticed that the request had matched a route. This feature was ill-conceived, and didn't work in all scenarios.
2010-02-05- More correct conversion of provided ``renderer`` values to resourceChris McDonough
specification values (internal).
2010-02-04Prep for 1.2b5.Chris McDonough
2010-02-04- Fix a bug whereby a ``renderer`` argument to the ``@bfg_view``Chris McDonough
decorator that provided a package-relative template filename might not have been resolved properly. Symptom: inappropriate ``Missing template resource`` errors.
2010-02-04- 1.2b4 introduced a bug whereby views added via a route configurationChris McDonough
that named a view callable and also a ``view_attr`` became broken. Symptom: ``MyViewClass is not callable`` or the ``__call__`` of a class was being called instead of the method named via ``view_attr``.