Edgewall Software

Version 9 (modified by Christian Boos, 13 years ago) ( diff )

add quick link to ApiDocs and generated sphinx doc

TracDev/ApiChanges/0.13

0.13 corresponds to the development version of Trac (a.k.a. trunk)
These notes reflect the current status.

Summary

  1. Prerequisites
    1. Modified Dependencies
      1. jQuery (bundled)
      2. Babel (optional)
      3. Clearsilver (optional)
  2. Detailed List of Developer Visible Changes
  3. Other Modifications made to the 0.12 API
    1. Database API Changes
      1. Environment.get_db_cnx is obsolete
      2. Environment.db_query() and Environment.db_transaction() (0.13)​
  4. New in the 0.13 API

Prerequisites

Python 2.4 support has been dropped. Python versions 2.5, 2.6 and 2.7 are supported.

Modified Dependencies

jQuery (bundled)

The bundled version of jQuery is now 1.5 instead of 1.4.2 in Trac 0.12.

See jQuery 1.5 release notes and API documentation.

Babel (optional)

The internationalization support (i18) for Trac is depending on Babel.

Q: Should we now make Babel a mandatory dependency, as we have a good stable release?

This would allow us to use the Babel API in more places (e.g. #4636, #2182).

Clearsilver (optional)

Support for ClearSilver templates has been dropped. In case your plugin was still using .cs templates, PortingFromClearSilverToGenshi is now mandatory.

Detailed List of Developer Visible Changes

Component: database backend (1 match)

Ticket API Changes
#8575

trac.db: Added a method update_sequence() to database connections to allow updating table sequences during schema updates. [10114]

Other Modifications made to the 0.12 API

Database API Changes

Environment.get_db_cnx is obsolete

Following the deprecation deprecation made in 0.12, using Environment.get_db_cnx for obtaining a database connection is now considered obsolete and its use is heavily discouraged, as that method will be removed in Trac 0.14.

One should now only use the context managers for retrieving a database Connection in read or write mode.

  • a read-only Connection can be used to form queries:
    with env.db_query as db:
        ...
    
    a db instance obtained the above way should only be used for executing SELECT queries
  • a writable Connection can be used to modify the database content in a transaction:
    with env.db_transaction as db:
        ...
    
    a db instance obtained the above way can be used to execute INSERT/UPDATE/DELETE queries; they will be committed when the last such automatic transaction in the control flow completes successfully. See DatabaseApi for the full details.

Environment.db_query() and Environment.db_transaction() (0.13)

The @with_transaction(env) / @env.with_transaction() decorators introduced in 0.12 remain available, but they're now deprecated as well, as the with syntax is the one to be used. Those decorators will likely be removed in Trac 0.14 as well.

See #8751 for details and related notes about get_db_cnx deprecation above.

New in the 0.13 API

Be sure to have a look at the new ApiDocs (for latest trunk).
work in progress - coverage is not complete yet

Note: See TracWiki for help on using the wiki.