Edgewall Software

Version 5 (modified by Jun Omae, 8 years ago) ( diff )

Git 1.5.6+ is supported. See TracGit#DownloadandInstallation.

1.1.3 | 1.1.5

Documenting API changes since 1.1.3

The next stable version of Trac will be named 1.2 and will contain the cumulative changes made in the successive 1.1.x releases.

These notes reflect the current status for 1.1.3, in trunk.

Proposed changes are prefixed with an OPEN mark and the paragraph is written in italics.


  1. Prerequisites
    1. Modified Dependencies
      1. jQuery and jQuery UI (bundled)
      2. Babel (optional)
      3. Genshi (mandatory)
      4. Databases
      5. Other
    2. Deprecated Modules Removed
    3. New Dependencies
  2. Detailed List of Developer Visible Changes
  3. Other Modifications made to the 1.0 API
    1. Modified Interfaces
      1. IWikiChangeListener (1.1.3)​ (1.0)​
      2. IPreferencePanelProvider (1.1.3)​ (1.0)​
    2. New Interfaces
      1. trac.notification.api.INotificationDistributor (1.1.3)​
      2. trac.notification.api.INotificationFormatter (1.1.3)​
      3. trac.notification.api.INotificationSubscriber (1.1.3)​
      4. trac.notification.api.IEmailAddressResolver (1.1.3)​
      5. trac.notification.api.IEmailDecorator (1.1.3)​
    3. Notification API Changes
    4. Uncategorized Changes
    5. Database API Changes
  4. New in the 1.1.4 API


Only Python versions 2.6 and 2.7 are supported.

The following language feature introduced in Python 2.6 can now be used and the related clean-ups can be done:

  • use string format(), print()
  • except Cls as val
  • class decorators to avoid the implements hack?
  • @prop.setter / @prop.deleter
  • namedtuples!
  • there's no longer need of from __future__ import with_statement
  • next(iterator, [default]) to clean-up some unit tests
  • timeout in smtplib

Modified Dependencies

jQuery and jQuery UI (bundled)

The bundled version of jQuery will be 1.9 / 2.0 instead of 1.8.3 in Trac 1.1.1.

See jQuery release notes for the corresponding major updates:

OPEN The bundled version of the full minified jQuery UI package will be 1.10.1. See #11019.

Babel (optional)

The internationalization support (i18) for Trac is depending on Babel, version 1.0. (#10882) TODO

Babel ≥ 0.9.5 is still supported.

Genshi (mandatory)

OPEN Genshi 0.7

Genshi 0.6.x is still supported.


Which versions of PostgreSQL, MySQL/MariaDB and SQLite will we support?

Database bindings also need to be considered, psycopg2 and MySQLdb.


Package Req or Opt? Version supported
SetupTools Required ≥ 0.6, 5.4 - 5.6 are not recommended.
Git Optional ≥ 1.5.6
Subversion Optional ≥ 1.6, however let's consider dropping support for 1.6
ConfigObj Optional Unspecified. Let's consider enforcing a minimum version, such as ≥ 5.0. ConfigObj 5.0 released on 2014-02-15
DocUtils Optional ≥ 0.3.9
Textile Optional ≥ 2.0
Pygments Optional ≥ 0.6. Let's consider bumping the requirement to at least 1.0, released in 2008

… please add any dependencies I've overlooked.

Deprecated Modules Removed

TODO Remove support for mod_python (see TracModPython) … or maybe not. It seems the project is alive (comment:34:ticket:11605).

Removed Enscript, SilverCity and PHP renderers.

New Dependencies


Detailed List of Developer Visible Changes

Component: database backend (3 matches)

Ticket Summary
#11859 Add get_database_version and set_database_version methods to DatabaseManager class
API Changes

The database version for Trac and plugins can be retrieved using the get_database_version and set_database_version methods of the DatabaseManager class.

#11893 Add reset_tables method to ConnectionBase class
API Changes

Added reset_tables method to the ConnectionBase class and each class implementing the ABC. Added reset_tables and insert_into_tables methods to the DatabaseManager class.

#11894 _parse_db_str should not be a protected member of module
API Changes

Renamed _parse_db_str in the trac.db.api module to parse_connection_uri. The latter is aliased to the former for backwards compatibility.

Component: general (4 matches)

Ticket Summary
#11648 Model classes should have a resource property
API Changes

Every model class has a resource property and the Resource objects are created on access, replacing several cases in which resource was an attribute and the Resource object was created in the initializer and other class methods.

#11707 Module and other classes should have a realm attribute
API Changes

The IResourceManager implementation defines the realm through a class attribute, which is then assigned to model and module classes (classes implementing IResourceHandler). This allows the singly-defined realm attribute to be used throughout the package and avoids the repeated use of static strings.

#11815 Test failures due to enabled unit test components in functional tests
API Changes

Environment.is_component_enabled returns None if passing a component in the trac.tests package.

#11824 Remove //Since// version information from TracIni documentation
API Changes

Leading and trailing whitespace is stripped from translatable string (plugin developers should use cleandoc from trac.util.text). Previously only uniform indentation was removed.

Component: notification (5 matches)

Ticket Summary
#3517 Notification plugin
API Changes

Added new API for notification distribution and extension points:

#4056 Notification Preferences
API Changes

Added new extension point INotificationSubscriber.

#11853 Modular preference pages with child panels
API Changes

IPreferencePanelProvider.get_preference_panels() can now return (panel, label, parent_panel) triples to make child panels appear as part of the indicated parent panel.

#11854 Split up notification module
API Changes

Added mail notification helper functions create_charset, create_mime_text, create_header, create_message_id, and class RecipientMatcher (matches recipients taking into account admit_domains, ignore_domains, use_short_addr and smtp_default_domain config options).

#11869 Add DB table for notification subscribers watching individual resources
API Changes

Added new trac.notification.model.Watch class for managing watch preferences in the new notify_watch DB table.

Component: rendering (1 match)

Ticket Summary
#11873 Return a NamedTuple from Mimeview.get_supported_conversions
API Changes

Mimeview.get_supported_conversions(...) returns a namedtuple MimeConversion, with the entries retaining the same ordering as the previous tuple.

Component: ticket system (6 matches)

Ticket Summary
#10833 ConfigurableTicketWorkflow's "Reassign To" ignores fine-grained permissions with restrict_owner=True
API Changes

EnvironmentStub has an insert_known_users method for populating the session table with known users.

#11699 Use Chrome.authorinfo in render_ticket_action_controller
API Changes
  • The final character in the string returned from separated() in trac.util.presentation can be specified through the last parameter, which defaults to None.
  • Chrome.authorinfo() returns a span with class trac-author-anonymous and trac-author-none when the author input is anonymous and None, respectively.
  • Chrome.format_author() returns (none) for any author input that is falsy.
#11717 Highlight the whole referenced comment
API Changes

On the ticket page the id #comment:%s was moved from the comment span to the enclosing h3.

#11794 Rename 'Comments only' label in #prefs on the ticket page
API Changes

On the ticket prefs form the id of the Show property changes (formerly Comments only) checkbox was renamed from trac-comments-only-toggle to trac-show-property-changes-toggle.

#11839 Allow groups to be specified in the set_owner workflow attribute
API Changes

The PermissionSystem method get_groups_dict returns a dictionary of groups and group members. The method get_users_dict returns a dictionary of users and user permissions.

#11892 Move group_milestones from trac.ticket.model to trac.ticket.roadmap
API Changes

Moved group_milestones function from trac.ticket.model to trac.ticket.roadmap. Compatibility function has been left in trac.ticket.model and will be removed in 1.3.1.

Component: version control (1 match)

Ticket Summary
#11703 Remove deprecated [trac] repository_dir option for configuring repository
API Changes

Removed deprecated authname parameter from Environment.get_repository().

Component: wiki system (1 match)

Ticket Summary
#6573 Allow change comment edit after commit.
API Changes

Added new optional method wiki_page_comment_modified() in IWikiChangeListener.

Other Modifications made to the 1.0 API

Take the will be removed in version 1.1.1 comments in the code seriously. The earlier the planned API changes in 1.1.x, the better (gives more time to plugin authors to adapt). TODO

Modified Interfaces

IWikiChangeListener (1.1.3) (1.0)

Wiki page version comments can now be edited, so wiki_page_comment_modified(page, old_comment) has been added to allow plugins to be notified of this.

IPreferencePanelProvider (1.1.3) (1.0)

IPreferencePanelProvider implementations can now provide child panels that appear as sections appended to other panels (proposal). This allows plugins to extend existing preference panels.

New Interfaces

trac.notification.api.INotificationDistributor (1.1.3)

A new INotificationDistributor interface was added (proposal). It allows plugins to distribute notifications on different channels (e.g. over XMPP).

trac.notification.api.INotificationFormatter (1.1.3)

A new INotificationFormatter interface was added (proposal). It allows plugins to format notifications (e.g. to HTML).

trac.notification.api.INotificationSubscriber (1.1.3)

A new INotificationSubscriber interface was added (proposal). It allows plugins to provide more subscription preferences (e.g. to send or suppress notifications under special conditions).

trac.notification.api.IEmailAddressResolver (1.1.3)

A new IEmailAddressResolver interface was added (proposal). It allows plugins to retrieve email addresses from users (e.g. from LDAP).

trac.notification.api.IEmailDecorator (1.1.3)

A new IEmailDecorator interface was added (proposal). It allows plugins to add or tweak email headers.

Notification API Changes

To take advantage of the new notification related interfaces, code that sends notifications must use the new Notification API instead of the NotifyEmail class hierarchy. (See proposal)

Uncategorized Changes

TODO Remove deprecated compatibility code for InterTrac links: trunk/trac/wiki/formatter.py@13050:703-712#L696, and remove documentation:

Removed the deprecated authname parameter from Environment.get_repository().

TODO Log warnings for deprecated functions and methods (comment:26:ticket:11605)

Database API Changes

Methods have been added to DatabaseManager class for settings and retrieving the database version for Trac and plugins: set_database_version and get_database_version (#11859).

New in the 1.1.4 API

Be sure to have a look at the new ApiDocs (for latest trunk).

TODO Remove Since info from docstrings for Trac < 0.12.

This is a work in progress - coverage is still not yet complete.

Note: See TracWiki for help on using the wiki.