Ticket #4928 enhancement closed fixed
Replace uses of twisted.python.reflect.allYourBase with inspect.getmro
| Reported by: | exarkun | Owned by: | lvh |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | easy |
| Cc: | Branch: |
branches/allyourbase-4928
(diff, github, buildbot, log) |
|
| Author: | lvh | Launchpad Bug: |
Description (last modified by exarkun) (diff)
These functions are not exactly the same, but the switch should be pretty easy in most cases. getmro is several times faster than allYourBase because it knows about __mro__. It also takes care of duplication in a diamond inheritance hierarchy, which at least one caller of allYourBase doesn't realize it cares about (Failure doesn't break because of the duplication, but it ends up doing extra work).
Maybe we can eventually deprecate allYourBase and accumulateBases, too.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

