Opened 12 years ago

Closed 12 years ago

#462 closed enhancement (fixed)

Replace _make_safe by functools.wraps

Reported by: Elrond Owned by: Jakob Kramer
Priority: trivial Milestone: 0.3.1
Component: programming Keywords: bitesized
Cc: Parent Tickets:


To make decorators nicer, MediaGoblin has a tiny tool called _make_safe() in

But what this helper tool does, is actually in the standard library!

It's called functools.update_wrapper (1)
There's also a nicer version called functools.wraps (2)

So replace all instances of _make_safe by one of those two.


Change History (4)

comment:1 by Elrond, 12 years ago

Keywords: bitesized added; bite-sized removed

comment:2 by Jakob Kramer, 12 years ago

Milestone: 0.3.1
Owner: set to Jakob Kramer
Status: newaccepted

comment:3 by Jakob Kramer, 12 years ago

comment:4 by Christopher Allan Webber, 12 years ago

Resolution: fixed
Status: acceptedclosed

Looks good. I merged it! Thank you! :)

Note: See TracTickets for help on using tickets.