|Version 18 (modified by 7 years ago) ( diff ),|
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.
Proposed changes are prefixed with an OPEN mark and the paragraph is written in italics.
- Detailed List of Developer Visible Changes
Other Modifications made to the 1.0 API
- Modified Interfaces
- New Interfaces
- Notification API Changes
- Database API Changes
- Template and CSS changes
- Uncategorized Changes
- New in the 1.1.4 API
Only Python versions 2.6 and 2.7 are supported.
The following language features introduced in Python 2.6 can now be used and the related clean-ups can be done:
- use string format(),
except Cls as val
- class decorators to avoid the
- there's no longer need of
from __future__ import with_statement
next(iterator, [default])to clean-up some unit tests
- timeout in smtplib
TODO List supported browsers. Consider using jQuery's list.
See gmessage:trac-dev:nkMUY_8ILF0/rg1rsArDIewJ for a discussion about what dependencies we'll support in Trac 1.2.
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:
Babel ≥ 0.9.5 is still supported.
OPEN Genshi 0.7
Genshi 0.6.x is still supported.
|MySQL / MariaDB||≥ 5.0|
|pysqlite||≥ 2.4.1 (version provided by Python 2.6), avoid 2.5.2 - 2.5.4|
|Package||Req or Opt?||Version supported|
|SetupTools||Required||≥ 0.6, 5.4 - 5.6 are not recommended.|
|ConfigObj||Optional||Unspecified. Let's consider enforcing a minimum version, such as ≥ 5.0. ConfigObj 5.0 released on 2014-02-15|
|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
DONE Removed Enscript, SilverCity and PHP renderers.
Detailed List of Developer Visible Changes
|#11859||Add get_database_version and set_database_version methods to DatabaseManager class|
The database version for Trac and plugins can be retrieved using the
|#11893||Add reset_tables method to ConnectionBase class|
|#11894||_parse_db_str should not be a protected member of module|
Component: general (4 matches)
|#11648||Model classes should have a resource property|
Every model class has a
|#11707||Module and other classes should have a realm attribute|
|#11815||Test failures due to enabled unit test components in functional tests|
|#11824||Remove //Since// version information from TracIni documentation|
Leading and trailing whitespace is stripped from translatable string (plugin developers should use
Component: notification (5 matches)
Added new API for notification distribution and extension points:
Added new extension point INotificationSubscriber.
|#11853||Modular preference pages with child panels|
|#11854||Split up notification module|
Added mail notification helper functions
|#11869||Add DB table for notification subscribers watching individual resources|
Component: rendering (1 match)
|#11873||Return a NamedTuple from Mimeview.get_supported_conversions|
Component: ticket system (6 matches)
|#10833||ConfigurableTicketWorkflow's "Reassign To" ignores fine-grained permissions with restrict_owner=True|
|#11699||Use Chrome.authorinfo in render_ticket_action_controller|
|#11717||Highlight the whole referenced comment|
On the ticket page the id
|#11794||Rename 'Comments only' label in #prefs on the ticket page|
On the ticket prefs form the
|#11839||Allow groups to be specified in the set_owner workflow attribute|
|#11892||Move group_milestones from trac.ticket.model to trac.ticket.roadmap|
Component: version control (1 match)
|#11703||Remove deprecated [trac] repository_dir option for configuring repository|
Component: wiki system (1 match)
|#6573||Allow change comment edit after commit.|
Added new optional method
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
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.
Notification API Changes
Database API Changes
Methods have been added to
DatabaseManager class for settings and retrieving the database version for Trac and plugins:
Environment.get_db_cnx has been removed
Following the deprecation made in 0.12, the method
Environment.get_db_cnx has been removed.
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: ...
dbinstance 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: ...
dbinstance 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.get_read_db and the decorators
env.with_transaction() have been deprecated since Trac 1.0 and will be removed in Trac 1.3.1.
db parameters removed from function and method signatures
With the introduction of
@with_transaction(env) decorators in 0.12 and continuing with the introduction of the database connection context managers in 1.0, the
db parameters passed as function and method arguments became deprecated.
db parameters have been removed from nearly all function and method signatures. The
db arguments are still present on methods of
IEnvironmentParticipant implementations, but are deprecated and should no longer be used. They will be removed in 1.3.1.
ConnectionBase class defines an abstract interface that database backends must adhere to when implementing a
Template and CSS changes
tt tags are not support in HTML5 and have been replaced with
code tags in Trac (#11094). The styling of
code tags is the same in Trac , but
code tags should be used since the styling for
tt tags will be removed in a future version of Trac.
about.css stylesheet has been removed and the rules contained in that stylesheet have been moved to
trac.css. The table of environment information on the Error and About pages have been extracted to a new template
environment_info.html and the markup and associated rules in the stylesheet have been significantly changed.
DONE Removed the deprecated
authname parameter from
TODO Log warnings for deprecated functions and methods (comment:26:ticket:11605)
New in the 1.1.4 API
TODO Remove Since info from docstrings for Trac < 0.12.
This is a work in progress - coverage is still not yet complete.