Information for 3rd party developers working on MoinMoin extensions
This is only partial list. If you find an API change not documented here, please add it.
API changes in 1.8
Page.send_page(msg=...) lost the msg parameter, use the theme.add_msg()
API changes in 1.7
request.http_headers changed to request.emit_http_headers
API changes in 1.6
- ...
API changes in 1.5
Page.url - query string in url will not be escaped.
Plugin API was improved. Errors in your plugin should raise now correct tracebacks and missing plugins or missing names in a plugin will raise wikiutil.PluginError or more specific subclass. See ErrorHandlingInPlugins
New function wikiutil.importBuiltinPlugin used to import a builtin plugin
pysupport.importName does not hide all errors behind None. It will raise ImportError or AttributeError and the caller should catch the error and do the right thing.
- function subscribePage of user is renamed to subscribe
API changes in 1.3.5
Are these still correct?
PageEditor.saveText accept notify_editor keyword, default to False. It should be used only in rare cases when you want to notify the editor about the edit.
PageEditor._notifySubscribers accept edtior keyword, default to False.
API changes in 1.3.2
wikiutil.importPlugin's first argument is now a wiki config instance (request.cfg) and there is no path keyword.
Wiki plugins always override MoinMoin plugins. wikiutil.importPlugin implements this override.
util.pysupport.importName does not accept path - you should call it with correct module name, e.g 'wikiconfig.plugin.parser.wiki' for wiki plugins, or 'MoinMoin.parser.wiki'.
wikiutil.extensionPlugin was renamed to wikiPlugins and it gets the config instance instead of a path.
New function wikiutil.importWikiPlugin used to import wiki plugin using a cache in a thread safe way.
New config option config.use_threads is used to activate thread safe code. The server code should set it accordingly to the server platform characteristics. The other code should use it to decide if locks/mutexes are needed.
API changes in 1.3.0
util.web.makeQueryString - does not return escaped url any more.
Old code returns 'a=1&b=2'. New code returns 'a=1&b=2'
Page.url - warns that on moin 1.4, query string in url will not be escaped. Call with escape=0 to remove the warning and change your code to be ready for this change.
many changes in the formatter; every method is called with the parameter on
API changes from 1.1 to 1.2
-- RobertSeeger 2005-01-25 17:29:09 This is a list of APIs that have changed somewhere between 1.1 and 1.3.2. I can't say exactly when, because I had to skip 1.2 and am now trying to migrate all my code from 1.1 to 1.3.2, so this list will grow. Maybe somebody can take this raw text and put it to the proper heading?
- I think that most are changes done in 1.2
- General
print is strictly forbidden, must always use request.write()
"function" _(text) is taken from request.getText and not imported from i18 in many cases
class Page
__init__ needs request as first parameter (some other methods do, too)
set_raw_body has an additional optional parameter modified
class User
getCookie(self) was replaced by makeCookieHeader(self)
class AccessControlList (inwikiacl.py)
setLines needs cfg as first parameter (some other methods do, too)
class Request has been replaced by a hierarchy of RequestBase and derived classes, some changes in the interface:
getEventLogger no longer available (I think the whole log file handling has changed, but haven't quite figured out yet)
a number of functions that were global functions in one of the webapi implementations (e.g. getScriptname, http_headers are now members of RequestBase or its specific derivatives
module wikiutil
a number of functions (e.g. link_tag) need request as first parameter
send_footer no longer takes parameter mod_string