Ticket #960 (new task)
Convert all buildbot classes to new style, i.e. inherit from object.
| Reported by: | maruel | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.0.+ |
| Version: | 0.8.1 | Keywords: | tests |
| Cc: |
Description
That would permit to do some fixes w.r.t. make reconfig. The only issue remaining that catlee raised is ComparableMixin? since it compares type(self), type(them).
Change History
comment:1 Changed 3 years ago by dustin
- Keywords tests added
- Milestone changed from undecided to 0.8.2
comment:2 Changed 3 years ago by catlee
We should sprinkle some __slots__ goodness around at the same time. A simple change uses the following sizes, according to asizeof[1]:
Current old-style class: 2576 bytes New-style class: 2568 bytes New-style class w/ slots: 1144 bytes
comment:4 Changed 3 years ago by dustin
- Milestone changed from 0.8.2 to 0.8.3
Let's do this at the beginning of 0.8.3 and see what breaks.
comment:5 Changed 3 years ago by catlee
Started some work here: http://github.com/catlee/buildbot/tree/newstyle
comment:6 Changed 3 years ago by dustin
- Keywords tests added; tests, ship-this removed
- Milestone changed from 0.8.3 to 0.8.+
This fails badly when unpickling builds from previous versions. Comments on the commit - http://github.com/catlee/buildbot/commit/0593a9dbff1ccc286b06cbbcac3408e7d996b4ae#commitcomment-183550.
One option is to write some sort of conversion code into the unpickling. The other option is to wait for the StatusDB when we're not using pickles anymore. I prefer the latter, honestly..
Also, I'm not so keen on tests looking at the sizes of the classes before and after. It's nice to demonstrate that this has a savings and so on, but it doesn't really constitute a unit test - more of a performance test, I guess.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
So we'll need a bit more test coverage first, but I don't see a big reason not to do this.
By the way, the fixes wrt reconfig are described here: