diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-26 17:04:21 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-26 17:04:21 +0000 |
| commit | fb8dd1025309a0bb90e875ead59744f1571d9b92 (patch) | |
| tree | 979641e5a456c0a3f2de6f0c6e553f7f62dbc578 | |
| parent | 87f49ec51c262621682f43c90e8389da337fd0cf (diff) | |
| download | pyramid-fb8dd1025309a0bb90e875ead59744f1571d9b92.tar.gz pyramid-fb8dd1025309a0bb90e875ead59744f1571d9b92.tar.bz2 pyramid-fb8dd1025309a0bb90e875ead59744f1571d9b92.zip | |
Trying to determine what the real bug is.
| -rw-r--r-- | CHANGES.txt | 26 | ||||
| -rw-r--r-- | repoze/bfg/url.py | 4 |
2 files changed, 24 insertions, 6 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index ff30b2447..9ff5bf9c8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -34,13 +34,21 @@ Documentation ``repoze.bfg`` application configuration imperatively was previously much more difficult. +- A narrative documentation chapter entitled "Configuration, + Decorations and Code Scanning" explaining ZCML- vs. imperative- + vs. decorator-based configuration equivalence. + +- The "ZCML Hooks" chapter has been renamed to "Hooks"; it documents + how to override hooks now via imperative configuration and ZCML. + +- The explanation about how to supply an alternate "response factory" + has been removed from the "Hooks" chapter. This feature may be + removed in a later release (it still works now, it's just not + documented). + Bug Fixes ---------- -- When passed ``_query`` is passed to the ``route_url`` function, the - URL encoding routine no longer raises an exception because this is a - dictionary. - - The ACL authorization policy debugging output when ``debug_authorization`` console debugging output was turned on wasn't as clear as it could have been when a view execution was @@ -50,6 +58,16 @@ Bug Fixes value and either the root ACL or ``<No ACL found on any object in model lineage>`` if no ACL was found. +- When two views were registered with the same ``accept`` argument, + but were otherwise registered with the same arguments, if a request + entered the application which had an ``Accept`` header that accepted + *either* of the media types defined by the set of views registered + with predicates that otherwise matched, a more or less "random" one + view would "win". Now, we try harder to use the view callable + associated with the view configuration that has the most specific + ``accept`` argument. Thanks to Alberto Valverde for an initial + patch. + Internals --------- diff --git a/repoze/bfg/url.py b/repoze/bfg/url.py index 6b89e6a42..d94cd429c 100644 --- a/repoze/bfg/url.py +++ b/repoze/bfg/url.py @@ -98,10 +98,10 @@ def route_url(route_name, request, *elements, **kw): qs = '' if '_query' in kw: - qs = '?' + urlencode(kw.pop('_query'), doseq=True) + qs = '?' + urlencode(kw['_query'], doseq=True) if '_anchor' in kw: - anchor = kw.pop('_anchor') + anchor = kw['_anchor'] if isinstance(anchor, unicode): anchor = anchor.encode('utf-8') anchor = '#' + anchor |
