summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-05-02Alpha 1.Chris McDonough
2009-05-01zope.proxy gone.Chris McDonough
2009-05-01Done.Chris McDonough
2009-05-01Remove dependencies on zope.deferredimport. zope.deferredimport wasChris McDonough
only used as a deprecation mechanism, so where possible we've kept around the deprecation warnings and we've used zope.deprectation instead. However, when cross-module deprecations were included, rather than introducing a cyclic dependency, we just removed the deprecation itself. As a result: - Since version 0.6.1, a deprecation warning has been emitted when the name ``model_url`` is imported from the ``repoze.bfg.traversal`` module. This import alias (and the deprecation warning) has been removed. Any import of the ``model_url`` function will now need to be done from ``repoze.bfg.url``; any import of the name ``model_url`` from ``repoze.bfg.traversal`` will now fail. This was done to remove a dependency on zope.deferredimport. - Since version 0.6.5, a deprecation warning has been emitted when the name ``RoutesModelTraverser`` is imported from the ``repoze.bfg.traversal`` module. This import alias (and the deprecation warning) has been removed. Any import of the ``RoutesModelTraverser`` class will now need to be done from ``repoze.bfg.urldispatch``; any import of the name ``RoutesModelTraverser`` from ``repoze.bfg.traversal`` will now fail. This was done to remove a dependency on zope.deferredimport.
2009-05-01Merge "c-free" branch to trunk.Chris McDonough
2009-05-01Prep for 0.7.1 release.Chris McDonough
2009-05-01- In previous releases, the ``repoze.bfg.url.model_url``,Chris McDonough
``repoze.bfg.traversal.model_path`` and ``repoze.bfg.traversal.model_path_tuple`` functions always ignored the ``__name__`` argument of the root object in a model graph ( effectively replacing it with a leading ``/`` in the returned value) when a path or URL was generated. The code required to perform this operation was not efficient. As of this release, the root object in a model graph *must* have a ``__name__`` attribute that is either ``None`` or the empty string (``''``) for URLs and paths to be generated properly from these APIs. If your root model object has a ``__name__`` argument that is not one of these values, you will need to change your code for URLs and paths to be generated properly. If your model graph has a root node with a string ``__name__`` that is not null, the value of ``__name__`` will be prepended to every path and URL generated.
2009-05-01Dump explicit dependency on zope.proxy; it's still a 2nd-level dependency ↵Chris McDonough
from zope.deferredimport.
2009-05-01Bump to 0.7.1dev.Chris McDonough
2009-05-01- The ``repoze.bfg.location.LocationProxy`` class and theChris McDonough
``repoze.bfg.location.ClassAndInstanceDescr`` class have both been removed in order to be able to eventually shed a dependency on ``zope.proxy``. Neither of these classes was ever an API. - In all previous releases, the ``repoze.bfg.location.locate`` function worked like so: if a model did not explicitly provide the ``repoze.bfg.interfaces.ILocation`` interface, ``locate`` returned a ``LocationProxy`` object representing ``model`` with its ``__parent__`` attribute assigned to ``parent`` and a ``__name__`` attribute assigned to ``__name__``. In this release, the ``repoze.bfg.location.locate`` function simply jams the ``__name__`` and ``__parent__`` attributes on to the supplied model unconditionally, no matter if the object implements ILocation or not, and it never returns a proxy. This was done because the LocationProxy behavior has now moved into an add-on package (``repoze.bfg.traversalwrapper``), in order to eventually be able to shed a dependency on ``zope.proxy``. - In all previous releases, by default, if traversal was used (as opposed to URL-dispatch), and the root object supplied the``repoze.bfg.interfaces.ILocation`` interface, but the children returned via its ``__getitem__`` returned an object that did not implement the same interface, :mod:`repoze.bfg` provided some implicit help during traversal. This traversal feature wrapped subobjects from the root (and thereafter) that did not implement ``ILocation`` in proxies which automatically provided them with a ``__name__`` and ``__parent__`` attribute based on the name being traversed and the previous object traversed. This feature has now been removed from the base ``repoze.bfg`` package for purposes of eventually shedding a dependency on ``zope.proxy``. In order to re-enable the wrapper behavior for older applications which cannot be changed, register the "traversalwrapper" ``ModelGraphTraverser`` as the traversal policy, rather than the default ``ModelGraphTraverser``. To use this feature, you will need to install the ``repoze.bfg.traversalwrapper`` package (an add-on package, available at http://svn.repoze.org/repoze.bfg.traversalwrapper) Then change your application's ``configure.zcml`` to include the following stanza: <adapter factory="repoze.bfg.traversalwrapper.ModelGraphTraverser" provides="repoze.bfg.interfaces.ITraverserFactory" for="*" /> When this ITraverserFactory is used instead of the default, no object in the graph (even the root object) must supply a ``__name__`` or ``__parent__`` attribute. Even if subobjects returned from the root *do* implement the ILocation interface, these will still be wrapped in proxies that override the object's "real" ``__parent__`` and ``__name__`` attributes. See also changes to the "Models" chapter of the documentation (in the "Location-Aware Model Instances") section.
2009-05-01Point at new index location.Chris McDonough
2009-05-01Not the new release yetChris McDonough
2009-05-01Note new index location for BFG.Chris McDonough
2009-04-30Speed up / clarify 'traversal' module's 'model_path', 'model_path_tuple',Tres Seaver
and '_model_path_list' functions.
2009-04-30Remove incorrect info from security chapter.Chris McDonough
2009-04-30Unused import.Chris McDonough
2009-04-30Update URLs in paster templates.Chris McDonough
2009-04-30Make ModelGraphTraverser assume that all traversed objects provide ↵Chris McDonough
ILocation. Make WrappingModelGraphTraverser assume that *no* traversed objects provide ILocation. This makes it unnecessary to explain why the root object in a WrappingModelGraphTraverser setup needs to supply the ILocation interface. Now it doesn't.
2009-04-30Expand b/w compat.Chris McDonough
2009-04-29Note backward-incompatible change.Tres Seaver
2009-04-29Drop the ILocation testing by default during traversal.Tres Seaver
2009-04-29Coverage: edge case where pickled action doesn't have a set as fifth element.Tres Seaver
2009-04-29Suppress coverage report for namespace __init__.Tres Seaver
2009-04-29Suppress coverage report for BBB import.Tres Seaver
2009-04-29Coverage.Tres Seaver
2009-04-29Suppress coverage report for BBB import.Tres Seaver
2009-04-29Remove concurrency wart.Tres Seaver
2009-04-29This is a bogus assertion.Chris McDonough
2009-04-18- Added better documentation for virtual hosting at a URL prefixChris McDonough
within the virtual hosting docs chapter.
2009-04-16- The interface for ``repoze.bfg.interfaces.ITraverser`` and theChris McDonough
built-in implementations that implement the interface (``repoze.bfg.traversal.ModelGraphTraverser``, and ``repoze.bfg.urldispatch.RoutesModelTraverser``) now expect the ``__call__`` method of an ITraverser to return 3 additional arguments: ``traversed``, ``virtual_root``, and ``virtual_root_path`` (the old contract was that the ``__call__`` method of an ITraverser returned; three arguments, the contract new is that it returns six). ``traversed`` will be a sequence of Unicode names that were traversed (including the virtual root path, if any) or ``None`` if no traversal was performed, ``virtual_root`` will be a model object representing the virtual root (or the physical root if traversal was not performed), and ``virtual_root_path`` will be a sequence representing the virtual root path (a sequence of Unicode names) or ``None`` if traversal was not performed. Six arguments are now returned from BFG ITraversers. They are returned in this order: ``context``, ``view_name``, ``subpath``, ``traversed``, ``virtual_root``, and ``virtual_root_path``. Places in the BFG code which called an ITraverser continue to accept a 3-argument return value, although BFG will generate and log a warning when one is encountered. - The request object now has the following attributes: ``traversed`` (the sequence of names traversed or ``None`` if traversal was not performed), ``virtual_root`` (the model object representing the virtual root, including the virtual root path if any), and ``virtual_root_path`` (the seuquence of names representing the virtual root path or ``None`` if traversal was not performed). - A new decorator named ``wsgiapp2`` was added to the ``repoze.bfg.wsgi`` module. This decorator performs the same function as ``repoze.bfg.wsgi.wsgiapp`` except it fixes up the ``SCRIPT_NAME``, and ``PATH_INFO`` environment values before invoking the WSGI subapplication. - The ``repoze.bfg.testing.DummyRequest`` object now has default attributes for ``traversed``, ``virtual_root``, and ``virtual_root_path``. - The RoutesModelTraverser now behaves more like the Routes "RoutesMiddleware" object when an element in the match dict is named ``path_info`` (usually when there's a pattern like ``http://foo/*path_info``). When this is the case, the ``PATH_INFO`` environment variable is set to the value in the match dict, and the ``SCRIPT_NAME`` is appended to with the prefix of the original ``PATH_INFO`` not including the value of the new variable. - The notfound debug now shows the traversed path, the virtual root, and the virtual root path too.
2009-04-13Revert r4137: it's making the test fixtures too complicated.Chris McDonough
2009-04-13- ``repoze.bfg.testing.DummyRequest`` will now contain ``params``,Chris McDonough
``GET``, and ``POST`` attributes that are instances of the class ``FauxMultiDict``. A FauxMultiDict differs from a "plain" dictionary inasmuch as it has a ``getall`` method. ``getall`` is an interface exposed by the MultiDict implementation used by WebOb for ``params``, ``GET``, and ``POST``.
2009-04-11Prep for 0.7.0.Chris McDonough
2009-04-11Prep for 0.7.0.Chris McDonough
2009-04-11Tweaks.Chris McDonough
2009-04-11Rendering.Chris McDonough
2009-04-11- The default request charset encoding is now ``utf-8``. As a result,Chris McDonough
the request machinery will attempt to decode values from the utf-8 encoding to Unicode automatically when they are obtained via ``request.params``, ``request.GET``, and ``request.POST``. The previous behavior of BFG was to return a bytestring when a value was accessed in this manner. This change will break form handling code in apps that rely on values from those APIs being considered bytestrings. If you are manually decoding values from form submissions in your application, you'll either need to change the code that does that to expect Unicode values from ``request.params``, ``request.GET`` and ``request.POST``, or you'll need to explicitly reenable the previous behavior. To reenable the previous behavior, add the following to your application's ``configure.zcml``:: <subscriber for="repoze.bfg.interfaces.INewRequest" handler="repoze.bfg.request.make_request_ascii"/> See also the documentation in the "Views" chapter of the BFG docs entitled "Using Views to Handle Form Submissions (Unicode and Character Set Issues)".
2009-04-11Add text target to makefile.Chris McDonough
2009-04-05Added a new anchor keyword argument to model_url().Mike Naberezny
2009-03-31- Fix a bug in ``repoze.bfg.wsgi.HTTPException``: the content lengthChris McDonough
was returned as an int rather than as a string.
2009-03-24Rearrange.Chris McDonough
2009-03-24Better virtualenv docs.Chris McDonough
2009-03-19Looks like WebOb Response now uses capitolized Content-Type.Reed OBrien
So this updates the paster template tests so they pass again. ----- r7827 | ianb | 2009-03-11 14:58:38 -0400 (Wed, 11 Mar 2009) | 1 line Use Content-Type consistently (not content-type) -----
2009-03-18Fix grammar.Mike Naberezny
2009-03-04Add explicit dependency on zope.proxy.Chris McDonough
2009-03-04- Add explicit dependencies on ``zope.deferredimport`` andChris McDonough
``zope.deprecation`` for forward compatibility reasons (``zope.component`` will stop relying on ``zope.deferredimport`` soon and although we use it directly, it's only a transitive dependency, and ''zope.deprecation`` is used even though it's only a transitive dependency as well).
2009-02-20- Make it possible to have ``testing.DummyTemplateRenderer`` returnChris McDonough
some nondefault string representation.
2009-02-16- Using ``model_url`` or ``model_path`` against a broken model graphChris McDonough
(one with models that had a non-root model with a ``__name__`` of ``None``) caused an inscrutable error to be thrown: ( if not ``_must_quote[cachekey].search(s): TypeError: expected string or buffer``). Now URLs and paths generated against graphs that have None names in intermediate nodes will replace the None with the empty string, and, as a result, the error won't be raised. Of course the URL or path will still be bogus.
2009-02-16Prep for 0.6.9.Chris McDonough
2009-02-16- lru cache was unstable under concurrency (big surprise) when itChris McDonough
tried to redelete a key in the cache that had already been deleted. Symptom: line 64 in put:del data[oldkey]:KeyError: '/some/path'. Now we just ignore the key error if we can't delete the key. - add zip_safe = false to setup.cfg.