Skip to content

Phenny Compatibility

Edward Powell edited this page Nov 3, 2013 · 3 revisions

Willie is, by and large, compatible with Phenny and Jenni. It is a goal of the project that modules written for those bots will work with Willie, with a minimal amount of effort.

Note that the arguments to Willie callables are conventionally referred to as bot and trigger. These are functionally the same as the phenny and input passed to phenny callables, and either naming convention will work.

Prior to the release of Willie v4.1.0, the following compatibility issues were known:

Major issues

These are likely to affect many or all modules and deployments.

  • Willie uses unicode more frequently and consistently than Phenny. trigger objects entering your callables will be unicode, and messages sent with write, say, msg, etc. must also be unicode objects.
  • Configuration files are incompatible. A tool exists to assist in converting them to Willie's newer, more versatile format.
  • Imports of web and tools must be changed to willie.web and willie.tools respectively (or from willie import web, tools).

Minor issues

These only affect a small number of modules, and/or will fail gracefully

  • Phenny's last_seen_uri and seen are replaced by Willie's memory system. Modules using them will likely still work, but may not interoperate with newer modules as expected.
  • phenny.stats will be an empty dict, which will negatively impact any module which uses it. This is likely limited to the .stats command in Phenny's info module.
  • Imports of icao are broken, as icao.py is not included in Willie. This likely only breaks phenny's weather module, the functionality of which is replaced and improved in Willie.
  • Imports of bot and irc are broken. There is not necessarily a simple solution, but the only module this is likely to affect is reload, the functionality of which is replaced and improved in Willie.
  • Callables that used the deprecated function signature from phenny (e.g. def f_time(self, origin, match, args): rather than def f_time(phenny, input):) are not supported. This will not affect the vast majority of modules. Those that are affected can likely be made to work (though not necessarily meet current style guidelines) by removing the origin, match, and args arguments, adding a trigger argument, and making the following replacements:
Replace this: With this:
origin trigger
match trigger.match
args[0] trigger.bytes
args[1] trigger.sender

There may be other issues, but they are not known at this time.

TODO: The following members of the Jenni class are used in jenni, and may or may not be present or have analogs in Willie. More research is needed: rfn, rdb, reminders, bot, doc, data, variables, notice