Ticket #2656 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Automatic powerup discovery should be a feature of Empowered

Reported by: washort Assigned to: washort
Priority: highest Milestone:
Component: Axiom Severity: normal
Keywords: Cc:
Estimated Completion (YYYY/MM/DD): Branch: branches/automatic-powerup-2656
Author: washort

Description

axiom.dependency contains code for automatic powerup discovery via the powerupInterfaces attribute and the __getPowerupInterfaces__ method. This isn't dependency-specific and should be moved into the normal powerup machinery.

Change History

07/11/08 13:35:55 changed by washort

  • branch set to branches/automatic-powerup-2656.
  • author set to washort.

(In [16218]) Branching to 'automatic-powerup-2656'

07/11/08 14:19:59 changed by washort

  • keywords set to review.
  • owner changed from washort to exarkun.
  • priority changed from normal to highest.

07/14/08 09:22:01 changed by exarkun

  • keywords deleted.
  • owner changed from exarkun to washort.
  • in the implementation of _getPowerupInterfaces, is there any reason to use isinstance instead of issubclass?
  • in the tests, wouldn't PlusTwo and PlusOneTimesFour be simpler if their attributes just declared defaults instead of overridding __init__?

The possible inconsistency between what powerUp and powerDown do is somewhat bothersome. I see that this was the previous behavior as well, though. Do you think we should do something about the fact that if elements are added to or removed from powerupInterfaces then powerDown will likely do the wrong thing when it is called?

07/14/08 11:05:07 changed by washort

Fixed. I've documented the powerUp/powerDown issue - I don't think there's much to be done about it (if you change the list of powerups, presumably you wanted to change the behaviour)

07/14/08 11:05:25 changed by washort

  • keywords set to review.
  • owner changed from washort to exarkun.

07/14/08 12:06:47 changed by exarkun

  • keywords deleted.
  • owner changed from exarkun to washort.

Mantissa/xmantissa/signup.py imports _getPowerupInterfaces and so a bunch of tests fail

07/14/08 14:36:12 changed by washort

  • keywords set to review.
  • owner changed from washort to exarkun.

Fixed.

07/15/08 18:39:16 changed by exarkun

  • keywords deleted.
  • owner changed from exarkun to washort.

Looks good, please merge.

07/15/08 18:47:15 changed by washort

  • status changed from new to closed.
  • resolution set to fixed.

(In [16243]) Merge automatic-dependency-2656.

Author: washort Reviewer: exarkun

Move powerup discovery logic out of axiom.dependency and into axiom.item.Empowered.

Closes #2656.

jethro@divmod.org