Version 16 (modified by 12 years ago) ( diff ) | ,
---|
TracDev/ApiChanges/1.0
1.0 corresponds to the next stable version of Trac (a.k.a. trunk)
These notes reflect the current status, which is rapidly (heh) approaching beta.
Summary
- Prerequisites
- Detailed List of Developer Visible Changes
- Other Modifications made to the 0.12 API
- New in the 1.0 API
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 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 1.5, 1.6 and 1.7.
The full minified jQuery UI package is now bundled with Trac. The version is 1.8.18 and includes a custom theme.
Babel (optional)
The internationalization support (i18) for Trac is depending on Babel, preferably version 0.9.6.
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).
A: (cboos) I think having it optional doesn't prevent us to make further use of it when it's available. We just need to use fallback code when it's not (see #2182).
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.7 changed to accepting
unicode
instances by default, rather than UTF-8 encoded regularstr
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
Ticket | API Changes |
---|---|
#6348 |
|
#8575 |
|
#9842 |
|
Component: general (11 matches) |
|
Ticket | API Changes |
#8036 |
perm: Made meta-permissions cumulative, so e.g. |
#8695 |
|
#9418 |
Ensure that a |
#9536 |
db API makeover by introducing context managers and a shortcut for query execution; see TracDev/DatabaseApi#Trac0.13API for details |
#9777 |
Provide |
#9836 |
config: Added the |
#9870 |
It is now safe to inherit from classes having |
#10165 |
Upgraded jQuery to 1.7.2. |
#10245 |
trac.web.chrome: |
#10427 |
Removed obsolete |
#10644 |
|
Component: i18n (2 matches) |
|
Ticket | API Changes |
#10038 |
trac.wiki.api: |
#10717 |
babel.js: it's no longer necessary to call |
Component: rendering (2 matches) |
|
Ticket | API Changes |
#9915 |
Registered reStructuredText roles and directives can gain access to the Trac environment and rendering context corresponding to the docutils content being processed. |
#10538 |
|
Component: roadmap (1 match) |
|
Ticket | API Changes |
#2182 |
|
Component: ticket system (2 matches) |
|
Ticket | API Changes |
#9935 |
The req parameter to Query.execute() is no longer required. |
#10667 |
|
Component: version control (3 matches) |
|
Ticket | API Changes |
#9607 |
versioncontrol: added |
#10208 |
versioncontrol: use the requested |
#10712 |
Subversion specific code is now located in the |
Component: web frontend (2 matches) |
|
Ticket | API Changes |
#7768 |
trac.web.chrome: |
#7774 |
chrome: |
Component: wiki system (1 match) |
|
Ticket | API Changes |
#8137 |
Added |
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 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:
a
with env.db_query as db: ...
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:
a
with env.db_transaction as db: ...
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()
(1.0)
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 deprecation above.
New in the 1.0 API
Be sure to have a look at the new ApiDocs (for latest trunk).
This is a work in progress - coverage is not yet complete.