#8741 closed (fixed)
backwards-incompatible: urlresolvers.reverse no longer silently accepts unused args
Reported by: | Carl Meyer | Owned by: | Malcolm Tredinnick |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Pre-[8760], urlresolvers.reverse would silently accept "extra" args and return a matched URL that didn't need the arg. Post-[8760], all args must be matched in the URL pattern.
The newer behavior is probably more correct, but this is a backwards-incompatible change for anyone who was relying on the prior behavior.
If the correct thing here is to document this on the BackwardsIncompatibleChanges page, I'm happy to do so - just checking to be sure this isn't a bug, since the [8760] rewrite was advertised as "fully backwards-compatible."
Change History (4)
comment:1 by , 16 years ago
milestone: | → 1.0 |
---|
comment:2 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I can probably fix this, at least for keyword arguments, so that extra arguments are permitted. Won't be possible for positional arguments, though. I'll have a look at it.
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
On second thoughts, it's a bad idea to allow this (which is a shame, because it's a three line change). It means that the first match (often the one requiring the least number of arguments) will work, not the one that exactly matches. Which means optional arguments will be omitted and that's bad. I'll update the backwards-incompatible changes page (you can't do it, since we made it read-only a while back after some vandalism).
Marking 1.0 just to make sure it doesn't get unnoticed.