Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8741 closed (fixed)

backwards-incompatible: urlresolvers.reverse no longer silently accepts unused args

Reported by: carljm Owned by: mtredinnick
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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."

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by julien

  • milestone set to 1.0
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Marking 1.0 just to make sure it doesn't get unnoticed.

comment:2 Changed 6 years ago by mtredinnick

  • Owner changed from nobody to mtredinnick
  • Status changed from new to 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 Changed 6 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from assigned to 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).

comment:4 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.