= !TracDev/ApiChanges/1.0 = {{{ #!div style="margin-top: .5em; padding: 0 1em; background-color: #ffd; border:1px outset #ddc; text-align: center; clear: right" [milestone:1.0] is the current stable version of Trac These notes reflect the final status. }}} [[PageOutline(2-4,Summary,inline)]] == Prerequisites == **Python 2.4 support has been dropped.** Python versions 2.5, 2.6 and 2.7 are supported. === Modified Dependencies === ==== jQuery and jQuery UI (bundled) The bundled version of [http://jquery.com jQuery] is now 1.7.2 instead of 1.4.4 in Trac 0.12-stable. See jQuery release notes for the corresponding major updates [http://blog.jquery.com/2011/01/31/jquery-15-released/ 1.5], [http://blog.jquery.com/2011/05/03/jquery-16-released/ 1.6] and [http://blog.jquery.com/2011/11/03/jquery-1-7-released/ 1.7]. The full minified jQuery UI package is now bundled with Trac. The version is [http://jqueryui.com/docs/Changelog/1.8.21 1.8.21] and includes a custom theme. ==== Babel (optional) The internationalization support (i18) for Trac is depending on [http://babel.edgewall.org/ Babel], preferably version 0.9.6. The trunk version (1.0dev) should work as well. ==== Clearsilver (dropped) Support for ClearSilver templates has been dropped. In case your plugin was still using `.cs` templates, PortingFromClearSilverToGenshi is now mandatory. ==== Genshi (mandatory) * '''Genshi 0.7dev''' changed to accepting `unicode` instances by default, rather than UTF-8 encoded regular `str` instances. Trac has been updated to override the default back to UTF-8 but plugins that access Genshi directly might raise an error: `UnicodeError: source returned bytes, but no encoding specified`. * '''Genshi 0.6.x''' is still supported and will likely be a safer alternative. See #10126 for details. == Detailed List of Developer Visible Changes #list [[TicketQuery(milestone=1.0|0.12.1|0.12.2|0.12.3|0.12.4,status=closed,apichanges!=,col=summary,rows=apichanges,group=component,format=table)]] === Database API Changes === ==== `Environment.get_db_cnx` is obsolete #get_db_cnx Following the deprecation [../0.12#get_db_cnx 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 1.1. 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: {{{#!python 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: {{{#!python 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()` ^[source:trunk/trac/env.py@#Lnum (1.0)]^ ==== #with_transaction 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 1.1 as well. See #8751 for details and related notes about [#get_db_cnx get_db_cnx] deprecation above. == New in the 1.0 API == Be sure to have a look at the new ApiDocs ([http://www.edgewall.org/docs/tags-trac-1.0/html/ Sphinx generated documentation for Trac 1.0]). //This is a work in progress - coverage for 1.0 is not complete but will be extended in the 1.0-stable branch.//