Edgewall Software

Version 1 (modified by Christian Boos, 14 years ago) ( diff )

Start to document some 0.9 → 0.10 API changes

TracDev/ApiChanges/0.10

This page is aimed to help plugin developers to port their 0.9 plugin to Trac 0.10.

General Changes

The most important single change in 0.10 was the switch to using unicode everywhere internally.

See TracDev/UnicodeGuidelines.

Interface Changes

ISearchSource (0.10) (0.9)

The get_search_results(self, req, terms, filters) now takes a list of terms instead of the full query, as it used to do for its second argument.

Example: DoxygenPlugin

  • doxygentrac/doxygentrac.py

     
    212212
    213213            yield('doxygen', title)
    214214
    215     def get_search_results(self, req, query, filters):
     215    def get_search_results(self, req, keywords, filters):
    216216        if not 'doxygen' in filters:
    217217            return
    218         if query[0] == query[-1] == "'" or query[0] == query[-1] == '"':
    219             keywords = [query[1:-1]]
    220         else:
    221             keywords = query.split(' ')
    222218
    223219        base_path = self.config.get('doxygen', 'path')

See also: TracDev/ReleaseNotes/0.10

Note: See TracWiki for help on using the wiki.